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

Method buildPolyList

Engine/source/T3D/shapeBase.cpp:2842–2879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2840//----------------------------------------------------------------------------
2841
2842bool ShapeBase::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &, const SphereF &)
2843{
2844 if ( !mShapeInstance )
2845 return false;
2846
2847 polyList->setTransform(&mObjToWorld, mObjScale);
2848 polyList->setObject(this);
2849
2850 if ( context == PLC_Selection )
2851 {
2852 mShapeInstance->animate();
2853 mShapeInstance->buildPolyList(polyList,mShapeInstance->getCurrentDetail());
2854 return true;
2855 }
2856 else if ( context == PLC_Export )
2857 {
2858 // Try to call on the client so we can export materials
2859 ShapeBase* exportObj = this;
2860 if ( isServerObject() && getClientObject() )
2861 exportObj = dynamic_cast<ShapeBase*>(getClientObject());
2862
2863 S32 dl = 0;
2864 exportObj->mShapeInstance->animate();
2865 exportObj->mShapeInstance->buildPolyList(polyList, dl);
2866 return true;
2867 }
2868 else
2869 {
2870 bool ret = false;
2871 for (U32 i = 0; i < mDataBlock->collisionDetails.size(); i++)
2872 {
2873 mShapeInstance->buildPolyList(polyList,mDataBlock->collisionDetails[i]);
2874 ret = true;
2875 }
2876
2877 return ret;
2878 }
2879}
2880
2881void ShapeBase::buildConvex(const Box3F& box, Convex* convex)
2882{

Callers 2

shapeBase.cppFile · 0.45
getPolyListMethod · 0.45

Calls 6

getCurrentDetailMethod · 0.80
getClientObjectFunction · 0.50
setTransformMethod · 0.45
setObjectMethod · 0.45
animateMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected