All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsCubeMappedMaterial.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  InteriorsCubeMappedMaterial(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 InteriorsCubeMappedShader& shader,
34  IInteriorsTextureResource& diffuseTexture,
35  Rendering::TextureMinifyType textureMinifyType,
36  bool textureRepeat,
37  const v3& reflectionColor,
38  IInteriorsTextureResource& cubeMapTexture,
39  float viewOffsetScale);
40 
41 
42 
44 
45  const Eegeo::Rendering:: Shader& GetShader() const;
46 
47  void OnAssignedToRenderable(Rendering::Renderables::InteriorRenderable& renderable);
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 InteriorsCubeMappedShader& m_shader;
55  IInteriorsTextureResource& m_diffuseTexture;
56  const Rendering::TextureMinifyType m_textureMinifyType;
57  const bool m_textureRepeat;
58  const v3 m_reflectionColor;
59  IInteriorsTextureResource& m_cubeMapTexture;
60  const float m_viewOffsetScale;
61 
62  };
63  }
64  }
65 }