2021-01-24 22:55:36 -06:00
|
|
|
#ifndef WORLD_H
|
|
|
|
#define WORLD_H
|
|
|
|
|
|
|
|
#include <btBulletDynamicsCommon.h>
|
|
|
|
|
|
|
|
#include "Rigidbody.h"
|
|
|
|
|
|
|
|
class World {
|
|
|
|
public:
|
|
|
|
static World* GetWorld();
|
|
|
|
void AddRigidbody(Rigidbody *rigidbody);
|
2021-01-27 16:17:22 -06:00
|
|
|
void Step(float delta);
|
2021-01-24 22:55:36 -06:00
|
|
|
private:
|
|
|
|
static World* world;
|
|
|
|
btDiscreteDynamicsWorld *btWorld;
|
|
|
|
btDefaultCollisionConfiguration *collisionConfiguration;
|
|
|
|
btCollisionDispatcher *dispatcher;
|
|
|
|
btBroadphaseInterface *overlappingPairCache;
|
|
|
|
btSequentialImpulseConstraintSolver *solver;
|
|
|
|
World();
|
|
|
|
~World();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* WORLD_H */
|