From Newton Wiki
Jump to: navigation, search


void NewtonBodyGetCentreOfMass (const NewtonBody* const body, dFloat* const com)


Get the relative position of the center of mass of a rigid body.


  • const NewtonBody* const body
  • dFloat* const com


  • (Procedure)


  • This function can be used to set the relative offset of the center of mass of a rigid body.
  • when a rigid body is created the center of mass is set the the point c(0, 0, 0), and normally this is
  • the best setting for a rigid body. However the are situations in which and object does not have symmetry or
  • simple some kind of special effect is desired, and this origin need to be changed.
  • This function can be used in conjunction with *NewtonConvexCollisionCalculateInertialMatrix*

See also

NewtonConvexCollisionCalculateInertialMatrix NewtonBodySetCentreOfMass