NewtonConstraintCreateBall

From Newton Wiki
Jump to: navigation, search

NewtonConstraintCreateBall

NewtonJoint* NewtonConstraintCreateBall( const NewtonWorld* newtonWorld, const dFloat* pivotPoint, const NewtonBody* childBody, const NewtonBody* parentBody)

Usage

Create a ball an socket joint.

Parameters

  • const NewtonWorld *newtonWorld - is the pointer to the Newton world.
  • const dFloat *pivotPoint - is origin of ball and socket in global space.
  • const NewtonBody *childBody - is the pointer to the attached child rigid body, this body cannot be NULL and can not have an infinite mass (mass = 0).
  • const NewtonBody *parentBody - is the pointer to the attached parent rigid body, this body can be NULL or any kind of rigid body.

Return

  • Pointer to the ball and socket joint.

Remarks

  • This function creates a ball and socket and add it to the world. By default joint disables collision with the linked bodies.

See also