All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsStencilMirrorMaterial.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Interiors.h"
6 #include "InteriorsMaterialBase.h"
7 #include "TextureMinifyType.h"
8 #include "IdTypes.h"
9 #include "Rendering.h"
10 #include "Lighting.h"
11 #include "VectorMath.h"
12 
13 #include <string>
14 
15 namespace Eegeo
16 {
17  namespace Resources
18  {
19  namespace Interiors
20  {
21 
23  {
24  public:
25  InteriorsStencilMirrorMaterial(const Rendering::TMaterialId materialId,
26  const std::string& name,
27  const Lighting::GlobalLighting& lighting,
28  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
29  bool useAlternativeAmbient,
30  const v4& diffuseColor,
31  const InteriorsStencilMirrorShader& shader,
32  IInteriorsTextureResource& diffuseTexture,
33  Rendering::TextureMinifyType textureMinifyType,
34  bool textureRepeat,
35  const v3& mirrorClearColor,
36  float fresnelBias,
37  float fresnelScale,
38  float fresnelPower,
39  float viewOffsetScale);
40 
42 
43  const Eegeo::Rendering:: Shader& GetShader() const;
44 
45  void OnAssignedToRenderable(Rendering::Renderables::InteriorRenderable& renderable);
46 
47  void SetState(Eegeo::Rendering::GLState& glState) const;
48 
49  void SetStatePerRenderable(const Eegeo::Rendering::RenderableBase* renderableBase, Eegeo::Rendering::GLState& glState) const;
50 
51  private:
52  const InteriorsStencilMirrorShader& m_shader;
53  IInteriorsTextureResource& m_diffuseTexture;
54  const Rendering::TextureMinifyType m_textureMinifyType;
55  const bool m_textureRepeat;
56  const v3 m_mirrorClearColor;
57  const float m_fresnelBias;
58  const float m_fresnelScale;
59  const float m_fresnelPower;
60  const float m_viewOffsetScale;
61 
62  };
63  }
64  }
65 }