BallJoint Class Reference

#include <Joints.h>

Inherits Joint.

Collaboration diagram for BallJoint:

List of all members.


Public Member Functions

 BallJoint ()
virtual ~BallJoint ()
void setAnchor (float anchorX, float anchorY, float anchorZ)
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 anchor

Detailed Description

This class represents a ball joint, which is simply fixed connection in one point where the rotation around this point is not limited. It can be defined by an Anchor-point.

Constructor & Destructor Documentation

BallJoint::BallJoint (  ) 

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


Member Function Documentation

void BallJoint::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 anchor-position and attaches the Joint.

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

Implements Joint.

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

This method is called if the joint should be detached.

Implements Joint.

void BallJoint::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 BallJoint::setAnchor ( float  anchorX,
float  anchorY,
float  anchorZ 
)

This method sets the Anchor of the Joint in OBJECT-COORDINATES!!! This means that the Anchor is relative to the position of the main EntityTransform. Take care that the Anchor-offset is also scaled by the scale-Value of the EntityTransform. The reason for using object coordinates is because modelers can easily read the offset out of the modelling application.

Parameters:
anchorX X-position of the Anchor
anchorY Y-position of the Anchor
anchorZ Z-position of the Anchor

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

Implements Joint.


Member Data Documentation

gmtl::Vec3f BallJoint::anchor [protected]


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

Generated on Wed Oct 20 16:11:54 2010 for inVRs by doxygen 1.5.8