Engine.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 namespace ege {
9  namespace physics {
10  class Engine;
11  };
12 };
13 #include <etk/types.hpp>
14 #include <etk/math/Vector3D.hpp>
15 #include <etk/math/Matrix4.hpp>
16 #include <vector>
17 #include <ewol/debug.hpp>
18 #include <ege/camera/Camera.hpp>
19 #include <ewol/widget/Widget.hpp>
20 #include <gale/renderer/openGL/openGL.hpp>
21 #include <gale/resource/Manager.hpp>
22 #include <gale/Dimension.hpp>
23 
24 
25 class btBroadphaseInterface;
26 class btCollisionShape;
27 class btOverlappingPairCache;
28 class btCollisionDispatcher;
29 class btConstraintSolver;
30 struct btCollisionAlgorithmCreateFunc;
31 class btDefaultCollisionConfiguration;
32 class btDynamicsWorld;
33 #include <LinearMath/btScalar.h>
34 class btVector3;
35 
36 
37 //#include <ege/elements/Element.h>
38 
39 namespace ege {
40  namespace physics {
41  class Engine {
42  private:
49  public:
50  Engine();
51  ~Engine();
52  void setBulletConfig(ememory::SharedPtr<btDefaultCollisionConfiguration> _collisionConfiguration=nullptr,
56  ememory::SharedPtr<btDynamicsWorld> _dynamicsWorld=nullptr);
62  m_dynamicsWorld=_newWorld;
63  };
69  return m_dynamicsWorld;
70  };
71  public:
72  // Define a collision point ==> for debug only ...
75  public:
78  vec3 positionElem1;
79  vec3 positionElem2;
80  vec3 normalElem2;
83  const vec3& _pos1,
84  const vec3& _pos2,
85  const vec3& _normal) :
86  elem1(_elem1),
87  elem2(_elem2),
88  positionElem1(_pos1),
89  positionElem2(_pos2),
90  normalElem2(_normal) { }
91  };
96  std::vector<ege::physics::Engine::collisionPoints> getListOfCollision();
97  };
98  }
99 }
100 
Definition: Engine.hpp:74
void setDynamicWorld(const ememory::SharedPtr< btDynamicsWorld > &_newWorld)
set the curent world
Definition: Engine.hpp:61
Definition: AudioElement.hpp:8
Definition: Engine.hpp:41
ememory::SharedPtr< btDynamicsWorld > getDynamicWorld()
get the curent world
Definition: Engine.hpp:68