But what is dGrammSchmidt(dVector(0.0f, -1.0f, 0.0f, 0.0f))?
I am not that brushed up in maths, but this creates not a rotation matrix but a matrix containing a coordinate system (ie. the upper three rows are axis vectors)? with the first axis specified in the first three components of the dVector as the pin axis?
yes that is correct, dGrammSchmidt is a simple orthonormalization process that allows to make coordinate system out of a set of vector.
In general all joints in the dCustom joint library use a standard inoput parameters.
a matrix that specify the joint axis, and the pivot of the joint axis.
in you example a ballandsocket joint need three axis of rotation, and a pivot, so all member of the matrix are4 used.
a hinge for example, is a joint that only used one axis of rotation and a pivot, for this
the first row of the matrix is the pivot and the position is the pivot,
similarly a joint that uses two axis then first and second row at joint pin and so on and so forth.
so joint have alternate constructors, like a ball an socket may take two joint parameter in the local space for the two related bodies.
these constructor as handy for case like the one misho is saying, say you want to save a contraction,
of joint then you want to load them at a later time, by some object may come out of order like he say, so there will be a small gap at the joint.
however by using the constructor that take two matrices, then when the joint is created, the solve will eliminate the error introduced by the lag
Misho has you try that? it may solve the problem.