Scene.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <etk/math/Vector3D.hpp>
10 #include <etk/math/Matrix4.hpp>
11 #include <vector>
12 #include <ewol/debug.hpp>
13 #include <ege/camera/Camera.hpp>
14 #include <ewol/widget/Widget.hpp>
15 #include <gale/renderer/openGL/openGL.hpp>
16 #include <gale/resource/Manager.hpp>
17 #include <ege/elements/Element.hpp>
18 #include <gale/Dimension.hpp>
19 
20 class btBroadphaseInterface;
21 class btCollisionShape;
22 class btOverlappingPairCache;
23 class btCollisionDispatcher;
24 class btConstraintSolver;
25 struct btCollisionAlgorithmCreateFunc;
26 class btDefaultCollisionConfiguration;
27 class btDynamicsWorld;
28 #include <LinearMath/btScalar.h>
29 class btVector3;
30 #include <ewol/widget/Widget.hpp>
31 #include <esignal/Signal.hpp>
32 
33 namespace ege {
34  namespace widget {
35  class Scene : public ewol::Widget {
36  public:
37  // signals
38  esignal::Signal<ememory::SharedPtr<ewol::resource::Colored3DObject>/*, ememory::SharedPtr<ege::Camera>*/> signalDisplayDebug;
39  // properties
40  eproperty::Value<bool> propertyDebugPhysic;
41  eproperty::Value<bool> propertyDebugApplication;
42  protected:
45  public:
46  protected:
51  Scene();
52  void init();
53  public:
54  void setEnv(ememory::SharedPtr<ege::Environement> _env) {
55  m_env = _env;
56  }
57  public:
58  DECLARE_FACTORY(Scene);
62  virtual ~Scene();
63  protected:
64  std::string m_cameraName;
65  public:
70  void setCamera(const std::string& _cameraName);
75  const std::string& getCamera() const {
76  return m_cameraName;
77  }
78  protected:
79  // Note : This is only for temporary elements : on the display
80  std::vector<ege::Environement::ResultNearestElement> m_displayElementOrdered;
81  protected:
82  esignal::Connection m_PCH;
83 
87  virtual void periodicCall(const ewol::event::Time& _event);
88  protected:
89  void onDraw() override;
90  void systemDraw(const ewol::DrawProperty& _displayProp) override;
91  void onRegenerateDisplay() override;
92  void calculateSize() override;
93  };
94  }
95 }
96 
std::string m_cameraName
current camera name
Definition: Scene.hpp:64
Definition: Scene.hpp:35
esignal::Connection m_PCH
Periodic call handle to remove it when needed.
Definition: Scene.hpp:82
Scene()
Constructor of the widget classes.
const std::string & getCamera() const
Get the current camera name to display the environnement.
Definition: Scene.hpp:75
Definition: AudioElement.hpp:8
eproperty::Value< bool > propertyDebugPhysic
display Physic Debug
Definition: Scene.hpp:40
esignal::Signal< ememory::SharedPtr< ewol::resource::Colored3DObject >> signalDisplayDebug
emit a signal to the application to draw the debug (setDebugPhysic)
Definition: Scene.hpp:38
void setCamera(const std::string &_cameraName)
Select a Camera for the display.
virtual void periodicCall(const ewol::event::Time &_event)
Periodic call to update grapgic display.
virtual ~Scene()
Destructor of the widget classes.
eproperty::Value< bool > propertyDebugApplication
display Application Debug
Definition: Scene.hpp:41