CrystalSpace

Public API Reference

CS::Physics::iJoint Struct Reference

A joint that can constrain the relative motion between two iPhysicalBody. More...

#include <ivaria/physics.h>

Inheritance diagram for CS::Physics::iJoint:

List of all members.

Public Member Functions

virtual void Attach (iPhysicalBody *body1, iPhysicalBody *body2, bool forceUpdate=true)=0
 Set the rigid bodies that will be affected by this joint.
virtual const csVector3GetAngularDamping () const =0
 Get the angular damping of the spring.
virtual const csVector3GetAngularStiffness () const =0
 Get the angular stiffness of the spring.
virtual iPhysicalBodyGetAttachedBody (int index)=0
 Get the attached body with the given index (valid values for body are 0 and 1).
virtual const csVector3GetBounce () const =0
 Get the joint restitution.
virtual float GetBreakingImpulseThreshold () const =0
 Get the threshold of a breaking impulse.
virtual const csVector3GetDesiredVelocity () const =0
 Get the desired velocity of the joint motor.
virtual const csVector3GetLinearDamping () const =0
 Get the linear damping of the spring.
virtual const csVector3GetLinearStiffness () const =0
 Get the linear stiffness of the spring.
virtual csVector3 GetMaxForce () const =0
 Get the maximum force that can be applied by the joint motor to reach the desired velocity.
virtual const csVector3GetMaximumAngle () const =0
 Get the maximum allowed angle between the two bodies (in radian).
virtual csVector3 GetMaximumDistance () const =0
 Get the maximum allowed distance between the two bodies.
virtual const csVector3GetMinimumAngle () const =0
 Get the minimum allowed angle between the two bodies (in radian).
virtual csVector3 GetMinimumDistance () const =0
 Get the minimum allowed distance between the two bodies.
virtual const csVector3GetPosition () const =0
 Get the current position of the joint, in world coordinates.
virtual void GetRotConstraints (bool &X, bool &Y, bool &Z) const =0
 Get the rotational constraints on the 3 axes.
virtual void GetTransConstraints (bool &X, bool &Y, bool &Z) const =0
 Get the translation constraints on the 3 axes.
virtual csOrthoTransform GetTransform () const =0
 Get the world transformation of the joint.
virtual bool RebuildJoint ()=0
 Rebuild the joint using the current setup.
virtual void SetAngularDamping (const csVector3 &damp, bool forceUpdate=false)=0
 Set the angular damping of the spring.
virtual void SetAngularEquilibriumPoint (const csVector3 &point, bool forceUpdate=false)=0
 Set the value to an equilibrium point for rotation.
virtual void SetAngularStiffness (const csVector3 &stiffness, bool forceUpdate=false)=0
 Set the angular stiffness of the spring.
virtual void SetBounce (const csVector3 &bounce, bool forceUpdate=false)=0
 Set 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 SetBreakingImpulseThreshold (float threshold, bool forceUpdate=false)=0
 Set the threshold of a breaking impulse.
virtual void SetDesiredVelocity (const csVector3 &velo, bool forceUpdate=false)=0
 Apply a motor velocity to joint (for instance on wheels).
virtual void SetLinearDamping (const csVector3 &damp, bool forceUpdate=false)=0
 Set the linear damping of the spring.
virtual void SetLinearEquilibriumPoint (const csVector3 &point, bool forceUpdate=false)=0
 Set the value to an equilibrium point for translation.
virtual void SetLinearStiffness (const csVector3 &stiffness, bool forceUpdate=false)=0
 Set the linear stiffness of the spring.
virtual void SetMaxForce (const csVector3 &force, bool forceUpdate=false)=0
 Set the maximum force that can be applied by the joint motor to reach the desired velocity.
virtual void SetMaximumAngle (const csVector3 &angle, bool forceUpdate=false)=0
 Set the maximum allowed angle between the two bodies (in radian).
virtual void SetMaximumDistance (const csVector3 &dist, bool forceUpdate=false)=0
 Set the maximum allowed distance between the two bodies.
virtual void SetMinimumAngle (const csVector3 &angle, bool forceUpdate=false)=0
 Set the minimum allowed angle between the two bodies, in radian.
