vrsode::PhysicsJoint Class Reference

Connection between two Objects. More...

#include <PhysicsJoint.h>

Inheritance diagram for vrsode::PhysicsJoint:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 PhysicsJoint (VRS::SO< PhysicsBody >, VRS::SO< PhysicsBody >)
 ctor.
virtual ~PhysicsJoint ()
 dtor.
const dJointID jointId () const
 get joint id.
VRS::SO< PhysicsBodybodyOne () const
 get first joint body.
VRS::SO< PhysicsBodybodyTwo () const
 get second joint body.
virtual void setLowStop (double)=0
 set the low stop.
virtual void setHighStop (double)=0
 set high stop value.
virtual void setStopBounce (double)=0
 set stop bounce.
virtual void setMotorVelocity (double)=0
 set motor velocity.
virtual void setMotorMaxForce (double)=0
 set the motors maximum force.
virtual void setCFM (double)=0
 set contraint force mixing value.

Protected Member Functions

void setJointId (dJointID p_jointId)
void setBodyOne (VRS::SO< PhysicsBody >)
void setBodyTwo (VRS::SO< PhysicsBody >)

Private Attributes

dJointID m_jointId
VRS::SO< PhysicsBodym_bodyOne
VRS::SO< PhysicsBodym_bodyTwo
unsigned char m_numMotors

Detailed Description

Connection between two Objects.

Physic Joint is a relationship that is enforced between two bodies so that they can only have certain positions and orientations relative to each other.

Definition at line 18 of file PhysicsJoint.h.


Constructor & Destructor Documentation

vrsode::PhysicsJoint::PhysicsJoint ( VRS::SO< PhysicsBody ,
VRS::SO< PhysicsBody  
)

ctor.

Definition at line 7 of file PhysicsJoint.cpp.

References m_bodyOne, and m_bodyTwo.

vrsode::PhysicsJoint::~PhysicsJoint (  )  [virtual]

dtor.

Definition at line 14 of file PhysicsJoint.cpp.


Member Function Documentation

const dJointID vrsode::PhysicsJoint::jointId (  )  const

get joint id.

get the id if the joint. this is a value ode uses to identify this joint.

Definition at line 20 of file PhysicsJoint.cpp.

References m_jointId.

Referenced by vrsode::PhysicsJointSlider::addForce(), vrsode::PhysicsJointBall::PhysicsJointBall(), vrsode::PhysicsJointHinge::PhysicsJointHinge(), vrsode::PhysicsJointHinge2::PhysicsJointHinge2(), vrsode::PhysicsJointSlider::PhysicsJointSlider(), vrsode::PhysicsJointUniversal::PhysicsJointUniversal(), vrsode::PhysicsJointUniversal::setCFM(), vrsode::PhysicsJointSlider::setCFM(), vrsode::PhysicsJointHinge2::setCFM(), vrsode::PhysicsJointHinge::setCFM(), vrsode::PhysicsJointUniversal::setHighStop(), vrsode::PhysicsJointSlider::setHighStop(), vrsode::PhysicsJointHinge2::setHighStop(), vrsode::PhysicsJointHinge::setHighStop(), vrsode::PhysicsJointUniversal::setLowStop(), vrsode::PhysicsJointSlider::setLowStop(), vrsode::PhysicsJointHinge2::setLowStop(), vrsode::PhysicsJointHinge::setLowStop(), vrsode::PhysicsJointUniversal::setMotorMaxForce(), vrsode::PhysicsJointSlider::setMotorMaxForce(), vrsode::PhysicsJointHinge2::setMotorMaxForce(), vrsode::PhysicsJointHinge::setMotorMaxForce(), vrsode::PhysicsJointUniversal::setMotorVelocity(), vrsode::PhysicsJointSlider::setMotorVelocity(), vrsode::PhysicsJointHinge2::setMotorVelocity(), vrsode::PhysicsJointHinge::setMotorVelocity(), vrsode::PhysicsJointUniversal::setStopBounce(), vrsode::PhysicsJointSlider::setStopBounce(), vrsode::PhysicsJointHinge2::setStopBounce(), vrsode::PhysicsJointHinge::setStopBounce(), vrsode::PhysicsJointBall::~PhysicsJointBall(), vrsode::PhysicsJointHinge::~PhysicsJointHinge(), vrsode::PhysicsJointHinge2::~PhysicsJointHinge2(), vrsode::PhysicsJointSlider::~PhysicsJointSlider(), and vrsode::PhysicsJointUniversal::~PhysicsJointUniversal().

Here is the caller graph for this function:

VRS::SO< PhysicsBody > vrsode::PhysicsJoint::bodyOne (  )  const

