NewtonJoint* NewtonConstraintCreateUniversal( const NewtonWorld* newtonWorld, const dFloat* pivotPoint, const dFloat* pinDir0, const dFloat* pinDir1, const NewtonBody* childBody, const NewtonBody* parentBody)
Create a universal joint.
- const NewtonWorld *newtonWorld - is the pointer to the Newton world.
- const dFloat *pivotPoint - is the origin of the universal joint in global space.
- const dFloat *pinDir0 - first axis of rotation fixed on childBody body and perpendicular to pinDir1.
- const dFloat *pinDir1 - second axis of rotation fixed on parentBody body and perpendicular to pinDir0.
- const NewtonBody *childBody - is the pointer to the attached rigid body, this body cannot be NULL and cannot have an infinite (zero) mass.
- const NewtonBody *parentBody - is the pointer to the parent rigid body, this body can be NULL and can be any kind of rigid body.
- Pointer to the universal joint.
- This function creates a universal joint and add it to the world. By default joint disables collision with the linked bodies.
- a universal joint is a constraint that restricts twp rigid bodies to be connected to a point fixed on both bodies, while and allowing one body to spin around a fix axis in is own frame, and the other body to spin around another axis fixes on it own frame. Both axis must be mutually perpendicular.
- Some information about user joints can be found on this thread http://www.newtondynamics.com/forum/viewtopic.php?t=1860