CrystalSpace

Public API Reference

CS::Physics::iRigidBody Struct Reference

This is the interface for a rigid body. More...

#include <ivaria/physics.h>

Inheritance diagram for CS::Physics::iRigidBody:

List of all members.

Public Member Functions

virtual void AddForceAtPos (const csVector3 &force, const csVector3 &pos)=0
 Add a force (world space) at a specific position (world space) (active for one timestep).
virtual void AddForceAtRelPos (const csVector3 &force, const csVector3 &pos)=0
 Add a force (world space) at a specific position (local space) (active for one timestep).
virtual void AddRelForce (const csVector3 &force)=0
 Add a force (local space) (active for one timestep).
virtual void AddRelForceAtPos (const csVector3 &force, const csVector3 &pos)=0
 Add a force (local space) at a specific position (world space) (active for one timestep).
virtual void AddRelForceAtRelPos (const csVector3 &force, const csVector3 &pos)=0
 Add a force (local space) at a specific position (local space) (active for one timestep).
virtual void AddRelTorque (const csVector3 &torque)=0
 Add a torque (local space) (active for one timestep).
virtual void AddTorque (const csVector3 &torque)=0
 Add a torque (world space) (active for one timestep).
virtual void ApplyImpulse (const csVector3 &impulse, const csVector3 &position)=0
 Apply an impulse on the rigid body at the specified position.
virtual void ApplyTorque (const csVector3 &torque)=0
 Apply a rotational torque on the rigid body.
virtual float GetAngularDamping ()=0
 Get the angular damping for this rigid body.
virtual csVector3 GetAngularFactor () const =0
 Get the angular factor for this rigid body.
virtual csVector3 GetAngularVelocity () const =0
 Get the angular velocity (rotation).
virtual float GetElasticity ()=0
 Get the elasticity of this rigid body.
virtual iKinematicCallbackGetKinematicCallback ()=0
 Get the callback used to update the transform of the kinematic body.
virtual float GetLinearDamping ()=0
 Get the linear Damping for this rigid body.
virtual RigidBodyState GetState () const =0
 Get the current state of the body.
virtual csVector3 GetTotalForce () const =0
 Get the total force currently applied on this body (in world coordinates).
virtual csVector3 GetTotalTorque () const =0
 Get the total torque currently applied on this body (in world coordinates).
virtual void SetAngularDamping (float d)=0
 Set the angular damping for this rigid body.
virtual void SetAngularFactor (const csVector3 &f)=0
 Set the angular factor for this rigid body.
virtual void SetAngularVelocity (const csVector3 &vel)=0
 Set the angular velocity (rotation).
virtual void SetElasticity (float elasticity)=0
 Set the elasticity of this rigid body.
virtual void SetKinematicCallback (iKinematicCallback *cb)=0
 Set the callback to be used to update the transform of the kinematic body.
virtual void SetLinearDamping (float d)=0
 Set the linear Damping for this rigid body.
virtual void SetState (RigidBodyState state)=0
 Set the current state of the body.

Detailed Description

This is the interface for a rigid body.

It keeps all properties for the body. It can also be attached to a movable or a bone, to automatically update it.

Main creators of instances implementing this interface:

Main ways to get pointers to this interface:

Main users of this interface:

See also:
CS::Physics::iSoftBody

Definition at line 309 of file physics.h.


Member Function Documentation

virtual void CS::Physics::iRigidBody::AddForceAtPos ( const csVector3 force,
const csVector3 pos 
) [pure virtual]

