NewtonUserJointAddAngularRow

From Newton Wiki
Jump to: navigation, search

NewtonUserJointAddAngularRow

void NewtonUserJointAddAngularRow( const NewtonJoint* joint, dFloat relativeAngleError, const dFloat *pin)

Usage

Add an angular restricted degree of freedom.

Parameters

  • const NewtonJoint *joint - pointer to the joint.
  • dFloat relativeAngleError - relative angle error between both bodies around pin axis.
  • const dFloat *pin - pointer of a unit vector in global space along which the relative position, velocity and acceleration between the bodies will be driven to zero.
  • Remark
  • An angular contraint row calculates the Jacobian derivatives and relative acceleration required to enforce the constraint condition at pin direction considered fixed to both bodies.
  • Remark
  • The acceleration is calculated such that the relative angular motion between the two points is zero, The application can afterward override this value to create motors.
  • Remark
  • After this function is called and internal DOF index will point to the current row entry in the constraint matrix.
  • Remark
  • This function call only be called from inside a NewtonUserBilateralCallBack callback.
  • Remark
  • This function is of not practical to enforce hard constraints, but it is very useful for making angular motors.

See also

NewtonUserJointAddLinearRow NewtonUserJointAddIndependentAngularRow