NewtonBodySetTransformCallback

From Newton Wiki
Revision as of 08:02, 10 June 2019 by WikiSysop (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NewtonBodySetTransformCallback

void NewtonBodySetTransformCallback( const NewtonBody* bodyPtr, NewtonSetTransform callback)

Usage

Assign a transformation event function to the body.

Parameters

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

Return

  • Nothing.

Remarks

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

See also

NewtonBodyGetUserData NewtonBodyGetUserData