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

Function canDoCCD

physx/source/physxextensions/src/ExtRaycastCCD.cpp:196–210  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194}
195
196static PxRigidDynamic* canDoCCD(PxRigidActor& actor, PxShape* /*shape*/)
197{
198 if(actor.getConcreteType()!=PxConcreteType::eRIGID_DYNAMIC)
199 return NULL; // PT: no need to do it for statics
200 PxRigidDynamic* dyna = static_cast<PxRigidDynamic*>(&actor);
201
202 const PxU32 nbShapes = dyna->getNbShapes();
203 if(nbShapes!=1)
204 return NULL; // PT: only works with simple actors for now
205
206 if(dyna->getRigidBodyFlags() & PxRigidBodyFlag::eKINEMATIC)
207 return NULL; // PT: no need to do it for kinematics
208
209 return dyna;
210}
211
212static bool doRaycastCCD(PxScene* scene, const RaycastCCDManagerInternal::CCDObject& object, PxTransform& newPose, PxVec3& newShapeCenter, bool dyna_dyna)
213{

Callers 1

doRaycastCCDFunction · 0.70

Calls 3

getRigidBodyFlagsMethod · 0.80
getConcreteTypeMethod · 0.45
getNbShapesMethod · 0.45

Tested by

no test coverage detected