#ifndef CPHYSICS_CORKSCREW_H
#define CPHYSICS_CORKSCREW_H

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

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

	void init(NewtonWorld* world, SPhysicsCorkscrewJoint *jnt);
	void setUserCallback(NewtonSliderCallBack callback);
	
	f32 getHingeAngle();
	f32 getJointAngle();
	f32 getJointVelocity();
	f32 getJointOmega();
	vector3df getForce();

private:
	static unsigned  _cdecl corkscrewCallback(const NewtonJoint* corkscrew, NewtonHingeSliderUpdateDesc* desc);
	
	static vector3df m_breakForce;
	static f32 m_minSlide;
	static f32 m_maxSlide;
};

#endif