CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

iJoint Struct Reference

This is the interface for a joint. More...

#include <dynamics.h>

Inheritance diagram for iJoint:

iBase List of all members.

Public Methods

virtual void Attach (iRigidBody *body1, iRigidBody *body2)=0
 Set which two bodies to be affected by this joint. More...

virtual csRef< iRigidBodyGetAttachedBody (int body)=0
 Get an attached body (valid values for body are 0 and 1). More...

virtual void SetTransform (const csOrthoTransform &trans)=0
 Set the local transformation of the joint. More...

virtual csOrthoTransform GetTransform ()=0
 Get the local transformation of the joint. More...

virtual void SetTransConstraints (bool X, bool Y, bool Z)=0
 Sets the translation constraints on the 3 axes. More...

virtual bool IsXTransConstrained ()=0
 True if this axis' translation is constrained. More...

virtual bool IsYTransConstrained ()=0
 True if this axis' translation is constrained. More...

virtual bool IsZTransConstrained ()=0
 True if this axis' translation is constrained. More...

virtual void SetMinimumDistance (const csVector3 &min)=0
 Sets the minimum constrained distance between bodies. More...

virtual csVector3 GetMinimumDistance ()=0
 Gets the minimum constrained distance between bodies. More...

virtual void SetMaximumDistance (const csVector3 &max)=0
 Sets the maximum constrained distance between bodies. More...

virtual csVector3 GetMaximumDistance ()=0
 Gets the maximum constrained distance between bodies. More...

virtual void SetRotConstraints (bool X, bool Y, bool Z)=0
 Sets the rotational constraints on the 3 axes. More...

virtual bool IsXRotConstrained ()=0
 True if this axis' rotation is constrained. More...

virtual bool IsYRotConstrained ()=0
 True if this axis' rotation is constrained. More...

virtual bool IsZRotConstrained ()=0
 True if this axis' rotation is constrained. More...

virtual void SetMinimumAngle (const csVector3 &min)=0
 Sets the minimum constrained angle between bodies. More...

virtual csVector3 GetMinimumAngle ()=0
 Gets the minimum constrained angle between bodies. More...

virtual void SetMaximumAngle (const csVector3 &max)=0
 Sets the maximum constrained angle between bodies. More...

virtual csVector3 GetMaximumAngle ()=0
 Gets the maximum constrained angle between bodies. More...


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.

Definition at line 305 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 csRef<iRigidBody> iJoint::GetAttachedBody int    body [pure virtual]
 

Get an attached body (valid values for body are 0 and 1).

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::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:
Generated for Crystal Space by doxygen 1.2.14