MCPcopy Create free account
hub / github.com/RavEngine/RavEngine / checkArticulationLink

Function checkArticulationLink

deps/physx/physx/source/physx/src/NpScene.cpp:835–854  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

833}
834
835static void checkArticulationLink(NpScene* scene, NpArticulationLink* link)
836{
837#if PX_CHECKED
838 scene->checkPositionSanity(*link, link->getGlobalPose(), "PxScene::addArticulation or PxScene::addAggregate");
839#else
840 PX_UNUSED(scene);
841#endif
842 if(link->getMass()==0.0f)
843 {
844 Ps::getFoundation().error(PxErrorCode::eDEBUG_WARNING, __FILE__, __LINE__, "PxScene::addArticulation(): Articulation link with zero mass added to scene; defaulting mass to 1");
845 link->setMass(1.0f);
846 }
847
848 const PxVec3 inertia0 = link->getMassSpaceInertiaTensor();
849 if(inertia0.x == 0.0f || inertia0.y == 0.0f || inertia0.z == 0.0f)
850 {
851 Ps::getFoundation().error(PxErrorCode::eDEBUG_WARNING, __FILE__, __LINE__, "PxScene::addArticulation(): Articulation link with zero moment of inertia added to scene; defaulting inertia to (1,1,1)");
852 link->setMassSpaceInertiaTensor(PxVec3(1.0f, 1.0f, 1.0f));
853 }
854}
855
856void NpScene::addArticulationInternal(PxArticulationBase& npa)
857{

Callers 1

Calls 9

PX_UNUSEDFunction · 0.85
checkPositionSanityMethod · 0.80
PxVec3Class · 0.50
getGlobalPoseMethod · 0.45
getMassMethod · 0.45
errorMethod · 0.45
setMassMethod · 0.45

Tested by

no test coverage detected