SliderJoint Class Reference

#include <Joints.h>

Inherits Joint.

Collaboration diagram for SliderJoint:

List of all members.


Public Member Functions

 SliderJoint ()
virtual ~SliderJoint ()
void setAxis (float axisX, float axisY, float axisZ)
void setPositions (float min, float max)
virtual void getMemberValue (std::string type, void *result)
virtual void setMemberValue (std::string type, void *source)

Protected Member Functions

virtual void attachJoint (dBodyID obj1, dBodyID obj2)
virtual void detachJoint ()

Protected Attributes

gmtl::Vec3f axis
float minPos
float maxPos
float deltaPos
bool posSet

Detailed Description

This class represents a slider joint, which is like the piston of a hydraulic cylinder. It can be defined by setting the axis of movement. There is also the option to set the maximum and minimum position of the joint.

Constructor & Destructor Documentation

SliderJoint::SliderJoint (  ) 

virtual SliderJoint::~SliderJoint (  )  [inline, virtual]


Member Function Documentation

void SliderJoint::attachJoint ( dBodyID  obj1,
dBodyID  obj2 
) [protected, virtual]

This method is called if the joint should be attached. It creates the ODE-joint, calculates the current axis-orientation and attaches the Joint.

Parameters:
obj1 first ODE-object to attach with
obj2 second ODE-object to attach with

Implements Joint.

void SliderJoint::detachJoint (  )  [protected, virtual]

This method is called if the joint should be detached. If the maximum and minimum positions are set the method stores the position-offset for correct positions in later use.

Implements Joint.

void SliderJoint::getMemberValue ( std::string  type,
void *  result 
) [virtual]

This method copies the value of the field with the passed name to the result-pointer. It is a little helper to avoid type-casts when accessing joint-pointers.

Parameters:
type name of the field
result destination where the value should be stored

Implements Joint.

void SliderJoint::setAxis ( float  axisX,
float  axisY,
float  axisZ 
)

This method sets the Axis of the Joint in OBJECT-COORDINATES!!! This means that the axis is rotated by the rotation-value of the main EntityTransform.

Parameters:
axisX X-value of the Axis
axisY Y-value of the Axis
axisZ Z-value of the Axis

void SliderJoint::setMemberValue ( std::string  type,
void *  source 
) [virtual]

Implements Joint.

void SliderJoint::setPositions ( float  min,
float  max 
)

This method sets the minimum and maximum position of the Joint.

Parameters:
min minimum position of the Joint
max maximum position of the Joint


Member Data Documentation

gmtl::Vec3f SliderJoint::axis [protected]

float SliderJoint::deltaPos [protected]

float SliderJoint::maxPos [protected]

float SliderJoint::minPos [protected]

bool SliderJoint::posSet [protected]


The documentation for this class was generated from the following files:

Generated on Wed Oct 20 16:12:00 2010 for inVRs by doxygen 1.5.8