virtual void SetMinimumDistance (const csVector3 &dist, bool forceUpdate=false)=0
 Set the minimum allowed distance between the two bodies.
virtual void SetPosition (const csVector3 &position, bool forceUpdate=false)=0
 Set the new position of the joint, in world coordinates.
virtual void SetRotConstraints (bool X, bool Y, bool Z, bool forceUpdate=false)=0
 Set the rotational constraints on the 3 axes.
virtual void SetSpring (bool isSpring, bool forceUpdate=false)=0
 Set this joint to a spring joint.
virtual void SetTransConstraints (bool X, bool Y, bool Z, bool forceUpdate=false)=0
 Set the translation constraints on the 3 axes.
virtual void SetTransform (const csOrthoTransform &trans, bool forceUpdate=false)=0
 Set the world transformation of the joint.

Detailed Description

A joint that can constrain the relative motion between two iPhysicalBody.

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 1118 of file physics.h.


Member Function Documentation

virtual void CS::Physics::iJoint::Attach ( iPhysicalBody body1,
iPhysicalBody body2,
bool  forceUpdate = true 
) [pure virtual]

Set the rigid bodies that will be affected by this joint.

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

virtual const csVector3& CS::Physics::iJoint::GetAngularDamping (  )  const [pure virtual]

Get the angular damping of the spring.

virtual const csVector3& CS::Physics::iJoint::GetAngularStiffness (  )  const [pure virtual]

Get the angular stiffness of the spring.

virtual iPhysicalBody* CS::Physics::iJoint::GetAttachedBody ( int  index  )  [pure virtual]

Get the attached body with the given index (valid values for body are 0 and 1).

virtual const csVector3& CS::Physics::iJoint::GetBounce (  )  const [pure virtual]

Get the joint restitution.

virtual float CS::Physics::iJoint::GetBreakingImpulseThreshold (  )  const [pure virtual]

Get the threshold of a breaking impulse.

virtual const csVector3& CS::Physics::iJoint::GetDesiredVelocity (  )  const [pure virtual]

Get the desired velocity of the joint motor.

virtual const csVector3& CS::Physics::iJoint::GetLinearDamping (  )  const [pure virtual]

Get the linear damping of the spring.

virtual const csVector3& CS::Physics::iJoint::GetLinearStiffness (  )  const [pure virtual]

Get the linear stiffness of the spring.

virtual csVector3 CS::Physics::iJoint::GetMaxForce (  )  const [pure virtual]

Get the maximum force that can be applied by the joint motor to reach the desired velocity.

virtual const csVector3& CS::Physics::iJoint::GetMaximumAngle (  )  const [pure virtual]

Get the maximum allowed angle between the two bodies (in radian).

virtual csVector3 CS::Physics::iJoint::GetMaximumDistance (  )  const [pure virtual]

Get the maximum allowed distance between the two bodies.

virtual const csVector3& CS::Physics::iJoint::GetMinimumAngle (  )  const [pure virtual]

Get the minimum allowed angle between the two bodies (in radian).

virtual csVector3 CS::Physics::iJoint::GetMinimumDistance (  )  const [pure virtual]

Get the minimum allowed distance between the two bodies.

virtual const csVector3& CS::Physics::iJoint::GetPosition (  )  const [pure virtual]

Get the current position of the joint, in world coordinates.

virtual void CS::Physics::iJoint::GetRotConstraints ( bool &  X,
bool &  Y,
bool &  Z 
) const [pure virtual]

Get the rotational constraints on the 3 axes.

A value of true means that no motion are allowed around that axis.

virtual void CS::Physics::iJoint::GetTransConstraints ( bool &  X,
bool &  Y,
bool &  Z 
) const [pure virtual]

Get the translation constraints on the 3 axes.

A value of true means that no motion are allowed along that axis.

virtual csOrthoTransform CS::Physics::iJoint::GetTransform (  )  const [pure virtual]

Get the world transformation of the joint.

virtual bool CS::Physics::iJoint::RebuildJoint (  )  [pure virtual]

Rebuild the joint using the current setup.

