NewtonJoint* NewtonConstraintCreateUserJoint (const NewtonWorld* newtonWorld, int maxDOF, NewtonUserBilateralCallBack callback, NewtonUserBilateralGetInfoCallBack getInfo, const NewtonBody* childBody, const NewtonBody* parentBody) ;
Create a user define bilateral joint.
- const NewtonWorld *newtonWorld - is the pointer to the Newton world.
- int maxDOF - is the maximum number of degree of freedom controlled by this joint.
- NewtonUserBilateralCallBack callback - pointer to the joint function call back.
- NewtonUserBilateralGetInfoCallBack getInfo - retrieves information about the joint.
- const NewtonBody *childBody - is the pointer to the attached rigid body, this body can not be NULL or it can not have an infinity (zero) mass.
- const NewtonBody *parentBody - is the pointer to the parent rigid body, this body can be NULL or any kind of rigid body.
- Bilateral joint are constraints that can have up to 6 degree of freedoms, 3 linear and 3 angular. By restricting the motion along any number of these degree of freedom a very large number of useful joint between two rigid bodies can be accomplished. Some of the degree of freedoms restriction makes no sense, and also some combinations are so rare that only make sense to a very specific application, the Newton engine implements the more commons combinations like, hinges, ball and socket, etc. However if and application is in the situation that any of the provided joints can achieve the desired effect, then the application can design it own joint.
- User defined joint is a very advance feature that should be look at, only for very especial situations. The designer must be a person with a very good understanding of constrained dynamics, and it may be the case that many trial have to be made before a good result can be accomplished.
- maxDOF is and upper bound as to how many degrees of freedoms the joint can control, usually this value can be 6 for bilateral joints, but it can be higher for special joints like vehicles where by the used of friction clamping the number of rows can be higher. In general the application should determine maxDof correctly, passing an unnecessary excessive value will lead to performance decreased.