void NewtonBodySetTransformCallback( const NewtonBody* bodyPtr, NewtonSetTransform callback)
Assign a transformation event function to the body.
- const NewtonBody *bodyPtr - pointer to the body.
- NewtonSetTransform callback - pointer to a function callback in used to update the transformation matrix of the visual object that represents the rigid body.
- The function NewtonSetTransform callback is called by the Newton engine every time a visual object that represents the rigid body has changed. The application can obtain the pointer user data value that points to the visual object. The Newton engine does not call the NewtonSetTransform callback function for bodies that are inactive or have reached a state of stable equilibrium.
- The matrix should be organized in row-major order (this is the way directX stores matrices). If you are using OpenGL matrices (column-major) you will need to transpose the matrices into a local array, before you pass them to Newton.