CrystalSpace

Public API Reference

iJoint Struct Reference

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

#include <ivaria/dynamics.h>

Inheritance diagram for iJoint:

List of all members.

Public Member Functions

virtual void Attach (iRigidBody *body1, iRigidBody *body2, bool force_update=true)=0
 Set which two bodies to be affected by this joint.
virtual csVector3 GetAngularConstraintAxis (int body)=0
 Get custom angular constraint axis.
virtual csRef< iRigidBodyGetAttachedBody (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 bool RebuildJoint ()=0
 Rebuild joint using current setup.
virtual void SetAngularConstraintAxis (const csVector3 &axis, int body, bool force_update=true)=0
 Set custom angular constraint axis (have sense only with rotation free minimum along 2 axis).
virtual void SetBounce (const csVector3 &bounce, bool force_update=true)=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, bool force_update=true)=0
 Apply a motor velocity to joint (for instance on wheels).
virtual void SetMaxForce (const csVector3 &maxForce, bool force_update=true)=0
 Sets the force at which the desired velocity will be achieved.
virtual void SetMaximumAngle (const csVector3 &max, bool force_update=true)=0
 Sets the maximum constrained angle between bodies.
virtual void SetMaximumDistance (const csVector3 &max, bool force_update=true)=0
 Sets the maximum constrained distance between bodies.
virtual void SetMinimumAngle (const csVector3 &min, bool force_update=true)=0
 Sets the minimum constrained angle between bodies.
virtual void SetMinimumDistance (const csVector3 &min, bool force_update=true)=0
 Sets the minimum constrained distance between bodies.
virtual void SetRotConstraints (bool X, bool Y, bool Z, bool force_update=true)=0
 Sets the rotational constraints on the 3 axes.
virtual void SetTransConstraints (bool X, bool Y, bool Z, bool force_update=true)=0
 Sets the translation constraints on the 3 axes.
virtual void SetTransform (const csOrthoTransform &trans, bool force_update=true)=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 876 of file dynamics.h.


Member Function Documentation

virtual void iJoint::Attach ( iRigidBody body1,
iRigidBody body2,
bool  force_update = true 
) [pure virtual]

Set which two bodies to be affected by this joint.

Set force_update to true if you want to apply changes right away.

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 bool iJoint::RebuildJoint (  )  [pure virtual]

Rebuild joint using current setup.

Returns true if rebuilding operation is sucesfull (otherwise joint won't be active).

virtual void iJoint::SetAngularConstraintAxis ( const csVector3 axis,
int  body,
bool  force_update = true 
) [pure virtual]

Set custom angular constraint axis (have sense only with rotation free minimum along 2 axis).

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetBounce ( const csVector3 bounce,
bool  force_update = true 
) [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,
bool  force_update = true 
) [pure virtual]

Apply a motor velocity to joint (for instance on wheels).

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetMaxForce ( const csVector3 maxForce,
bool  force_update = true 
) [pure virtual]

Sets the force at which the desired velocity will be achieved.

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetMaximumAngle ( const csVector3 max,
bool  force_update = true 
) [pure virtual]

Sets the maximum constrained angle between bodies.

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetMaximumDistance ( const csVector3 max,
bool  force_update = true 
) [pure virtual]

Sets the maximum constrained distance between bodies.

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetMinimumAngle ( const csVector3 min,
bool  force_update = true 
) [pure virtual]

Sets the minimum constrained angle between bodies.

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetMinimumDistance ( const csVector3 min,
bool  force_update = true 
) [pure virtual]

Sets the minimum constrained distance between bodies.

Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetRotConstraints ( bool  X,
bool  Y,
bool  Z,
bool  force_update = true 
) [pure virtual]

Sets the rotational constraints on the 3 axes.

Works like the above translational constraints, but for rotation about the respective axes. Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetTransConstraints ( bool  X,
bool  Y,
bool  Z,
bool  force_update = true 
) [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. Set force_update to true if you want to apply changes right away.

virtual void iJoint::SetTransform ( const csOrthoTransform trans,
bool  force_update = true 
) [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. Set force_update to true if you want to apply changes right away.


The documentation for this struct was generated from the following file:

Generated for Crystal Space 1.4.1 by doxygen 1.7.1