NewtonHingeSetUserCallback

From Newton Wiki
Jump to: navigation, search

NewtonHingeSetUserCallback

void NewtonHingeSetUserCallback( const NewtonJoint* Hinge, NewtonHingeCallBack callback)

Usage

Set an update call back to be called when either of the two body linked by the joint is active.

Parameters

  • const NewtonJoint *Hinge - pointer to the joint.
  • NewtonHingeCallBack callback - pointer to the joint function call back.

Return

  • nothing.

Remarks

  • if the application wants to have some feedback from the joint simulation, the application can register a function update callback to be call every time any of the bodies linked by this joint is active. This is useful to provide special effects like particles, sound or even to simulate breakable moving parts.

See also

NewtonJointGetUserData NewtonJointSetUserData