All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsReflectionMaterial.h
1 // Copyright eeGeo Ltd (2012-2015), All Rights Reserved
2 
3 #pragma once
4 
5 
6 #include "Interiors.h"
7 #include "InteriorsMaterialBase.h"
8 #include "TextureMinifyType.h"
9 #include "IdTypes.h"
10 #include "Rendering.h"
11 #include "Lighting.h"
12 #include "VectorMath.h"
13 
14 
15 #include <string>
16 
17 namespace Eegeo
18 {
19  namespace Resources
20  {
21  namespace Interiors
22  {
23 
25  {
26  public:
27  InteriorsReflectionMaterial(const Rendering::TMaterialId materialId,
28  const std::string& name,
29  const Lighting::GlobalLighting& lighting,
30  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
31  bool useAlternativeAmbient,
32  bool isTranslucent,
33  const v4& diffuseColor,
34  InteriorsRenderableLayer::Type renderableLayer,
35  const InteriorsDiffuseSpecularShader& shader,
36  IInteriorsTextureResource* pDiffuseTexture,
37  Rendering::TextureMinifyType textureMinifyType,
38  bool textureRepeat,
39  const v3& specularColor,
40  float specularPower,
41  float specularModulateTexture,
42  float specularityFromTextureLuminance,
43  const v4& reflectionPlaneTangentSpace);
44 
45 
47 
48  const Eegeo::Rendering:: Shader& GetShader() const;
49 
50  void OnAssignedToRenderable(Rendering::Renderables::InteriorRenderable& renderable);
51 
52  void SetState(Eegeo::Rendering::GLState& glState) const;
53 
54  void SetStatePerRenderable(const Eegeo::Rendering::RenderableBase* renderableBase, Eegeo::Rendering::GLState& glState) const;
55 
56  private:
57  const InteriorsDiffuseSpecularShader& m_shader;
58  IInteriorsTextureResource* m_pDiffuseTexture;
59  const Rendering::TextureMinifyType m_textureMinifyType;
60  const bool m_textureRepeat;
61  const v3 m_specularColor;
62  const float m_specularPower;
63  const float m_specularModulateTexture;
64  const float m_specularityFromTextureLuminance;
65  const v4 m_reflectionPlaneTangentSpace;
66  };
67  }
68  }
69 }