MCPcopy Create free account
hub / github.com/DanielChappuis/reactphysics3d / getRigidBody

Method getRigidBody

src/engine/PhysicsWorld.cpp:1039–1050  ·  view source on GitHub ↗

Return a constant pointer to a given RigidBody of the world * @param index Index of a RigidBody in the world * @return Constant pointer to a given RigidBody */

Source from the content-addressed store, hash-verified

1037 * @return Constant pointer to a given RigidBody
1038 */
1039const RigidBody* PhysicsWorld::getRigidBody(uint32 index) const {
1040
1041 if (index >= getNbRigidBodies()) {
1042
1043 RP3D_LOG(mConfig.worldName, Logger::Level::Error, Logger::Category::World,
1044 "Error when getting rigid body: index is out of bounds", __FILE__, __LINE__);
1045 }
1046
1047 assert(index < mRigidBodies.size());
1048
1049 return mRigidBodies[index];
1050}
1051
1052// Return a pointer to a given RigidBody of the world
1053/**

Callers 7

createIslandsMethod · 0.45
updateSleepingBodiesMethod · 0.45
getBody1Method · 0.45
getBody2Method · 0.45
awakeBodiesMethod · 0.45

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected