Ocular Engine
ARenderable.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_CORE_SCENE_ARENDERABLE__H__
19 #define __H__OCULAR_CORE_SCENE_ARENDERABLE__H__
20 
21 #include "Object.hpp"
22 
23 #include "Math/Bounds/BoundsSphere.hpp"
24 #include "Math/Bounds/BoundsAABB.hpp"
25 #include "Math/Bounds/BoundsOBB.hpp"
26 
27 #include <string>
28 
29 //------------------------------------------------------------------------------------------
30 
35 namespace Ocular
36 {
37  namespace Graphics
38  {
39  class Material;
40  }
41 
46  namespace Core
47  {
48  class SceneObject;
49 
53  class ARenderable : public Object
54  {
55  friend class SceneObject;
56 
57  public:
58 
59  ARenderable(std::string const& name = "ARenderable", std::string const& type = "ARenderable", SceneObject* parent = nullptr);
60  virtual ~ARenderable();
61 
62  virtual bool initialize();
63 
72  virtual bool preRender();
73 
77  virtual void render();
78 
87  virtual void render(Graphics::Material* material);
88 
100  virtual void postRender();
101 
112  virtual bool preRenderDebug();
113 
122  virtual void renderDebug();
123 
132  virtual void postRenderDebug();
133 
137  virtual void buildBounds(Math::BoundsSphere* sphere, Math::BoundsAABB* aabb, Math::BoundsOBB* obb, Math::Matrix4x4 const& matrix = Math::Matrix4x4());
138 
139  //------------------------------------------------------------
140  // Getters and Setters
141  //------------------------------------------------------------
142 
146  SceneObject* getParent() const;
147 
151  std::string const& getName() const;
152 
166  virtual uint32_t getRenderPriority() const;
167 
168  protected:
169 
170  SceneObject* m_Parent;
171 
172  private:
173  };
174  }
175 }
176 
177 //------------------------------------------------------------------------------------------
178 
179 #endif
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: BoundsOBB.hpp:56
virtual void postRender()
Definition: ARenderable.cpp:73
virtual void renderDebug()
Definition: ARenderable.cpp:83
Definition: SceneObject.hpp:93
Definition: ARenderable.hpp:53
virtual uint32_t getRenderPriority() const
Definition: ARenderable.cpp:108
A 4x4 column-major float matrix.
Definition: Matrix4x4.hpp:64
virtual void postRenderDebug()
Definition: ARenderable.cpp:88
SceneObject * getParent() const
Definition: ARenderable.cpp:98
Definition: BoundsAABB.hpp:63
std::string const & getName() const
Definition: ARenderable.cpp:103
Definition: BoundsSphere.hpp:52
Base class of all representable Ocular constructs.
Definition: Object.hpp:44
virtual bool preRender()
Definition: ARenderable.cpp:58
virtual bool preRenderDebug()
Definition: ARenderable.cpp:78
Definition: Material.hpp:62
virtual void render()
Definition: ARenderable.cpp:63