#ifndef CPHYSICS_SLIDER_H
#define CPHYSICS_SLIDER_H

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

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

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

	f32 getJointAngle();
	f32 getJointVelocity();
	vector3df getForce();

private:
	static unsigned  _cdecl sliderCallback(const NewtonJoint* slider, NewtonHingeSliderUpdateDesc* desc);

	static vector3df m_breakForce;
	static f32 m_minSlide;
	static f32 m_maxSlide;

};

#endif