ISceneObject.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 
5 #include <ionCore.h>
6 #include <ionMath.h>
7 #include <ionGraphics.h>
8 
9 
10 namespace ion
11 {
12  namespace Scene
13  {
14 
15  class CRenderPass;
16 
18  {
19 
20  public:
21 
23  // General Methods //
25 
27  virtual ~ISceneObject();
28 
30  virtual bool IsVisible() const;
31 
33  virtual bool IsLoaded(CRenderPass const * RenderPass) const;
34 
36  virtual void TriggerReload();
37 
39  virtual void SetVisible(bool const isVisible);
40 
42  virtual void SetDebugName(string const & DebugName);
43 
45  virtual string const & GetDebugName() const;
46 
47 
49  // Model Transform Methods //
51 
53  virtual STransformation3 const & GetTransformation() const;
54 
56  virtual void SetTransformation(glm::mat4 const & transformation);
57 
59  virtual void SetTranslation(vec3f const & translation);
60 
62  virtual void SetPosition(vec3f const & translation);
63 
65  virtual void SetRotation(vec3f const & rotation);
66 
68  virtual void SetRotation(glm::mat4 const & matrix);
69 
71  virtual void SetScale(vec3f const & scale);
72 
74  virtual vec3f GetRotation() const;
75 
77  virtual vec3f GetTranslation() const;
78 
80  virtual vec3f GetPosition() const;
81 
83  virtual vec3f GetScale() const;
84 
85  void SetRotationOrder(ERotationOrder const RotationOrder);
86 
88 
89  void SetTransformationOrder(ETransformationOrder const TransformationOrder);
90 
92 
93 
95  // Implementation Methods //
97 
98  virtual void Load(CRenderPass * RenderPass) = 0;
99  virtual void Draw(CRenderPass * RenderPass) = 0;
100 
101 
102  protected:
103 
105 
107  bool Visible = true;
108 
110  map<CRenderPass const *, bool> Loaded;
111 
112  string DebugName = "";
113 
114  };
115 
116  }
117 }
virtual vec3f GetRotation() const
Rotation acessor (euler angles)
Definition: ISceneObject.cpp:83
virtual bool IsVisible() const
Check if visible.
Definition: ISceneObject.cpp:13
string DebugName
Definition: ISceneObject.h:112
Describes a 3D transformation as a composed translation, rotation, and scale.
Definition: STransformation3.h:38
virtual vec3f GetScale() const
Scale accessor.
Definition: ISceneObject.cpp:98
ERotationOrder
Order of rotations, i.e. Euler angles, used by STransformation3.
Definition: STransformation3.h:25
ERotationOrder GetRotationOrder() const
Definition: ISceneObject.cpp:108
Definition: ISceneObject.h:17
virtual void Load(CRenderPass *RenderPass)=0
virtual void SetTranslation(vec3f const &translation)
Translation mutator.
Definition: ISceneObject.cpp:58
virtual STransformation3 const & GetTransformation() const
Transformation accessor.
Definition: ISceneObject.cpp:48
ETransformationOrder GetTransformationOrder() const
Definition: ISceneObject.cpp:118
virtual void Draw(CRenderPass *RenderPass)=0
virtual vec3f GetTranslation() const
Translation accessor.
Definition: ISceneObject.cpp:88
virtual void SetScale(vec3f const &scale)
Scale mutator.
Definition: ISceneObject.cpp:78
void SetTransformationOrder(ETransformationOrder const TransformationOrder)
Definition: ISceneObject.cpp:113
virtual void SetRotation(vec3f const &rotation)
Rotation mutator (euler angles)
Definition: ISceneObject.cpp:68
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
void SetRotationOrder(ERotationOrder const RotationOrder)
Definition: ISceneObject.cpp:103
virtual void SetPosition(vec3f const &translation)
See SetTranslation (duplicate method)
Definition: ISceneObject.cpp:63
STransformation3 Transformation
Definition: ISceneObject.h:104
virtual void SetTransformation(glm::mat4 const &transformation)
Transformation mutator.
Definition: ISceneObject.cpp:53
virtual void SetDebugName(string const &DebugName)
Debug name mutator.
Definition: ISceneObject.cpp:38
map< CRenderPass const *, bool > Loaded
Whether this object has been loaded yet.
Definition: ISceneObject.h:110
Definition: CRenderPass.h:16
virtual ~ISceneObject()
Destructor.
Definition: ISceneObject.cpp:10
virtual void SetVisible(bool const isVisible)
Set visibility.
Definition: ISceneObject.cpp:33
virtual bool IsLoaded(CRenderPass const *RenderPass) const
Check if loaded.
Definition: ISceneObject.cpp:18
bool Visible
Whether or not to draw this object.
Definition: ISceneObject.h:107
virtual vec3f GetPosition() const
Position accessor.
Definition: ISceneObject.cpp:93
virtual void TriggerReload()
Trigger a reload at next draw.
Definition: ISceneObject.cpp:25
ETransformationOrder
Order of transformations used by STransformation3.
Definition: STransformation3.h:13
virtual string const & GetDebugName() const
Debug name accessor.
Definition: ISceneObject.cpp:43