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

Method setLinearVelocity

physx/source/physx/src/NpRigidDynamic.cpp:214–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212
213
214void NpRigidDynamic::setLinearVelocity(const PxVec3& velocity, bool autowake)
215{
216 NP_WRITE_CHECK(NpActor::getOwnerScene(*this));
217 PX_CHECK_AND_RETURN(velocity.isFinite(), "PxRigidDynamic::setLinearVelocity: velocity is not valid.");
218 PX_CHECK_AND_RETURN(!(getScbBodyFast().getFlags() & PxRigidBodyFlag::eKINEMATIC), "PxRigidDynamic::setLinearVelocity: Body must be non-kinematic!");
219 PX_CHECK_AND_RETURN(!(getScbBodyFast().getActorFlags() & PxActorFlag::eDISABLE_SIMULATION), "PxRigidDynamic::setLinearVelocity: Not allowed if PxActorFlag::eDISABLE_SIMULATION is set!");
220
221 Scb::Body& b = getScbBodyFast();
222 b.setLinearVelocity(velocity);
223
224 NpScene* scene = NpActor::getAPIScene(*this);
225 if(scene)
226 wakeUpInternalNoKinematicTest(b, (!velocity.isZero()), autowake);
227}
228
229
230void NpRigidDynamic::setAngularVelocity(const PxVec3& velocity, bool autowake)

Callers 15

initSceneFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
stepPhysicsFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45
createDynamicFunction · 0.45

Calls 4

isFiniteMethod · 0.45
getFlagsMethod · 0.45
getActorFlagsMethod · 0.45
isZeroMethod · 0.45

Tested by

no test coverage detected