Show DopeJointSubtypes.h syntax highlighted
#ifndef __DOPE_JOINTSUBTYPES_H__
#define __DOPE_JOINTSUBTYPES_H__
#include "DopePrerequisites.h"
#include "DopeJoint.h"
namespace Dope {
/** Implementation of ball joint. */
class BallJoint : public Joint
{
public:
BallJoint(Joint::JointType jtype, Entidad* obj1, Entidad* obj2);
~BallJoint() {}
/** Set the anchor point of this joint.
@remarks
Sets the location, in world space, of the anchor point of this joint, which can be
the hinge point or just the origin of joint.
*/
void setAnchorPosition(const Vector3& point);
/** Sets the axes for this joint.
@remarks
Has no meaning for this type of joint, so does nothing.
*/
void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO) {}
protected:
};
/** Implementation of slider joint. */
class SliderJoint : public Joint
{
public:
SliderJoint(Joint::JointType jtype, Entidad* obj1, Entidad* obj2);
~SliderJoint() {}
/** Set the anchor point of this joint.
@remarks
Has no meaning for a slider, thus unimplemented.
*/
void setAnchorPosition(const Vector3& point) {}
/** Sets the axes for this joint.
@remarks
The meaning of axes for a joint depends on it's type:
<ul>
<li>For JT_BALL, it has no meaning and you don't need to call it.</li>
<li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
<li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
<li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
</ul>
*/
void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
protected:
};
/** Implementation of hinge joint. */
class HingeJoint : public Joint
{
public:
HingeJoint(Joint::JointType jtype, Entidad* obj1, Entidad* obj2);
~HingeJoint() {}
/** Set the anchor point of this joint.
*/
void setAnchorPosition(const Vector3& point);
/** Sets the axes for this joint.
@remarks
The meaning of axes for a joint depends on it's type:
<ul>
<li>For JT_BALL, it has no meaning and you don't need to call it.</li>
<li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
<li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
<li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
</ul>
*/
void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
protected:
};
/** Implementation of universal joint. */
class UniversalJoint : public Joint
{
public:
UniversalJoint(Joint::JointType jtype, Entidad* obj1, Entidad* obj2);
~UniversalJoint() {}
/** Set the anchor point of this joint.
*/
void setAnchorPosition(const Vector3& point);
/** Sets the axes for this joint.
@remarks
The meaning of axes for a joint depends on it's type:
<ul>
<li>For JT_BALL, it has no meaning and you don't need to call it.</li>
<li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
<li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
<li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
</ul>
*/
void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
protected:
};
/** Implementation of hinge2 joint. */
class Hinge2Joint : public Joint
{
public:
Hinge2Joint(Joint::JointType jtype, Entidad* obj1, Entidad* obj2);
~Hinge2Joint() {}
/** Set the anchor point of this joint.
*/
void setAnchorPosition(const Vector3& point);
/** Sets the axes for this joint.
@remarks
The meaning of axes for a joint depends on it's type:
<ul>
<li>For JT_BALL, it has no meaning and you don't need to call it.</li>
<li>For JT_SLIDER, only one is applicable and it's the axis along which the slide occurs. </li>
<li>For JT_HINGE, only one is applicable and it's the hinge axis. </li>
<li>For JT_UNIVERSAL, and JT_HINGE2 it's the 2 hinge axes.</li>
</ul>
*/
void setAxes(const Vector3& primaryAxis, const Vector3& secondaryAxis = Vector3::ZERO);
protected:
};
}
#endif
See more files for this project here