#ifndef IPHYSICS_BALL_SOCKET_JOINT
#define IPHYSICS_BALL_SOCKET_JOINT

#include "PhysicsGlobal.h"
#include "SPhysicsStructs.h"
#include "IPhysicsJoint.h"

class CPhysicsBallSocket : public IPhysicsJoint
{
public:
	CPhysicsBallSocket();
	~CPhysicsBallSocket();

	void init(NewtonWorld* world, SPhysicsBallSocketJoint* jnt);
	void changeJointLimits(vector3df pin, f32 maxConeAngle, f32 maxTwistAngle);
	void setUserCallback(NewtonBallCallBack callback);

	vector3df getForce();
	vector3df getAngle();
	vector3df getOmega();
	NewtonJoint* getJoint();

private:
	static void _cdecl ballCallback(const NewtonJoint* ball);

	static vector3df m_breakForce;
};

#endif