CrystalSpace

Public API Reference

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

iDynamicSystem Struct Reference

This is the interface for the dynamics core. More...

#include <dynamics.h>

Inheritance diagram for iDynamicSystem:

iBase List of all members.

Public Methods

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

virtual void SetGravity (const csVector3 &v)=0
 Set the global gravity. More...

virtual const csVector3 GetGravity () const=0
 Get the global gravity. More...

virtual void SetLinearDampener (float d)=0
 Set the global linear dampener. More...

virtual float GetLinearDampener () const=0
 Get the global linear dampener setting. More...

virtual void SetRollingDampener (float d)=0
 Set the global rolling dampener. More...

virtual float GetRollingDampener () const=0
 Get the global rolling dampener setting. More...

virtual void Step (float stepsize)=0
 Step the simulation forward by stepsize. More...

virtual csPtr< iRigidBodyCreateBody ()=0
 Create a rigid body and add it to the simulation. More...

virtual void RemoveBody (iRigidBody *body)=0
 Create a rigid body and add it to the simulation. More...

virtual iRigidBodyFindBody (const char *name)=0
 Finds a body within a system. More...

virtual csPtr< iBodyGroupCreateGroup ()=0
 Create a body group. Bodies in a group don't collide with each other. More...

virtual void RemoveGroup (iBodyGroup *group)=0
 Remove a group from a simulation. Those bodies now collide. More...

virtual csPtr< iJointCreateJoint ()=0
 Create a joint and add it to the simulation. More...

virtual void RemoveJoint (iJoint *joint)=0
 Remove a joint from the simulation. More...

virtual iDynamicsMoveCallbackGetDefaultMoveCallback ()=0
 Get the default move callback. More...

virtual bool AttachColliderMesh (iMeshWrapper *mesh, const csOrthoTransform &trans, float friction, float elasticity, float softness=0.01f)=0
 Attaches a static collider mesh to world. More...

