All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
InteriorsCubeMappedAnimatedUVMaterial.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 #include "ITimeProvider.h"
13 
14 #include <string>
15 
16 namespace Eegeo
17 {
18  namespace Resources
19  {
20  namespace Interiors
21  {
22 
24  {
25  public:
26  InteriorsCubeMappedAnimatedUVMaterial(const Rendering::TMaterialId materialId,
27  const std::string& name,
28  const Lighting::GlobalLighting& lighting,
29  IInteriorsMaterialAssignmentObserver& materialAssignmentObserver,
30  bool useAlternativeAmbient,
31  bool isTranslucent,
32  const v4& diffuseColor,
33  InteriorsRenderableLayer::Type renderableLayer,
35  IInteriorsTextureResource& diffuseTexture,
36  Rendering::TextureMinifyType textureMinifyType,
37  bool textureRepeat,
38  const v3& reflectionColor,
39  IInteriorsTextureResource& cubeMapTexture,
40  float viewOffsetScale,
41  Eegeo::v2 animationScaleUV,
42  const Helpers::ITimeProvider& timeProvider);
43 
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:
58  IInteriorsTextureResource& m_diffuseTexture;
59  const Rendering::TextureMinifyType m_textureMinifyType;
60  const bool m_textureRepeat;
61  const v3 m_reflectionColor;
62  IInteriorsTextureResource& m_cubeMapTexture;
63  const float m_viewOffsetScale;
64  Eegeo::v2 m_animationScaleUV;
65 
66  const Helpers::ITimeProvider& m_timeProvider;
67 
68  };
69  }
70  }
71 }