CSimpleSceneObject.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "ISceneObject.h"
5 #include "CSimpleMesh.h"
6 
7 
8 namespace ion
9 {
10  namespace Scene
11  {
12 
14  {
15 
16  public:
17 
19 
20  virtual void Load(CRenderPass * RenderPass);
21  virtual void Draw(CRenderPass * RenderPass);
22 
24  virtual void SetVertexBuffer(uint const Index, SharedPointer<Graphics::IVertexBuffer> VertexBuffer);
26  virtual void SetTexture(string const & Name, SharedPointer<Graphics::ITexture> Texture);
27  virtual void SetUniform(string const & Name, SharedPointer<Graphics::IUniform> Uniform);
28  virtual void SetFeatureEnabled(Graphics::EDrawFeature const Feature, bool const Enabled);
29  virtual void SetPolygonOffsetAmount(float const Amount);
30  virtual void SetBlendMode(Graphics::EBlendMode const BlendMode);
32  virtual void SetRenderCategory(uint const Category);
33  virtual void SetInstanceCount(uint const InstanceCount);
34 
35  virtual SSimpleMaterial & GetMaterial();
36  virtual SSimpleMaterial const & GetMaterial() const;
37  virtual void SetMaterial(SSimpleMaterial const & Material);
38 
39  protected:
40 
41  map<CRenderPass *, SharedPointer<Graphics::IPipelineState>> PipelineStates;
43 
45  vector<SharedPointer<Graphics::IVertexBuffer>> VertexBuffers;
47 
48  map<string, SharedPointer<Graphics::ITexture>> Textures;
49  map<string, SharedPointer<Graphics::IUniform>> Uniforms;
50  map<Graphics::EDrawFeature, bool> DrawFeatures;
51  float PolygonOffsetAmount = 1.f;
55  uint InstanceCount = 1;
56 
57  };
58 
59  }
60 }
virtual void SetVertexBuffer(uint const Index, SharedPointer< Graphics::IVertexBuffer > VertexBuffer)
Definition: CSimpleSceneObject.cpp:84
virtual void SetUniform(string const &Name, SharedPointer< Graphics::IUniform > Uniform)
Definition: CSimpleSceneObject.cpp:113
virtual void SetMaterial(SSimpleMaterial const &Material)
Definition: CSimpleSceneObject.cpp:186
EBlendMode
Definition: IPipelineState.h:30
uint RenderCategory
Definition: CSimpleSceneObject.h:54
Definition: CSimpleMesh.h:14
std::shared_ptr< T > SharedPointer
Definition: ionSmartPointer.h:22
Definition: ISceneObject.h:17
virtual void SetPolygonOffsetAmount(float const Amount)
Definition: CSimpleSceneObject.cpp:136
virtual void SetShader(SharedPointer< Graphics::IShaderProgram > Shader)
Definition: CSimpleSceneObject.cpp:94
virtual void SetPrimitiveType(Graphics::EPrimitiveType const PrimitiveType)
Definition: CSimpleSceneObject.cpp:156
SharedPointer< Graphics::IShaderProgram > Shader
Definition: CSimpleSceneObject.h:42
virtual void SetIndexBuffer(SharedPointer< Graphics::IIndexBuffer > IndexBuffer)
Definition: CSimpleSceneObject.cpp:78
map< Graphics::EDrawFeature, bool > DrawFeatures
Definition: CSimpleSceneObject.h:50
unsigned int uint
Definition: ionTypes.h:99
Definition: CSimpleSceneObject.h:13
vector< SharedPointer< Graphics::IVertexBuffer > > VertexBuffers
Definition: CSimpleSceneObject.h:45
virtual void Load(CRenderPass *RenderPass)
Definition: CSimpleSceneObject.cpp:14
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
SSimpleMaterial Material
Definition: CSimpleSceneObject.h:46
map< string, SharedPointer< Graphics::IUniform > > Uniforms
Definition: CSimpleSceneObject.h:49
virtual void SetTexture(string const &Name, SharedPointer< Graphics::ITexture > Texture)
Definition: CSimpleSceneObject.cpp:100
Graphics::EPrimitiveType PrimitiveType
Definition: CSimpleSceneObject.h:53
virtual void SetRenderCategory(uint const Category)
Definition: CSimpleSceneObject.cpp:166
EDrawFeature
Definition: IPipelineState.h:19
Graphics::EBlendMode BlendMode
Definition: CSimpleSceneObject.h:52
Definition: CRenderPass.h:16
float PolygonOffsetAmount
Definition: CSimpleSceneObject.h:51
virtual void Draw(CRenderPass *RenderPass)
Definition: CSimpleSceneObject.cpp:69
EPrimitiveType
Definition: IPipelineState.h:38
~CSimpleSceneObject()
Definition: CSimpleSceneObject.cpp:11
virtual void SetFeatureEnabled(Graphics::EDrawFeature const Feature, bool const Enabled)
Definition: CSimpleSceneObject.cpp:126
SharedPointer< Graphics::IIndexBuffer > IndexBuffer
Definition: CSimpleSceneObject.h:44
virtual void SetBlendMode(Graphics::EBlendMode const BlendMode)
Definition: CSimpleSceneObject.cpp:146
uint InstanceCount
Definition: CSimpleSceneObject.h:55
virtual void SetInstanceCount(uint const InstanceCount)
Definition: CSimpleSceneObject.cpp:171
map< string, SharedPointer< Graphics::ITexture > > Textures
Definition: CSimpleSceneObject.h:48
virtual SSimpleMaterial & GetMaterial()
Definition: CSimpleSceneObject.cpp:176
map< CRenderPass *, SharedPointer< Graphics::IPipelineState > > PipelineStates
Definition: CSimpleSceneObject.h:41