iJoint Struct Reference
This is the interface for a joint. More...
#include <ivaria/dynamics.h>
Inheritance diagram for iJoint:
Public Member Functions | |
virtual void | Attach (iRigidBody *body1, iRigidBody *body2)=0 |
Set which two bodies to be affected by this joint. | |
virtual csVector3 | GetAngularConstraintAxis (int body)=0 |
Get custom angular constraint axis. | |
virtual csRef< iRigidBody > | GetAttachedBody (int body)=0 |
Get an attached body (valid values for body are 0 and 1). | |
virtual csVector3 | GetBounce ()=0 |
Get the joint restitution. | |
virtual csVector3 | GetMaximumAngle ()=0 |
Gets the maximum constrained angle between bodies. | |
virtual csVector3 | GetMaximumDistance ()=0 |
Gets the maximum constrained distance between bodies. | |
virtual csVector3 | GetMinimumAngle ()=0 |
Gets the minimum constrained angle between bodies. | |
virtual csVector3 | GetMinimumDistance ()=0 |
Gets the minimum constrained distance between bodies. | |
virtual csOrthoTransform | GetTransform ()=0 |
Get the local transformation of the joint. | |
virtual bool | IsXRotConstrained ()=0 |
True if this axis' rotation is constrained. | |
virtual bool | IsXTransConstrained ()=0 |
True if this axis' translation is constrained. | |
virtual bool | IsYRotConstrained ()=0 |
True if this axis' rotation is constrained. | |
virtual bool | IsYTransConstrained ()=0 |
True if this axis' translation is constrained. | |
virtual bool | IsZRotConstrained ()=0 |
True if this axis' rotation is constrained. | |
virtual bool | IsZTransConstrained ()=0 |
True if this axis' translation is constrained. | |
virtual void | SetAngularConstraintAxis (const csVector3 &axis, int body)=0 |
Set custom angular constraint axis (have sense only with rotation free minimum along 2 axis). | |
virtual void | SetBounce (const csVector3 &bounce)=0 |
Sets the restitution of the joint's stop point (this is the elasticity of the joint when say throwing open a door how much it will bounce the door back closed when it hits). | |
virtual void | SetDesiredVelocity (const csVector3 &velocity)=0 |
Apply a motor velocity to joint (for instance on wheels). | |
virtual void | SetMaxForce (const csVector3 &maxForce)=0 |
Sets the force at which the desired velocity will be achieved. | |
virtual void | SetMaximumAngle (const csVector3 &max)=0 |
Sets the maximum constrained angle between bodies. | |
virtual void | SetMaximumDistance (const csVector3 &max)=0 |
Sets the maximum constrained distance between bodies. | |
virtual void | SetMinimumAngle (const csVector3 &min)=0 |
Sets the minimum constrained angle between bodies. | |
virtual void | SetMinimumDistance (const csVector3 &min)=0 |
Sets the minimum constrained distance between bodies. | |
virtual void | SetRotConstraints (bool X, bool Y, bool Z)=0 |
Sets the rotational constraints on the 3 axes. | |
virtual void | SetTransConstraints (bool X, bool Y, bool Z)=0 |
Sets the translation constraints on the 3 axes. | |
virtual void | SetTransform (const csOrthoTransform &trans)=0 |
Set the local transformation of the joint. |
Detailed Description
This is the interface for a joint.It works by constraining the relative motion between the two bodies it attaches. For instance if all motion in along the local X axis is constrained then the bodies will stay motionless relative to each other along an x axis rotated and positioned by the Joint's transform.
Main creators of instances implementing this interface:
Main users of this interface:
Definition at line 808 of file dynamics.h.
Member Function Documentation
virtual void iJoint::Attach | ( | iRigidBody * | body1, | |
iRigidBody * | body2 | |||
) | [pure virtual] |
Set which two bodies to be affected by this joint.
virtual csVector3 iJoint::GetAngularConstraintAxis | ( | int | body | ) | [pure virtual] |
Get custom angular constraint axis.
virtual csRef<iRigidBody> iJoint::GetAttachedBody | ( | int | body | ) | [pure virtual] |
Get an attached body (valid values for body are 0 and 1).
virtual csVector3 iJoint::GetBounce | ( | ) | [pure virtual] |
Get the joint restitution.
virtual csVector3 iJoint::GetMaximumAngle | ( | ) | [pure virtual] |
Gets the maximum constrained angle between bodies.
virtual csVector3 iJoint::GetMaximumDistance | ( | ) | [pure virtual] |
Gets the maximum constrained distance between bodies.
virtual csVector3 iJoint::GetMinimumAngle | ( | ) | [pure virtual] |
Gets the minimum constrained angle between bodies.
virtual csVector3 iJoint::GetMinimumDistance | ( | ) | [pure virtual] |
Gets the minimum constrained distance between bodies.
virtual csOrthoTransform iJoint::GetTransform | ( | ) | [pure virtual] |
Get the local transformation of the joint.
virtual bool iJoint::IsXRotConstrained | ( | ) | [pure virtual] |
True if this axis' rotation is constrained.
virtual bool iJoint::IsXTransConstrained | ( | ) | [pure virtual] |
True if this axis' translation is constrained.
virtual bool iJoint::IsYRotConstrained | ( | ) | [pure virtual] |
True if this axis' rotation is constrained.
virtual bool iJoint::IsYTransConstrained | ( | ) | [pure virtual] |
True if this axis' translation is constrained.
virtual bool iJoint::IsZRotConstrained | ( | ) | [pure virtual] |
True if this axis' rotation is constrained.
virtual bool iJoint::IsZTransConstrained | ( | ) | [pure virtual] |
True if this axis' translation is constrained.
virtual void iJoint::SetAngularConstraintAxis | ( | const csVector3 & | axis, | |
int | body | |||
) | [pure virtual] |
Set custom angular constraint axis (have sense only with rotation free minimum along 2 axis).
virtual void iJoint::SetBounce | ( | const csVector3 & | bounce | ) | [pure virtual] |
Sets the restitution of the joint's stop point (this is the elasticity of the joint when say throwing open a door how much it will bounce the door back closed when it hits).
virtual void iJoint::SetDesiredVelocity | ( | const csVector3 & | velocity | ) | [pure virtual] |
Apply a motor velocity to joint (for instance on wheels).
virtual void iJoint::SetMaxForce | ( | const csVector3 & | maxForce | ) | [pure virtual] |
Sets the force at which the desired velocity will be achieved.
virtual void iJoint::SetMaximumAngle | ( | const csVector3 & | max | ) | [pure virtual] |
Sets the maximum constrained angle between bodies.
virtual void iJoint::SetMaximumDistance | ( | const csVector3 & | max | ) | [pure virtual] |
Sets the maximum constrained distance between bodies.
virtual void iJoint::SetMinimumAngle | ( | const csVector3 & | min | ) | [pure virtual] |
Sets the minimum constrained angle between bodies.
virtual void iJoint::SetMinimumDistance | ( | const csVector3 & | min | ) | [pure virtual] |
Sets the minimum constrained distance between bodies.
virtual void iJoint::SetRotConstraints | ( | bool | X, | |
bool | Y, | |||
bool | Z | |||
) | [pure virtual] |
Sets the rotational constraints on the 3 axes.
Works like the above translational constraints, but for rotation about the respective axes.
virtual void iJoint::SetTransConstraints | ( | bool | X, | |
bool | Y, | |||
bool | Z | |||
) | [pure virtual] |
Sets the translation constraints on the 3 axes.
If true is passed for an axis the Joint will constrain all motion along that axis. If false is passed in then all motion along that axis free, but bounded by the minimum and maximum distance if set.
virtual void iJoint::SetTransform | ( | const csOrthoTransform & | trans | ) | [pure virtual] |
Set the local transformation of the joint.
This transform sets the position of the constraining axes in the world not relative to the attached bodies.
The documentation for this struct was generated from the following file:
- ivaria/dynamics.h
Generated for Crystal Space by doxygen 1.4.7