Ocular Engine
CameraDisplay.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_EDITOR_CAMERA_DISPLAY__H__
19 #define __H__OCULAR_EDITOR_CAMERA_DISPLAY__H__
20 
21 #include "Widgets/Properties/PropertiesDisplayBox.hpp"
22 #include "Widgets/Properties/Types/ColorProperty.hpp"
23 #include "Widgets/Standard/LineEdit.hpp"
24 
25 //------------------------------------------------------------------------------------------
26 
31 namespace Ocular
32 {
33  namespace Core
34  {
35  class Camera;
36  }
37 
42  namespace Editor
43  {
44  class ComboBox;
45  class FloatProperty;
46  class MultiProperty;
47 
54  {
55  public:
56 
57  CameraDisplay(QWidget* parent = nullptr);
58  ~CameraDisplay();
59 
60  //------------------------------------------------------------
61 
62  virtual void setObject(Core::SceneObject* object) override;
63  virtual void updateProperties() override;
64 
65  protected:
66 
67  void updateProjection();
68  void updateClearColor();
69  void updateFrustum();
70 
71  void togglePerspective();
72  void toggleOrthographic();
73 
74  private:
75 
76  Core::Camera* m_Camera;
77  Math::Frustum m_Frustum;
78 
79  //------------------------------------------------------------
80  // General Properties
81 
82  ComboBox* m_ComboProjection;
83 
84  PropertyWidget* m_PropertyProjection;
85  PropertyWidget* m_PropertyClearColor;
86 
87  //------------------------------------------------------------
88  // Frustum Properties
89 
90  MultiProperty* m_PropertyClipping;
91  MultiProperty* m_PropertyXSize;
92  MultiProperty* m_PropertyYSize;
93  FloatProperty* m_PropertyFieldOfView;
94  };
95  }
99 }
104 //------------------------------------------------------------------------------------------
105 
106 #endif
Definition: ComboBox.hpp:42
Definition: CameraDisplay.hpp:53
Parent class for all general property widgets.
Definition: PropertyWidget.hpp:51
Definition: Frustum.hpp:57
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: FloatProperty.hpp:43
Definition: MultiProperty.hpp:45
Definition: SceneObject.hpp:93
Definition: PropertiesDisplayBox.hpp:46
Definition: Camera.hpp:79