HatchitGame
ht_meshrenderer_component.h
1 
15 #pragma once
16 
17 #include <ht_meshrenderer.h>
18 #include <ht_component.h>
19 
20 namespace Hatchit {
21 
22  namespace Game {
23 
24  class MeshRenderer : public Component
25  {
26  public:
27  MeshRenderer(void);
28 
29  virtual Core::JSON VSerialize(void) override;
30  virtual bool VDeserialize(const Core::JSON& jsonObject) override;
31 
32  void SetRenderable(Graphics::MeshHandle mesh,
33  Graphics::MaterialHandle material);
34 
38  void VOnInit() override;
39 
44  void VOnUpdate() override;
45 
49  Component* VClone() const override;
50 
51  virtual Core::Guid VGetComponentId(void) const override;
52  protected:
53 
58  void VOnEnabled() override;
59 
60 
66  void VOnDisabled() override;
67 
73  void VOnDestroy() override;
74 
75  private:
76  Graphics::MeshRenderer* m_meshRenderer;
77  Graphics::ShaderVariableChunk* m_instanceData;
78  };
79 
80  }
81 
82 }
virtual Core::Guid VGetComponentId(void) const override
Retrieves the id associated with this class of Component.
Definition: ht_meshrenderer_component.cpp:139
void VOnDisabled() override
Called when the Component is disabled.
Definition: ht_meshrenderer_component.cpp:149
Definition: ht_component.h:42
void VOnEnabled() override
Called when the Component is enabled.
Definition: ht_meshrenderer_component.cpp:144
Hatchit Engine Copyright(c) 2015-2016 Third-Degree.
Definition: ht_glfwkeyboard.h:21
Definition: ht_meshrenderer_component.h:24
void VOnUpdate() override
Called once per frame while the GameObject is enabled.
Definition: ht_meshrenderer_component.cpp:120
void VOnInit() override
Called when the GameObject is created to initialize all values.
Definition: ht_meshrenderer_component.cpp:112
Component * VClone() const override
Creates a copy of this Component.
Definition: ht_meshrenderer_component.cpp:128
void VOnDestroy() override
Called when the GameObject is destroyed/deleted.
Definition: ht_meshrenderer_component.cpp:154