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

Method setKinematicTarget

physx/source/physx/src/NpRigidDynamic.cpp:116–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114
115
116void NpRigidDynamic::setKinematicTarget(const PxTransform& destination)
117{
118 PX_CHECK_AND_RETURN(destination.isSane(), "PxRigidDynamic::setKinematicTarget: destination is not valid.");
119 NP_WRITE_CHECK(NpActor::getOwnerScene(*this));
120
121#if PX_CHECKED
122 NpScene* scene = NpActor::getAPIScene(*this);
123 if(scene)
124 scene->checkPositionSanity(*this, destination, "PxRigidDynamic::setKinematicTarget");
125
126 Scb::Body& b = getScbBodyFast();
127 PX_CHECK_AND_RETURN((b.getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setKinematicTarget: Body must be kinematic!");
128 PX_CHECK_AND_RETURN(scene, "PxRigidDynamic::setKinematicTarget: Body must be in a scene!");
129 PX_CHECK_AND_RETURN(!(b.getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setKinematicTarget: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!");
130#endif
131
132 setKinematicTargetInternal(destination.getNormalized());
133}
134
135
136bool NpRigidDynamic::getKinematicTarget(PxTransform& target) const

Callers 11

startNextSubstepFunction · 0.45
updateKinematicsFunction · 0.45
updateStateMethod · 0.45
updateRenderPlatformsMethod · 0.45
moveActorMethod · 0.45
setPosMethod · 0.45
moveMethod · 0.45
preSimMethod · 0.45
pickMoveMethod · 0.45
stepMethod · 0.45

Calls 5

checkPositionSanityMethod · 0.80
isSaneMethod · 0.45
getFlagsMethod · 0.45
getActorFlagsMethod · 0.45
getNormalizedMethod · 0.45

Tested by

no test coverage detected