NewtonBodySetMatrix

From Newton Wiki
Jump to: navigation, search

NewtonBodySetMatrix

void NewtonBodySetMatrix( const NewtonBody* bodyPtr, const dFloat* matrixPtr)

Usage

Set the transformation matrix of a rigid body.

Parameters

  • 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.

Return

  • Nothing.

Description

Sets the matrix (determining translation, rotation) of the body.

Remarks

  • DO NOT use this function to scale objects, the result of scaling this way is undefined and unsupported. If you want to scale objects use NewtonCreateConvexHullModifier and NewtonConvexHullModifierSetMatrix.
  • There is no need to transpose or modify matrix in any way if it comes from DirectX or OpenGL. The in-memory representation is same for both graphical libraries and it will work with newton directly.

See also

NewtonBodyGetMatrix NewtonBodySetMatrixRecursive