CS::Physics::iRigidBody Struct Reference
This is the interface for a rigid body. More...
#include <ivaria/physics.h>

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 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 iKinematicCallback * | GetKinematicCallback ()=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 space). | |
| virtual csVector3 | GetTotalTorque () const =0 |
| Get the total torque currently applied on this body (in world space). | |
| 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:
- iPhysicalSystem::CreateRigidBody()
Main ways to get pointers to this interface:
- iPhysicalSector::GetRigidBody()
- iPhysicalSector::FindRigidBody()
Main users of this interface:
- See also:
- CS::Physics::iSoftBody
Definition at line 301 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 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 space).
| virtual csVector3 CS::Physics::iRigidBody::GetTotalTorque | ( | ) | const [pure virtual] |
Get the total torque currently applied on this body (in world space).
| 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:
- ivaria/physics.h
Generated for Crystal Space 2.1 by doxygen 1.6.1