Add a force (world space) at a specific position (world space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddForceAtRelPos ( const csVector3 force,
const csVector3 pos 
) [pure virtual]

Add a force (world space) at a specific position (local space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddRelForce ( const csVector3 force  )  [pure virtual]

Add a force (local space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddRelForceAtPos ( const csVector3 force,
const csVector3 pos 
) [pure virtual]

Add a force (local space) at a specific position (world space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddRelForceAtRelPos ( const csVector3 force,
const csVector3 pos 
) [pure virtual]

Add a force (local space) at a specific position (local space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddRelTorque ( const csVector3 torque  )  [pure virtual]

Add a torque (local space) (active for one timestep).

virtual void CS::Physics::iRigidBody::AddTorque ( const csVector3 torque  )  [pure virtual]

Add a torque (world space) (active for one timestep).

virtual void CS::Physics::iRigidBody::ApplyImpulse ( const csVector3 impulse,
const csVector3 position 
) [pure virtual]

Apply an impulse on the rigid body at the specified position.

The impulse will be applied for the next simulation step. If you want a continuous impulse, then you need to apply it manually at each step.

Parameters:
impulse The impulse vector, in world coordinates.
position The position where the impulse is applied, in world coordinates.
See also:
CS::Physics::iPhysicalBody::ApplyImpulse(), CS::Physics::iRigidBody::ApplyTorque()
virtual void CS::Physics::iRigidBody::ApplyTorque ( const csVector3 torque  )  [pure virtual]

Apply a rotational torque on the rigid body.

The torque will be applied for the next simulation step. If you want a continuous torque, then you need to apply it manually at each step.

Parameters:
torque The torque vector, in world coordinates.
See also:
CS::Physics::iPhysicalBody::ApplyImpulse(), CS::Physics::iRigidBody::ApplyImpulse()
virtual float CS::Physics::iRigidBody::GetAngularDamping (  )  [pure virtual]

Get the angular damping for this rigid body.

virtual csVector3 CS::Physics::iRigidBody::GetAngularFactor (  )  const [pure virtual]

Get the angular factor for this rigid body.

virtual csVector3 CS::Physics::iRigidBody::GetAngularVelocity (  )  const [pure virtual]

Get the angular velocity (rotation).

virtual float CS::Physics::iRigidBody::GetElasticity (  )  [pure virtual]

Get the elasticity of this rigid body.

virtual iKinematicCallback* CS::Physics::iRigidBody::GetKinematicCallback (  )  [pure virtual]

Get the callback used to update the transform of the kinematic body.

virtual float CS::Physics::iRigidBody::GetLinearDamping (  )  [pure virtual]

Get the linear Damping for this rigid body.

virtual RigidBodyState CS::Physics::iRigidBody::GetState (  )  const [pure virtual]

Get the current state of the body.

virtual csVector3 CS::Physics::iRigidBody::GetTotalForce (  )  const [pure virtual]

Get the total force currently applied on this body (in world coordinates).

virtual csVector3 CS::Physics::iRigidBody::GetTotalTorque (  )  const [pure virtual]

Get the total torque currently applied on this body (in world coordinates).

virtual void CS::Physics::iRigidBody::SetAngularDamping ( float  d  )  [pure virtual]

Set the angular damping for this rigid body.

The dampening correspond to how much the movements of the objects will be reduced. It is a value between 0 and 1, giving the ratio of speed that will be reduced in one second. 0 means that the movement will not be reduced, while 1 means that the object will not move. The default value is 0.

virtual void CS::Physics::iRigidBody::SetAngularFactor ( const csVector3 f  )  [pure virtual]

Set the angular factor for this rigid body.

Todo:
Document me
virtual void CS::Physics::iRigidBody::SetAngularVelocity ( const csVector3 vel  )  [pure virtual]

Set the angular velocity (rotation).

virtual void CS::Physics::iRigidBody::SetElasticity ( float  elasticity  )  [pure virtual]

Set the elasticity of this rigid body.

virtual void CS::Physics::iRigidBody::SetKinematicCallback ( iKinematicCallback cb  )  [pure virtual]

Set the callback to be used to update the transform of the kinematic body.

If no callback are provided then the dynamic system will use a default one.

virtual void CS::Physics::iRigidBody::SetLinearDamping ( float  d  )  [pure virtual]

Set the linear Damping for this rigid body.

The dampening correspond to how much the movements of the objects will be reduced. It is a value between 0 and 1, giving the ratio of speed that will be reduced in one second. 0 means that the movement will not be reduced, while 1 means that the object will not move. The default value is 0.

See also:
iDynamicSystem::SetLinearDamping ()
virtual void CS::Physics::iRigidBody::SetState ( RigidBodyState  state  )  [pure virtual]

Set the current state of the body.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1