VirtualPhysics the realtime dynamics simulation library

vpRJoint Class Reference

Revolute joint. More...

#include <vpRJoint.h>

Inheritance diagram for vpRJoint:

vpJoint

List of all members.

Public Member Functions

void SetAxis (const Vec3 &)
void SetAngle (const scalar &)
void SetVelocity (const scalar &)
void SetAcceleration (const scalar &)
void SetTorque (const scalar &)
void AddTorque (const scalar &)
void SetInitialAngle (const scalar &)
void SetElasticity (const scalar &)
void SetDamping (const scalar &)
void SetUpperLimit (const scalar &)
void SetLowerLimit (const scalar &)
void SetRestitution (const scalar &)
Vec3 GetAxis (void) const
scalar GetAngle (void) const
scalar GetVelocity (void) const
scalar GetAcceleration (void) const
scalar GetTorque (void) const
scalar GetInitialAngle (void) const
const scalar & GetElasticity (void) const
const scalar & GetDamping (void) const
scalar GetUpperLimit (void) const
scalar GetLowerLimit (void) const
void DisableUpperLimit (void)
void DisableLowerLimit (void)
bool IsEnabledUpperLimit (void) const
bool IsEnabledLowerLimit (void) const
virtual int GetDOF (void) const
virtual scalar GetNormalForce (void) const
virtual scalar GetNormalTorque (void) const


Detailed Description

vpRJoint is a class to model a revolute joint. Connected bodies can rotate relatively about a rotational axis.
rjoint.gif
Examples:

pendulum.cpp.


Member Function Documentation

VP_INLINE void vpRJoint::SetAxis ( const Vec3 d  ) 

set a rotational axis. The axis is Vec3(0, 0, 1) by default.

Examples:
pendulum.cpp.

VP_INLINE void vpRJoint::SetAngle ( const scalar &  x  ) 

set an angle of the joint variable.

Examples:
pendulum.cpp.

VP_INLINE void vpRJoint::SetVelocity ( const scalar &  x  ) 

set an angular velocity of the joint variable.

VP_INLINE void vpRJoint::SetAcceleration ( const scalar &  x  ) 

set an angular acceleration of the joint variable.

VP_INLINE void vpRJoint::SetTorque ( const scalar &  x  ) 

set a torque of the joint. The torque will be reset after every simulation step

VP_INLINE void vpRJoint::AddTorque ( const scalar &  x  ) 

add a torque to the joint. The torque will be reset after every simulation step

VP_INLINE void vpRJoint::SetInitialAngle ( const scalar &  x  ) 

set an initial angle of the joint variable.

VP_INLINE void vpRJoint::SetElasticity ( const scalar &  x  ) 

set an elasticity of the joint variable.

VP_INLINE void vpRJoint::SetDamping ( const scalar &  x  ) 

set a damping parameter of the joint variable.

VP_INLINE void vpRJoint::SetUpperLimit ( const scalar &  x  ) 

set an upper joint limit.

VP_INLINE void vpRJoint::SetLowerLimit ( const scalar &  x  ) 

set an upper joint limit.

VP_INLINE void vpRJoint::SetRestitution ( const scalar &  e  ) 

set a restitution.

VP_INLINE Vec3 vpRJoint::GetAxis ( void   )  const

get a rotational axis.

VP_INLINE scalar vpRJoint::GetAngle ( void   )  const

get an angle of the joint variable.

VP_INLINE scalar vpRJoint::GetVelocity ( void   )  const

get an anglular velocity of the joint variable.

VP_INLINE scalar vpRJoint::GetAcceleration ( void   )  const

get an anglular acceleration of the joint variable.

VP_INLINE scalar vpRJoint::GetTorque ( void   )  const

get a torque of the joint.

VP_INLINE scalar vpRJoint::GetInitialAngle ( void   )  const

get an initial angle of the joint variable.

VP_INLINE const scalar & vpRJoint::GetElasticity ( void   )  const

get an elasticity of the joint variable.

VP_INLINE const scalar & vpRJoint::GetDamping ( void   )  const

get a damping paramter of the joint variable.

VP_INLINE scalar vpRJoint::GetUpperLimit ( void   )  const

get a upper joint limit.

VP_INLINE scalar vpRJoint::GetLowerLimit ( void   )  const

get an lower joint limit.

VP_INLINE void vpRJoint::DisableUpperLimit ( void   ) 

disable upper joint limit.

VP_INLINE void vpRJoint::DisableLowerLimit ( void   ) 

disable lower joint limit.

VP_INLINE bool vpRJoint::IsEnabledUpperLimit ( void   )  const

return whether this joint is set to have upper limit

VP_INLINE bool vpRJoint::IsEnabledLowerLimit ( void   )  const

return whether this joint is set to have lower limit

VP_INLINE int vpRJoint::GetDOF ( void   )  const [virtual]

return the degrees of freedom.

Implements vpJoint.

VP_INLINE scalar vpRJoint::GetNormalForce ( void   )  const [virtual]

get a magnitude of normal force applied to the joint.

Implements vpJoint.

VP_INLINE scalar vpRJoint::GetNormalTorque ( void   )  const [virtual]

get a magnitude of normal torque applied to the joint.

Implements vpJoint.


Generated on Wed Jun 11 23:11:49 2008 for VirtualPhysics by  doxygen 1.5.5