Return true if the rebuilding operation was successful (otherwise the joint won't be active).

virtual void CS::Physics::iJoint::SetAngularDamping ( const csVector3 damp,
bool  forceUpdate = false 
) [pure virtual]

Set the angular damping of the spring.

virtual void CS::Physics::iJoint::SetAngularEquilibriumPoint ( const csVector3 point,
bool  forceUpdate = false 
) [pure virtual]

Set the value to an equilibrium point for rotation.

virtual void CS::Physics::iJoint::SetAngularStiffness ( const csVector3 stiffness,
bool  forceUpdate = false 
) [pure virtual]

Set the angular stiffness of the spring.

virtual void CS::Physics::iJoint::SetBounce ( const csVector3 bounce,
bool  forceUpdate = false 
) [pure virtual]

Set 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 CS::Physics::iJoint::SetBreakingImpulseThreshold ( float  threshold,
bool  forceUpdate = false 
) [pure virtual]

Set the threshold of a breaking impulse.

virtual void CS::Physics::iJoint::SetDesiredVelocity ( const csVector3 velo,
bool  forceUpdate = false 
) [pure virtual]

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

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

virtual void CS::Physics::iJoint::SetLinearDamping ( const csVector3 damp,
bool  forceUpdate = false 
) [pure virtual]

Set the linear damping of the spring.

virtual void CS::Physics::iJoint::SetLinearEquilibriumPoint ( const csVector3 point,
bool  forceUpdate = false 
) [pure virtual]

Set the value to an equilibrium point for translation.

virtual void CS::Physics::iJoint::SetLinearStiffness ( const csVector3 stiffness,
bool  forceUpdate = false 
) [pure virtual]

Set the linear stiffness of the spring.

virtual void CS::Physics::iJoint::SetMaxForce ( const csVector3 force,
bool  forceUpdate = false 
) [pure virtual]

Set the maximum force that can be applied by the joint motor to reach the desired velocity.

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

virtual void CS::Physics::iJoint::SetMaximumAngle ( const csVector3 angle,
bool  forceUpdate = false 
) [pure virtual]

Set the maximum allowed angle between the two bodies (in radian).

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

virtual void CS::Physics::iJoint::SetMaximumDistance ( const csVector3 dist,
bool  forceUpdate = false 
) [pure virtual]

Set the maximum allowed distance between the two bodies.

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

virtual void CS::Physics::iJoint::SetMinimumAngle ( const csVector3 angle,
bool  forceUpdate = false 
) [pure virtual]

Set the minimum allowed angle between the two bodies, in radian.

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

virtual void CS::Physics::iJoint::SetMinimumDistance ( const csVector3 dist,
bool  forceUpdate = false 
) [pure virtual]

Set the minimum allowed distance between the two bodies.

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

virtual void CS::Physics::iJoint::SetPosition ( const csVector3 position,
bool  forceUpdate = false 
) [pure virtual]

Set the new position of the joint, in world coordinates.

virtual void CS::Physics::iJoint::SetRotConstraints ( bool  X,
bool  Y,
bool  Z,
bool  forceUpdate = false 
) [pure virtual]

Set the rotational constraints on the 3 axes.

If true is passed for an axis then the Joint will constrain all rotation around that axis (ie no motion will be allowed). If false is passed in then all rotation around that axis is free, but bounded by the minimum and maximum angle if set. Set force_update to true if you want to apply the changes right away.

virtual void CS::Physics::iJoint::SetSpring ( bool  isSpring,
bool  forceUpdate = false 
) [pure virtual]

Set this joint to a spring joint.

virtual void CS::Physics::iJoint::SetTransConstraints ( bool  X,
bool  Y,
bool  Z,
bool  forceUpdate = false 
) [pure virtual]

Set the translation constraints on the 3 axes.

If true is passed for an axis then the Joint will constrain all motion along that axis (ie no motion will be allowed). If false is passed in then all motion along that axis is free, but bounded by the minimum and maximum distance if set. Set force_update to true if you want to apply the changes right away.

virtual void CS::Physics::iJoint::SetTransform ( const csOrthoTransform trans,
bool  forceUpdate = false 
) [pure virtual]

Set the world transformation of the joint.

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


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

Generated for Crystal Space 2.1 by doxygen 1.6.1