CrystalSpace

Public API Reference

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

iRigidBody Struct Reference

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

#include <dynamics.h>

Inheritance diagram for iRigidBody:

iBase List of all members.

Public Methods

virtual iObjectQueryObject (void)=0
 returns the underlying object. More...

virtual bool MakeStatic (void)=0
 Makes a body stop reacting dynamically. More...

virtual bool MakeDynamic (void)=0
 Returns a static body to a dynamic state. More...

virtual bool IsStatic (void)=0
 Tells whether a body has been made static or not. More...

virtual csRef< iBodyGroupGetGroup (void)=0
 Returns which group a body belongs to. More...

virtual bool AttachColliderMesh (iMeshWrapper *mesh, const csOrthoTransform &trans, float friction, float density, float elasticity)=0
 Add a collider with a associated friction coefficient. More...

virtual bool AttachColliderCylinder (float length, float radius, const csOrthoTransform &trans, float friction, float density, float elasticity)=0
 Cylinder orientated along its local z axis. More...

virtual void SetPosition (const csVector3 &trans)=0
 Set the position. More...

virtual const csVector3 GetPosition () const=0
 Get the position. More...

virtual void SetOrientation (const csMatrix3 &trans)=0
 Set the orientation. More...

virtual const csMatrix3 GetOrientation () const=0
 Get the orientation. More...

virtual void SetTransform (const csOrthoTransform &trans)=0
 Set the transform. More...

virtual const csOrthoTransform GetTransform () const=0
 Get the transform. More...

virtual void SetLinearVelocity (const csVector3 &vel)=0
 Set the linear velocity (movement). More...

virtual const csVector3 GetLinearVelocity () const=0
 Get the linear velocity (movement). More...

virtual void SetAngularVelocity (const csVector3 &vel)=0
 Set the angular velocity (rotation). More...

virtual const csVector3 GetAngularVelocity () const=0
 Get the angular velocity (rotation). More...

virtual void SetProperties (float mass, const csVector3 &center, const csMatrix3 &inertia)=0
 Set the physic properties. More...

virtual void GetProperties (float *mass, csVector3 *center, csMatrix3 *inertia)=0
 Get the physic properties. NULL parameters are ignored. More...

virtual void AdjustTotalMass (float targetmass)=0
 Set total mass to targetmass, and adjust properties. More...

virtual void AddForce (const csVector3 &force)=0
 Add a force (world space) (active for one timestep). More...

virtual void AddTorque (const csVector3 &force)=0
 Add a torque (world space) (active for one timestep). More...

virtual void AddRelForce (const csVector3 &force)=0
 Add a force (local space) (active for one timestep). More...

virtual void AddRelTorque (const csVector3 &force)=0
 Add a torque (local space) (active for one timestep). More...

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). More...

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). More...

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). More...

virtual void AddRelForceAtRelPos (const csVector3 &force, const csVector3 &pos)=0
 Add a force (local space) at a specific position (loacl space) (active for one timestep). More...

virtual const csVector3 GetForce () const=0
 Get total force (world space). More...

virtual const csVector3 GetTorque () const=0
 Get total torque (world space). More...

virtual void AttachMesh (iMeshWrapper *mesh)=0
 Attach a iMeshWrapper to this body. More...

virtual csRef< iMeshWrapperGetAttachedMesh ()=0
 Returns the attached MeshWrapper. More...

virtual void AttachBone (iSkeletonBone *bone)=0
 Attach a bone to this body. More...

virtual csRef< iSkeletonBoneGetAttachedBone ()=0
 Returns the attached bone. More...

virtual void SetMoveCallback (iDynamicsMoveCallback *cb)=0
 Set a callback to be executed when this body moves. More...

virtual void SetCollisionCallback (iDynamicsCollisionCallback *cb)=0
 Set a callback to be executed when this body collides with another If NULL, no callback is executed. More...

virtual void Collision (iRigidBody *other)=0
 If there's a collision callback with this body, execute it. More...

virtual void Update ()=0
 Update transforms for mesh and/or bone. More...


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.

Definition at line 156 of file dynamics.h.


Member Function Documentation

virtual void iRigidBody::AddForce const csVector3   force [pure virtual]
 

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

virtual void 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 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 iRigidBody::AddRelForce const csVector3   force [pure virtual]
 

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