get first joint body.

returns the first of two bodies involved in this joint.

Definition at line 32 of file PhysicsJoint.cpp.

References m_bodyOne.

Referenced by vrsode::PhysicsJointBall::PhysicsJointBall(), vrsode::PhysicsJointHinge::PhysicsJointHinge(), vrsode::PhysicsJointHinge2::PhysicsJointHinge2(), vrsode::PhysicsJointSlider::PhysicsJointSlider(), and vrsode::PhysicsJointUniversal::PhysicsJointUniversal().

Here is the caller graph for this function:

VRS::SO< PhysicsBody > vrsode::PhysicsJoint::bodyTwo (  )  const

get second joint body.

returns the second of two bodies involved in this joint.

Definition at line 38 of file PhysicsJoint.cpp.

References m_bodyTwo.

Referenced by vrsode::PhysicsJointBall::PhysicsJointBall(), vrsode::PhysicsJointHinge::PhysicsJointHinge(), vrsode::PhysicsJointHinge2::PhysicsJointHinge2(), vrsode::PhysicsJointSlider::PhysicsJointSlider(), and vrsode::PhysicsJointUniversal::PhysicsJointUniversal().

Here is the caller graph for this function:

virtual void vrsode::PhysicsJoint::setLowStop ( double   )  [pure virtual]

set the low stop.

this function sets the low stop of this join. you can see this as a additional movement constraint for the object connected. the parameter is given relative to the initial position of the joint connection.

sample with slider join: if you place one object at 0,0,0 and one at 0,10,0 set the slider vector to 0,1,0 a low stop value of -6 mean that one object can move 6 units in direction of the other object.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

virtual void vrsode::PhysicsJoint::setHighStop ( double   )  [pure virtual]

set high stop value.

see setLowStop for explaination.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

virtual void vrsode::PhysicsJoint::setStopBounce ( double   )  [pure virtual]

set stop bounce.

this sets the bouncyness of the given stops. this must be an value between 0 and 1.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

virtual void vrsode::PhysicsJoint::setMotorVelocity ( double   )  [pure virtual]

set motor velocity.

sets the desired motor velocity.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

virtual void vrsode::PhysicsJoint::setMotorMaxForce ( double   )  [pure virtual]

set the motors maximum force.

set the max force that is allowed to be applied to reach the desired motor velocity.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

virtual void vrsode::PhysicsJoint::setCFM ( double   )  [pure virtual]

set contraint force mixing value.

Implemented in vrsode::PhysicsJointBall, vrsode::PhysicsJointHinge, vrsode::PhysicsJointHinge2, vrsode::PhysicsJointSlider, and vrsode::PhysicsJointUniversal.

void vrsode::PhysicsJoint::setJointId ( dJointID  p_jointId  )  [protected]

Definition at line 26 of file PhysicsJoint.cpp.

References m_jointId.

Referenced by vrsode::PhysicsJointBall::PhysicsJointBall(), vrsode::PhysicsJointHinge::PhysicsJointHinge(), vrsode::PhysicsJointHinge2::PhysicsJointHinge2(), vrsode::PhysicsJointSlider::PhysicsJointSlider(), and vrsode::PhysicsJointUniversal::PhysicsJointUniversal().

Here is the caller graph for this function:

void vrsode::PhysicsJoint::setBodyOne ( VRS::SO< PhysicsBody  )  [protected]

Definition at line 44 of file PhysicsJoint.cpp.

References m_bodyOne.

void vrsode::PhysicsJoint::setBodyTwo ( VRS::SO< PhysicsBody  )  [protected]

Definition at line 50 of file PhysicsJoint.cpp.

References m_bodyTwo.


Member Data Documentation

dJointID vrsode::PhysicsJoint::m_jointId [private]

Definition at line 20 of file PhysicsJoint.h.

Referenced by jointId(), and setJointId().

VRS::SO<PhysicsBody> vrsode::PhysicsJoint::m_bodyOne [private]

Definition at line 21 of file PhysicsJoint.h.

Referenced by bodyOne(), PhysicsJoint(), and setBodyOne().

VRS::SO<PhysicsBody> vrsode::PhysicsJoint::m_bodyTwo [private]

Definition at line 22 of file PhysicsJoint.h.

Referenced by bodyTwo(), PhysicsJoint(), and setBodyTwo().

unsigned char vrsode::PhysicsJoint::m_numMotors [private]

Definition at line 24 of file PhysicsJoint.h.


The documentation for this class was generated from the following files:
Generated on Fri May 11 21:02:16 2007 for Random Racer by  doxygen 1.5.1