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

Method getShapeManager

physx/source/physx/src/NpActor.cpp:375–392  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

373///////////////////////////////////////////////////////////////////////////////
374
375NpShapeManager* NpActor::getShapeManager(PxRigidActor& actor)
376{
377 // DS: if the performance here becomes an issue we can use the same kind of offset hack as below
378
379 const PxType actorType = actor.getConcreteType();
380
381 if (actorType == PxConcreteType::eRIGID_DYNAMIC)
382 return &static_cast<NpRigidDynamic&>(actor).getShapeManager();
383 else if(actorType == PxConcreteType::eRIGID_STATIC)
384 return &static_cast<NpRigidStatic&>(actor).getShapeManager();
385 else if (actorType == PxConcreteType::eARTICULATION_LINK)
386 return &static_cast<NpArticulationLink&>(actor).getShapeManager();
387 else
388 {
389 PX_ASSERT(0);
390 return NULL;
391 }
392}
393
394const NpShapeManager* NpActor::getShapeManager(const PxRigidActor& actor)
395{

Callers 15

addActorMethod · 0.80
NpScene.cppFile · 0.80
addActorTFunction · 0.80
removeActorTFunction · 0.80
addCollectionMethod · 0.80
releaseActorTFunction · 0.80
releaseMethod · 0.80

Calls 1

getConcreteTypeMethod · 0.45

Tested by

no test coverage detected