MCPcopy Create free account
hub / github.com/BohemiaInteractive/CWR / Add

Method Add

engine/Poseidon/World/Simulation/Animation/Animation.cpp:273–303  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

271}
272
273void Selection::Add(int vi, byte weigth)
274{
275 bool weighted = _weights.Size() > 0;
276
277 Buffer<VertexIndex> temp(_sel.Size() + 1);
278 Buffer<VertexIndex> tempW(_sel.Size() + 1);
279 int i = 0;
280 while (i < _sel.Size())
281 {
282 if (_sel[i] > vi)
283 {
284 break;
285 }
286 temp[i] = _sel[i];
287 if (weighted)
288 {
289 tempW[i] = _weights[i];
290 }
291 i++;
292 }
293 temp[i] = vi;
294 while (i < _sel.Size())
295 {
296 temp[i + 1] = _sel[i];
297 if (weighted)
298 {
299 tempW[i + 1] = _weights[i];
300 }
301 i++;
302 }
303}
304
305NamedSelection::NamedSelection(const char* name, const SelInfo* points, int nPoints, const VertexIndex* faces,
306 int nFaces)

Callers 15

GroundCollisionMethod · 0.45
DiscloseMethod · 0.45
IsInsideMethod · 0.45
Simul.cppFile · 0.45
AUTO_STATIC_ARRAYFunction · 0.45
AddNamedSelMethod · 0.45
InitMethod · 0.45
SetPropertyMethod · 0.45
NewBoneMethod · 0.45
AddSelectionMethod · 0.45
LoadMethod · 0.45
Fireplace.cppFile · 0.45

Calls 1

SizeMethod · 0.45

Tested by

no test coverage detected