void NewtonBodySetMatrixRecursive( const NewtonBody* bodyPtr, const dFloat* matrixPtr)
Apply hierarchical transformation to a body.
- const NewtonWorld *newtonWorld - pointer to the Newton world.
- const NewtonBody *bodyPtr - pointer to the body.
- const dFloat *matrixPtr - pointer to an array of 16 floats containing the global matrix of the rigid body.
- This function applies the transformation matrix to the body and also applies the appropriate transformation matrix to set of articulated bodies. If the body is in contact with another body the other body is not transformed.
- This funtion should not be used to transform set of articulated bodies that are connected to a static body. doing so will result in unpredictable results. Think for example moving a chain attached to a ceiling from one place to another, to do that in real life a person first need to desconect the chain (destroy the joint), move the chain (apply the tranfomation to the entire chain), the reconect it in the new position (recreate the joint again).
- This function will set to zero the linear and angular velocity of all bodies that are part of the set of articulated body array.
- The matrix should be arranged in row-major order (this is the way directX stores matrices). If you are using OpenGL matrices (column-major) you will need to transpose you matrices into a local array, before passing them to Newton.