From Newton Wiki
Jump to: navigation, search


typedef void (_cdecl *NewtonUserBilateralCallBack) (const NewtonJoint* joint );


This is called whenever custom joint is about to be updated. You can set all the joint's custom constraints in here.

Simple example:

  // my callback
  unsigned MyCustomJointCallback( const NewtonJoint* joint  )
       unsigned retCode = 0;
       // perform all custom joint actions here, see SDK samples
       return retCode;
            . . .
  // creating custom joint
  NewtonJoint *nJoint;
  nJoint = NewtonConstraintCreateUserJoint( nWorld, maxDOF, MyCustomJointCallback, nBody0, nBody1 ); 

            . . .

See also:

NewtonConstraintCreateUserJoint, NewtonUserJointAddLinearRow, NewtonUserJointAddAngularRow, NewtonUserJointAddGeneralRow