MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / computePolyCount

Method computePolyCount

Engine/source/ts/tsPartInstance.cpp:367–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

365}
366
367void TSPartInstance::computePolyCount()
368{
369 if (!mSizeCutoffs)
370 mNumDetails = mSourceShape->getShape()->mSmallestVisibleDL+1;
371
372 delete [] mPolyCount;
373 mPolyCount = new S32[mNumDetails];
374
375 for (S32 i=0; i<mNumDetails; i++)
376 {
377 mPolyCount[i] = 0;
378 for (S32 j=0; j<mMeshObjects.size(); j++)
379 {
380 if (mMeshObjects[j]->getMesh(i))
381 mPolyCount[i] += mMeshObjects[j]->getMesh(i)->getNumPolys();
382 }
383 }
384}
385
386

Callers

nothing calls this directly

Calls 4

getShapeMethod · 0.45
sizeMethod · 0.45
getMeshMethod · 0.45
getNumPolysMethod · 0.45

Tested by

no test coverage detected