8#include <ext/reactphysics3d/src/engine/DynamicsWorld.h>
47 reactphysics3d::DynamicsWorld
world;
91 Body*
addRigidBody(
const string&
id,
bool enabled, uint16_t collisionTypeId,
const Transformations& transformations,
float restitution,
float friction,
float mass,
const Vector3& inertiaTensor, vector<BoundingVolume*> boundingVolumes);
133 void update(
float deltaTime);
183 bool doesCollideWith(uint16_t collisionTypeIds,
const Transformations& transformations, vector<BoundingVolume*> boundingVolumes, vector<Body*>& rigidBodies);
Dynamic rigid/static rigid/collision body class.
Dynamic physics world class.
Body * addRigidBody(const string &id, bool enabled, uint16_t collisionTypeId, const Transformations &transformations, float restitution, float friction, float mass, const Vector3 &inertiaTensor, vector< BoundingVolume * > boundingVolumes)
Add a rigid body.
Body * addStaticRigidBody(const string &id, bool enabled, uint16_t collisionTypeId, const Transformations &transformations, float friction, vector< BoundingVolume * > boundingVolumes)
Add a static rigid body.
Body * getBody(const string &id)
Returns body identified by id.
Body * doRayCasting(uint16_t collisionTypeIds, const Vector3 &start, const Vector3 &end, Vector3 &hitPoint, const string &actorId=string())
Do a ray cast from given start to given end point, if there is any body with given collision type in ...
Body * determineHeight(uint16_t collisionTypeId, float stepUpMax, const Vector3 &point, Vector3 &dest, float minHeight=-10000.0f, float maxHeight=10000.0f)
Determine height on x,y,u while respecting step up max.
bool doCollide(Body *body1, Body *body2)
Check if body 1 collides with body 2.
void removeBody(const string &id)
Removes body identified by id.
map< string, Body * > bodiesById
bool getCollisionResponse(Body *body1, Body *body2, CollisionResponse &collision)
Get collision response.
reactphysics3d::DynamicsWorld world
World()
Public constructor.
bool doesCollideWith(uint16_t collisionTypeIds, Body *body, vector< Body * > &rigidBodies)
Check if world collides with given body.
void addWorldListener(WorldListener *listener)
Add a world listener.
map< string, BodyCollisionStruct > bodyCollisionsLastFrame
void synch(Body *clonedBody, Body *body)
Synch into cloned body from body.
vector< Body * > rigidBodiesDynamic
World * clone(uint16_t collisionTypeIds=~0)
Clone this world.
Body * addCollisionBody(const string &id, bool enabled, uint16_t collisionTypeId, const Transformations &transformations, vector< BoundingVolume * > boundingVolumes)
Add a collision body.
vector< WorldListener * > worldListeners
void removeWorldListener(WorldListener *listener)
Remove a world listener.
void update(float deltaTime)
Update world.
void reset()
Resets the physic world.
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
Bounding volume interface.
World listener which is about notifying adding or removing bodies.