#include "MyCustomBallSocket.h"

// constructor.  we must pass the 2 bodies (2nd can be NULL), also the max DOF for the joint, up to 6.
MyCustomBallSocket::MyCustomBallSocket( OgreNewt::Body* child, OgreNewt::Body* parent, Ogre::Vector3 point) 
	: OgreNewt::BallAndSocket( child, parent, point )
{
	// init our variables to keep track of the joint, so we get the joint orientation in local orientation of the bodies.
}


MyCustomBallSocket::~MyCustomBallSocket()
{
}

// the important function that applies the joint.
void MyCustomBallSocket::submitConstraint(Ogre::Real timestep, int threadindex)
{
	// do some custom here!!

	// find the global orientation of the joint relative to the 2 bodies.
}

