Fluxus::Physics Class Reference

#include <Physics.h>

Collaboration diagram for Fluxus::Physics:

Collaboration graph
[legend]

Public Types

enum  BoundingType { BOX, CYLINDER, SPHERE }
enum  ObjectType { ACTIVE, PASSIVE }

Public Member Functions

 Physics (Renderer *r)
virtual ~Physics ()
void Tick ()
 Run the simulation for one frame.
void Render ()
 Just for visualisation of joints.
void Free (int ID)
void Clear ()
void RegisterRenderer (Renderer *s)
void GroundPlane (dVector ori, float off)
void Kick (int ID, dVector v)
void Twist (int ID, dVector v)
void SetMass (int ID, float mass)
void SetCollisions (bool s)
void SetGravity (const dVector &g)
void SetGlobalSurfaceParams (float slip1, float slip2, float softerp, float softcfm)
int GetMaxObjectCount ()
void SetMaxObjectCount (int s)
bool HasCollided (int Ob)
Object types
These funtions add primitives to the simulation world. From here on their transforms will be controlled by the physics system.

void MakeActive (int ID, float MassBoundingType, BoundingType Bound=BOX)
void MakePassive (int ID, float MassBoundingType, BoundingType Bound=BOX)
Joints
int CreateJointFixed (int Ob1)
int CreateJointBall (int Ob1, int Ob2, dVector Anchor)
int CreateJointHinge (int Ob1, int Ob2, dVector Anchor, dVector Hinge)
int CreateJointSlider (int Ob1, int Ob2, dVector Hinge)
int CreateJointHinge2 (int Ob1, int Ob2, dVector Anchor, dVector Hinge[2])
int CreateJointAMotor (int Ob1, int Ob2, dVector Axis)
void SetJointAngle (int ID, float force, float angle)
void SetJointParam (int ID, const string &Param, float Value)

Data Structures

class  JointObject
class  Object

Detailed Description

Interface object to the ODE library

Definition at line 30 of file Physics.h.


Member Enumeration Documentation

enum Fluxus::Physics::BoundingType

Enumerator:
BOX 
CYLINDER 
SPHERE 

Definition at line 36 of file Physics.h.

enum Fluxus::Physics::ObjectType

Enumerator:
ACTIVE 
PASSIVE 

Definition at line 37 of file Physics.h.


Constructor & Destructor Documentation

Physics::Physics ( Renderer r  ) 

Definition at line 47 of file Physics.cpp.

Physics::~Physics (  )  [virtual]

Definition at line 64 of file Physics.cpp.


Member Function Documentation

void Physics::Tick (  ) 

Run the simulation for one frame.

Definition at line 68 of file Physics.cpp.

void Physics::Render (  ) 

Just for visualisation of joints.

Definition at line 102 of file Physics.cpp.

void Physics::MakeActive ( int  ID,
float  MassBoundingType,
BoundingType  Bound = BOX 
)

Definition at line 171 of file Physics.cpp.

void Physics::MakePassive ( int  ID,
float  MassBoundingType,
BoundingType  Bound = BOX 
)

Definition at line 286 of file Physics.cpp.

void Physics::Free ( int  ID  ) 

Definition at line 403 of file Physics.cpp.

void Physics::Clear (  ) 

Definition at line 416 of file Physics.cpp.

void Fluxus::Physics::RegisterRenderer ( Renderer s  )  [inline]

Todo:
Remove the dependancy on the renderer (use primitive pointers directly etc???)

Definition at line 59 of file Physics.h.

void Physics::GroundPlane ( dVector  ori,
float  off 
)

Definition at line 165 of file Physics.cpp.

void Physics::Kick ( int  ID,
dVector  v 
)

Definition at line 464 of file Physics.cpp.

void Physics::Twist ( int  ID,
dVector  v 
)

Definition at line 480 of file Physics.cpp.

void Physics::SetMass ( int  ID,
float  mass 
)

Definition at line 382 of file Physics.cpp.

void Fluxus::Physics::SetCollisions ( bool  s  )  [inline]

Definition at line 64 of file Physics.h.

void Physics::SetGravity ( const dVector g  ) 

Definition at line 160 of file Physics.cpp.

void Fluxus::Physics::SetGlobalSurfaceParams ( float  slip1,
float  slip2,
float  softerp,
float  softcfm 
) [inline]

Definition at line 66 of file Physics.h.

int Physics::CreateJointFixed ( int  Ob1  ) 

Definition at line 606 of file Physics.cpp.

int Physics::CreateJointBall ( int  Ob1,
int  Ob2,
dVector  Anchor 
)

Definition at line 707 of file Physics.cpp.

int Physics::CreateJointHinge ( int  Ob1,
int  Ob2,
dVector  Anchor,
dVector  Hinge 
)

Definition at line 569 of file Physics.cpp.

int Physics::CreateJointSlider ( int  Ob1,
int  Ob2,
dVector  Hinge 
)

Definition at line 634 of file Physics.cpp.

int Physics::CreateJointHinge2 ( int  Ob1,
int  Ob2,
dVector  Anchor,
dVector  Hinge[2] 
)

Definition at line 530 of file Physics.cpp.

int Physics::CreateJointAMotor ( int  Ob1,
int  Ob2,
dVector  Axis 
)

Definition at line 669 of file Physics.cpp.

void Physics::SetJointAngle ( int  ID,
float  force,
float  angle 
)

Definition at line 742 of file Physics.cpp.

void Physics::SetJointParam ( int  ID,
const string &  Param,
float  Value 
)

Definition at line 761 of file Physics.cpp.

int Fluxus::Physics::GetMaxObjectCount (  )  [inline]

Definition at line 82 of file Physics.h.

void Fluxus::Physics::SetMaxObjectCount ( int  s  )  [inline]

Definition at line 83 of file Physics.h.

bool Physics::HasCollided ( int  Ob  ) 

Definition at line 804 of file Physics.cpp.


The documentation for this class was generated from the following files:
Generated on Tue Sep 4 23:22:42 2007 for The Fluxus Renderer (libfluxus) by  doxygen 1.5.1