|
i6engine
1.0
|
#include <D:/Projekte/i6engine/libs/i6engine-modules/include/i6engine/modules/physics/PhysicsManager.h>
Public Member Functions | |
| PhysicsManager (PhysicsController *pc) | |
| constructor More... | |
| ~PhysicsManager () | |
| destructor More... | |
| void | NewsCreate (const api::GameMessage::Ptr &msg) |
| handles create messages for the PhysicsManager More... | |
| void | NewsUpdate (const api::GameMessage::Ptr &msg) |
| handles update messages for the PhysicsManager More... | |
| void | NewsDelete (const api::GameMessage::Ptr &msg) |
| handles delete messages for the PhysicsManager More... | |
| void | Tick () |
| Ticks physics stuff. More... | |
| btCompoundShape * | createCompound () |
| Creates a new CompoundShape. More... | |
| btCollisionShape * | createSphere (const api::attributeMap ¶ms) |
| Creates a new RigidBody with a sphere collisionShape. More... | |
| btCollisionShape * | createFromFile (const api::attributeMap ¶ms) |
| Creates a new RigidBody from a collisionShape from a file. More... | |
| btCollisionShape * | createBox (const api::attributeMap ¶ms) |
| Creates a new RigidBody with a box collisionShape. More... | |
| btCollisionShape * | createPlane (const api::attributeMap ¶ms) |
| Creates a new RigidBody with a planes collisionShape. More... | |
| btCollisionShape * | createEmptyShape () |
| creates an empty default shape More... | |
| void | remove (btRigidBody *body) |
| Deletes a body's collisionShape and removes it from the PhysicsShapeController::_collisionShapes array. More... | |
| void | removeShape (btCollisionShape *shape) |
| btDynamicsWorld * | getPhysicsWorld () const |
| void | setGravity (const Vec3 &gravity) |
| Sets the gravity of the world. More... | |
| void | setGravity (const double gravityDown) |
| Sets the gravity of the world. More... | |
| void | addRigidBody (btRigidBody *rigidBody) |
| Adds the body to the world for simulation. More... | |
| void | removeRigidBody (btRigidBody *rigidBody) |
| Removes the body from the world to stop simulation. More... | |
| PhysicsNode * | getPhysicsNode (const int64_t id) |
| returns the PhysicsNode with the given ID More... | |
| void | addTicker (PhysicsNode *pn) |
| adds a ticking PhysicsNode More... | |
| void | removeTicker (PhysicsNode *pn) |
| removes a ticking PhysicsNode More... | |
Static Public Attributes | |
| static std::map< std::pair< PhysicsNode *, PhysicsNode * >, uint64_t > | _collisionPairs |
| stores all collision pairs More... | |
| static uint64_t | _tickCount |
| counts ticks for this subsystem More... | |
Definition at line 55 of file PhysicsManager.h.
|
explicit |
constructor
| i6e::modules::PhysicsManager::~PhysicsManager | ( | ) |
destructor
| void i6e::modules::PhysicsManager::addRigidBody | ( | btRigidBody * | rigidBody | ) |
Adds the body to the world for simulation.
| void i6e::modules::PhysicsManager::addTicker | ( | PhysicsNode * | pn | ) |
adds a ticking PhysicsNode
| btCollisionShape* i6e::modules::PhysicsManager::createBox | ( | const api::attributeMap & | params | ) |
Creates a new RigidBody with a box collisionShape.
| [in] | motionState | |
| [in] | params | attributeMap containing all values set for box |
| btCompoundShape* i6e::modules::PhysicsManager::createCompound | ( | ) |
Creates a new CompoundShape.
| btCollisionShape* i6e::modules::PhysicsManager::createEmptyShape | ( | ) |
creates an empty default shape
| btCollisionShape* i6e::modules::PhysicsManager::createFromFile | ( | const api::attributeMap & | params | ) |
Creates a new RigidBody from a collisionShape from a file.
| [in] | motionState | |
| [in] | params | attributeMap containing all values set for file |
| btCollisionShape* i6e::modules::PhysicsManager::createPlane | ( | const api::attributeMap & | params | ) |
Creates a new RigidBody with a planes collisionShape.
| [in] | motionState | |
| [in] | params | attributeMap containing all values set for plane |
| btCollisionShape* i6e::modules::PhysicsManager::createSphere | ( | const api::attributeMap & | params | ) |
Creates a new RigidBody with a sphere collisionShape.
| [in] | motionState | |
| [in] | params | attributeMap containing all values set for sphere |
| PhysicsNode* i6e::modules::PhysicsManager::getPhysicsNode | ( | const int64_t | id | ) |
returns the PhysicsNode with the given ID
| btDynamicsWorld* i6e::modules::PhysicsManager::getPhysicsWorld | ( | ) | const |
| void i6e::modules::PhysicsManager::NewsCreate | ( | const api::GameMessage::Ptr & | msg | ) |
handles create messages for the PhysicsManager
| void i6e::modules::PhysicsManager::NewsDelete | ( | const api::GameMessage::Ptr & | msg | ) |
handles delete messages for the PhysicsManager
| void i6e::modules::PhysicsManager::NewsUpdate | ( | const api::GameMessage::Ptr & | msg | ) |
handles update messages for the PhysicsManager
| void i6e::modules::PhysicsManager::remove | ( | btRigidBody * | body | ) |
Deletes a body's collisionShape and removes it from the PhysicsShapeController::_collisionShapes array.
| [in] | body | the RigidBody to be deleted |
| void i6e::modules::PhysicsManager::removeRigidBody | ( | btRigidBody * | rigidBody | ) |
Removes the body from the world to stop simulation.
| void i6e::modules::PhysicsManager::removeShape | ( | btCollisionShape * | shape | ) |
| void i6e::modules::PhysicsManager::removeTicker | ( | PhysicsNode * | pn | ) |
removes a ticking PhysicsNode
| void i6e::modules::PhysicsManager::setGravity | ( | const Vec3 & | gravity | ) |
Sets the gravity of the world.
| [in] | gravity | The "force" direction. The usual gravity is (0, -y, 0) where -y is the value of the desired gravity (9.8 in rl) |
| void i6e::modules::PhysicsManager::setGravity | ( | const double | gravityDown | ) |
Sets the gravity of the world.
| [in] | gravityDown | Sets gravity to (0, -gravityDown, 0). |
| void i6e::modules::PhysicsManager::Tick | ( | ) |
Ticks physics stuff.
|
static |
stores all collision pairs
Definition at line 60 of file PhysicsManager.h.
|
static |
counts ticks for this subsystem
Definition at line 65 of file PhysicsManager.h.