All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsDiffuseSpecularMaterial.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 #include <string>
14 
15 namespace Eegeo
16 {
17  namespace Resources
18  {
19  namespace Interiors
20  {
21 
23  {
24  public:
25  InteriorsDiffuseSpecularMaterial(const Rendering::TMaterialId materialId,
26  const std::string& name,
27  const Lighting::GlobalLighting& lighting,
28  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
29  bool useAlternativeAmbient,
30  bool isTranslucent,
31  const v4& diffuseColor,
32  InteriorsRenderableLayer::Type renderableLayer,
33  const InteriorsDiffuseSpecularShader& shader,
34  IInteriorsTextureResource& diffuseTexture,
35  Rendering::TextureMinifyType textureMinifyType,
36  bool textureRepeat,
37  const v3& specularColor,
38  float specularPower,
39  float specularModulateTexture,
40  float specularityFromTextureLuminance,
41  float viewOffsetScale);
42 
43 
44 
46 
47  const Eegeo::Rendering:: Shader& GetShader() const;
48 
49  void SetState(Eegeo::Rendering::GLState& glState) const;
50 
51  void SetStatePerRenderable(const Eegeo::Rendering::RenderableBase* renderableBase, Eegeo::Rendering::GLState& glState) const;
52 
53  private:
54  const InteriorsDiffuseSpecularShader& m_shader;
55  IInteriorsTextureResource& m_diffuseTexture;
56  const Rendering::TextureMinifyType m_textureMinifyType;
57  const bool m_textureRepeat;
58  const v3 m_specularColor;
59  const float m_specularPower;
60  const float m_specularModulateTexture;
61  const float m_specularityFromTextureLuminance;
62  const float m_viewOffsetScale;
63  };
64  }
65  }
66 }