virtual bool AttachColliderCylinder (float length, float radius, const csOrthoTransform &trans, float friction, float elasticity, float softness=0.01f)=0
 Attaches a static collider cylinder to world (oriented along it's Z axis). More...

virtual bool AttachColliderBox (const csVector3 &size, const csOrthoTransform &trans, float friction, float elasticity, float softness=0.01f)=0
 Attaches a static collider box to world. More...

virtual bool AttachColliderSphere (float radius, const csVector3 &offset, float friction, float elasticity, float softness=0.01f)=0
 Attaches a static collider sphere to world. More...

virtual bool AttachColliderPlane (const csPlane3 &plane, float friction, float elasticity, float softness=0.01f)=0
 Attaches a static collider plane to world. More...


Detailed Description

This is the interface for the dynamics core.

It handles all bookkeeping for rigid bodies and joints. It also handles collision response. Collision detection is done in another plugin.

Definition at line 71 of file dynamics.h.


Member Function Documentation

virtual bool iDynamicSystem::AttachColliderBox const csVector3   size,
const csOrthoTransform   trans,
float    friction,
float    elasticity,
float    softness = 0.01f
[pure virtual]
 

Attaches a static collider box to world.

Parameters:
size  the box size along each axis
trans  a hard transform to apply to the mesh
friction  how much friction this body has, ranges from 0 (no friction) to infinity (perfect friction)
elasticity  the "bouncyness" of this object, from 0 (no bounce) to 1 (maximum bouncyness)
softness  how "squishy" this object is, in the range 0...1; small values (range of 0.00001 to 0.01) give reasonably stiff collision contacts, larger values are more "mushy"

virtual bool iDynamicSystem::AttachColliderCylinder float    length,
float    radius,
const csOrthoTransform   trans,
float    friction,
float    elasticity,
float    softness = 0.01f
[pure virtual]
 

Attaches a static collider cylinder to world (oriented along it's Z axis).

Parameters:
length  the cylinder length along the axis
radius  the cylinder radius
trans  a hard transform to apply to the mesh
friction  how much friction this body has, ranges from 0 (no friction) to infinity (perfect friction)
elasticity  the "bouncyness" of this object, from 0 (no bounce) to 1 (maximum bouncyness)
softness  how "squishy" this object is, in the range 0...1; small values (range of 0.00001 to 0.01) give reasonably stiff collision contacts, larger values are more "mushy"

virtual bool iDynamicSystem::AttachColliderMesh iMeshWrapper   mesh,
const csOrthoTransform   trans,
float    friction,
float    elasticity,
float    softness = 0.01f
[pure virtual]
 

Attaches a static collider mesh to world.

Parameters:
mesh  the mesh to use for collision detection
trans  a hard transform to apply to the mesh
friction  how much friction this body has, ranges from 0 (no friction) to infinity (perfect friction)
elasticity  the "bouncyness" of this object, from 0 (no bounce) to 1 (maximum bouncyness)
softness  how "squishy" this object is, in the range 0...1; small values (range of 0.00001 to 0.01) give reasonably stiff collision contacts, larger values are more "mushy"

virtual bool iDynamicSystem::AttachColliderPlane const csPlane3   plane,
float    friction,
float    elasticity,
float    softness = 0.01f
[pure virtual]
 

Attaches a static collider plane to world.

Parameters:
plane  describes the plane to added
trans  a hard transform to apply to the mesh
friction  how much friction this body has, ranges from 0 (no friction) to infinity (perfect friction)
elasticity  the "bouncyness" of this object, from 0 (no bounce) to 1 (maximum bouncyness)
softness  how "squishy" this object is, in the range 0...1; small values (range of 0.00001 to 0.01) give reasonably stiff collision contacts, larger values are more "mushy"

virtual bool iDynamicSystem::AttachColliderSphere float    radius,
const csVector3   offset,
float    friction,
float    elasticity,
float    softness = 0.01f
[pure virtual]
 

Attaches a static collider sphere to world.

Parameters:
radius  the radius of the sphere
offset  a translation of the sphere's center from the default (0,0,0)
trans  a hard transform to apply to the mesh
friction  how much friction this body has, ranges from 0 (no friction) to infinity (perfect friction)
elasticity  the "bouncyness" of this object, from 0 (no bounce) to 1 (maximum bouncyness)
softness  how "squishy" this object is, in the range 0...1; small values (range of 0.00001 to 0.01) give reasonably stiff collision contacts, larger values are more "mushy"

virtual csPtr<iRigidBody> iDynamicSystem::CreateBody   [pure virtual]
 

Create a rigid body and add it to the simulation.

virtual csPtr<iBodyGroup> iDynamicSystem::CreateGroup   [pure virtual]
 

Create a body group. Bodies in a group don't collide with each other.

virtual csPtr<iJoint> iDynamicSystem::CreateJoint   [pure virtual]
 

Create a joint and add it to the simulation.

virtual iRigidBody* iDynamicSystem::FindBody const char *    name [pure virtual]
 

Finds a body within a system.

virtual iDynamicsMoveCallback* iDynamicSystem::GetDefaultMoveCallback   [pure virtual]
 

Get the default move callback.

virtual const csVector3 iDynamicSystem::GetGravity   const [pure virtual]
 

Get the global gravity.

virtual float iDynamicSystem::GetLinearDampener   const [pure virtual]
 

Get the global linear dampener setting.

virtual float iDynamicSystem::GetRollingDampener   const [pure virtual]
 

Get the global rolling dampener setting.

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

returns the underlying object.

virtual void iDynamicSystem::RemoveBody iRigidBody   body [pure virtual]
 

Create a rigid body and add it to the simulation.

virtual void iDynamicSystem::RemoveGroup iBodyGroup   group [pure virtual]
 

Remove a group from a simulation. Those bodies now collide.

virtual void iDynamicSystem::RemoveJoint iJoint   joint [pure virtual]
 

Remove a joint from the simulation.

virtual void iDynamicSystem::SetGravity const csVector3   v [pure virtual]
 

Set the global gravity.

virtual void iDynamicSystem::SetLinearDampener float    d [pure virtual]
 

Set the global linear dampener.

virtual void iDynamicSystem::SetRollingDampener float    d [pure virtual]
 

Set the global rolling dampener.

virtual void iDynamicSystem::Step float    stepsize [pure virtual]
 

Step the simulation forward by stepsize.


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