#include <Physics.h>
Collaboration diagram for Fluxus::Physics:
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 |
Definition at line 30 of file Physics.h.
Physics::Physics | ( | Renderer * | r | ) |
Definition at line 47 of file Physics.cpp.
Physics::~Physics | ( | ) | [virtual] |
Definition at line 64 of file Physics.cpp.
void Physics::Tick | ( | ) |
void Physics::Render | ( | ) |
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] |
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 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] |
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.
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.
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.
bool Physics::HasCollided | ( | int | Ob | ) |
Definition at line 804 of file Physics.cpp.