HatchitGame
ht_camera_component.h
1 
15 #include <ht_math.h>
16 #include <ht_component.h>
17 #include <ht_camera.h>
18 
19 namespace Hatchit {
20 
21  namespace Game {
22 
23  class Camera : public Component
24  {
25  public:
26  Camera();
27 
31  virtual Core::JSON VSerialize(void) override;
32  virtual bool VDeserialize(const Core::JSON& jsonObject) override;
33  void VOnInit() override;
34 
39  void VOnUpdate() override;
40 
46  void VOnDestroy() override;
47 
51  Component* VClone(void) const override;
52 
53  virtual Core::Guid VGetComponentId(void) const override;
54  protected:
55 
60  void VOnEnabled() override;
61 
67  void VOnDisabled() override;
68 
69  private:
70  void Move();
71  void Rotate();
72 
73  bool m_useWindowScale;
74  float m_height;
75  float m_width;
76 
77  float m_fov;
78  float m_near;
79  float m_far;
80  uint32_t m_layer;
81 
82  float m_speed;
83  float m_yaw;
84  float m_pitch;
85 
86  Graphics::Camera m_camera;
87  Graphics::Renderer* m_renderer;
88  };
89 
90  }
91 
92 }
virtual Core::Guid VGetComponentId(void) const override
Retrieves the id associated with this class of Component.
Definition: ht_camera_component.cpp:135
void VOnDestroy() override
Called when the GameObject is destroyed/deleted.
Definition: ht_camera_component.cpp:119
void VOnEnabled() override
Called when the Component is enabled.
Definition: ht_camera_component.cpp:109
virtual Core::JSON VSerialize(void) override
Called when the GameObject is created to initialize all values.
Definition: ht_camera_component.cpp:44
void VOnDisabled() override
Called when the Component is disabled.
Definition: ht_camera_component.cpp:114
void VOnInit() override
Called when the GameObject is created to initialize all values.
Definition: ht_camera_component.cpp:91
Definition: ht_component.h:42
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
Definition: ht_camera_component.h:23
Component * VClone(void) const override
Creates a copy of this Component.
Definition: ht_camera_component.cpp:124
void VOnUpdate() override
Called once per frame while the GameObject is enabled.
Definition: ht_camera_component.cpp:96