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

Method buildPolyList

Engine/source/T3D/shapeBase.cpp:2691–2728  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2689//----------------------------------------------------------------------------
2690
2691bool ShapeBase::buildPolyList(PolyListContext context, AbstractPolyList* polyList, const Box3F &, const SphereF &)
2692{
2693 if ( !mShapeInstance )
2694 return false;
2695
2696 polyList->setTransform(&mObjToWorld, mObjScale);
2697 polyList->setObject(this);
2698
2699 if ( context == PLC_Selection )
2700 {
2701 mShapeInstance->animate();
2702 mShapeInstance->buildPolyList(polyList,mShapeInstance->getCurrentDetail());
2703 return true;
2704 }
2705 else if ( context == PLC_Export )
2706 {
2707 // Try to call on the client so we can export materials
2708 ShapeBase* exportObj = this;
2709 if ( isServerObject() && getClientObject() )
2710 exportObj = dynamic_cast<ShapeBase*>(getClientObject());
2711
2712 S32 dl = 0;
2713 exportObj->mShapeInstance->animate();
2714 exportObj->mShapeInstance->buildPolyList(polyList, dl);
2715 return true;
2716 }
2717 else
2718 {
2719 bool ret = false;
2720 for (U32 i = 0; i < mDataBlock->collisionDetails.size(); i++)
2721 {
2722 mShapeInstance->buildPolyList(polyList,mDataBlock->collisionDetails[i]);
2723 ret = true;
2724 }
2725
2726 return ret;
2727 }
2728}
2729
2730void ShapeBase::buildConvex(const Box3F& box, Convex* convex)
2731{

Callers 2

shapeBase.cppFile · 0.45
getPolyListMethod · 0.45

Calls 5

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

Tested by

no test coverage detected