MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / release

Method release

physx/source/scenequery/src/SqPruningStructure.cpp:99–125  ·  view source on GitHub ↗

/////////////////////////////////////////////////////////////////////

Source from the content-addressed store, hash-verified

97
98//////////////////////////////////////////////////////////////////////////
99void PruningStructure::release()
100{
101 // if we release the pruning structure we set the pruner structure to NUUL
102 for (PxU32 i = 0; i < mNbActors; i++)
103 {
104 PX_ASSERT(mActors[i]);
105
106 PxType type = mActors[i]->getConcreteType();
107 if (type == PxConcreteType::eRIGID_STATIC)
108 {
109 static_cast<NpRigidStatic*>(mActors[i])->getShapeManager().setPruningStructure(NULL);
110 }
111 else if (type == PxConcreteType::eRIGID_DYNAMIC)
112 {
113 static_cast<NpRigidDynamic*>(mActors[i])->getShapeManager().setPruningStructure(NULL);
114 }
115 }
116
117 if(getBaseFlags() & PxBaseFlag::eOWNS_MEMORY)
118 {
119 delete this;
120 }
121 else
122 {
123 this->~PruningStructure();
124 }
125}
126
127template <typename ActorType>
128static void getShapeBounds(PxRigidActor* actor, bool dynamic, PxBounds3* bounds, PxU32& numShapes)

Callers

nothing calls this directly

Calls 3

~PruningStructureMethod · 0.95
getShapeManagerMethod · 0.80
getConcreteTypeMethod · 0.45

Tested by

no test coverage detected