virtual void 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 iRigidBody::AddRelForceAtRelPos const csVector3   force,
const csVector3   pos
[pure virtual]
 

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

virtual void iRigidBody::AddRelTorque const csVector3   force [pure virtual]
 

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

virtual void iRigidBody::AddTorque const csVector3   force [pure virtual]
 

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

virtual void iRigidBody::AdjustTotalMass float    targetmass [pure virtual]
 

Set total mass to targetmass, and adjust properties.

virtual void iRigidBody::AttachBone iSkeletonBone   bone [pure virtual]
 

Attach a bone to this body.

virtual bool iRigidBody::AttachColliderCylinder float    length,
float    radius,
const csOrthoTransform   trans,
float    friction,
float    density,
float    elasticity
[pure virtual]
 

Cylinder orientated along its local z axis.

virtual bool iRigidBody::AttachColliderMesh iMeshWrapper   mesh,
const csOrthoTransform   trans,
float    friction,
float    density,
float    elasticity
[pure virtual]
 

Add a collider with a associated friction coefficient.

virtual void iRigidBody::AttachMesh iMeshWrapper   mesh [pure virtual]
 

Attach a iMeshWrapper to this body.

virtual void iRigidBody::Collision iRigidBody *    other [pure virtual]
 

If there's a collision callback with this body, execute it.

virtual const csVector3 iRigidBody::GetAngularVelocity   const [pure virtual]
 

Get the angular velocity (rotation).

virtual csRef<iSkeletonBone> iRigidBody::GetAttachedBone   [pure virtual]
 

Returns the attached bone.

virtual csRef<iMeshWrapper> iRigidBody::GetAttachedMesh   [pure virtual]
 

Returns the attached MeshWrapper.

virtual const csVector3 iRigidBody::GetForce   const [pure virtual]
 

Get total force (world space).

virtual csRef<iBodyGroup> iRigidBody::GetGroup void    [pure virtual]
 

Returns which group a body belongs to.

virtual const csVector3 iRigidBody::GetLinearVelocity   const [pure virtual]
 

Get the linear velocity (movement).

virtual const csMatrix3 iRigidBody::GetOrientation   const [pure virtual]
 

Get the orientation.

virtual const csVector3 iRigidBody::GetPosition   const [pure virtual]
 

Get the position.

virtual void iRigidBody::GetProperties float *    mass,
csVector3   center,
csMatrix3   inertia
[pure virtual]
 

Get the physic properties. NULL parameters are ignored.

virtual const csVector3 iRigidBody::GetTorque   const [pure virtual]
 

Get total torque (world space).

virtual const csOrthoTransform iRigidBody::GetTransform   const [pure virtual]
 

Get the transform.

virtual bool iRigidBody::IsStatic void    [pure virtual]
 

Tells whether a body has been made static or not.

virtual bool iRigidBody::MakeDynamic void    [pure virtual]
 

Returns a static body to a dynamic state.

virtual bool iRigidBody::MakeStatic void    [pure virtual]
 

Makes a body stop reacting dynamically.

This is especially useful for environmental objects. It will also increase speed in some cases by ignoring all physics for that body

virtual iObject* iRigidBody::QueryObject void    [pure virtual]
 

returns the underlying object.

virtual void iRigidBody::SetAngularVelocity const csVector3   vel [pure virtual]
 

Set the angular velocity (rotation).

virtual void iRigidBody::SetCollisionCallback iDynamicsCollisionCallback   cb [pure virtual]
 

Set a callback to be executed when this body collides with another If NULL, no callback is executed.

virtual void iRigidBody::SetLinearVelocity const csVector3   vel [pure virtual]
 

Set the linear velocity (movement).

virtual void iRigidBody::SetMoveCallback iDynamicsMoveCallback   cb [pure virtual]
 

Set a callback to be executed when this body moves.

If NULL, no callback is executed.

virtual void iRigidBody::SetOrientation const csMatrix3   trans [pure virtual]
 

Set the orientation.

virtual void iRigidBody::SetPosition const csVector3   trans [pure virtual]
 

Set the position.

virtual void iRigidBody::SetProperties float    mass,
const csVector3   center,
const csMatrix3   inertia
[pure virtual]
 

Set the physic properties.

virtual void iRigidBody::SetTransform const csOrthoTransform   trans [pure virtual]
 

Set the transform.

virtual void iRigidBody::Update   [pure virtual]
 

Update transforms for mesh and/or bone.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14