#ifndef CPHYSICS_UNIVERSAL_H
#define CPHYSICS_UNIVERSAL_H

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

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

	void init(NewtonWorld* world, SPhysicsUniversalJoint* jnt);
	void setUserCallback(NewtonSliderCallBack callback);

	f32 getJointAngle();
	f32 getJointAngle2();
	f32 getJointOmega();
	f32 getJointOmega2();
	vector3df getForce();

private:
	static unsigned _cdecl universalCallback(const NewtonJoint* universal, NewtonHingeSliderUpdateDesc* desc);

	static vector3df m_breakForce;
};

#endif