5 #include "PackedRenderable.h"
8 #include "CullingVolume.h"
9 #include "VectorMathDecl.h"
10 #include "AsyncTexturing.h"
11 #include "IAsyncTexture.h"
25 LayerIds::Values layerId,
35 const std::string& landmarkTextureName,
36 const std::string& renderableName)
48 , m_landmarkTextureName(landmarkTextureName)
49 , m_renderableName(renderableName)
51 , m_originalEcefPosition(ecefPosition)
60 virtual void ClearTextures()
62 for (std::map<std::string, Rendering::AsyncTexturing::IAsyncTexture*>::iterator it = m_textureIdsByState.begin();
63 it != m_textureIdsByState.end();
66 it->second->Release();
68 m_textureIdsByState.clear();
71 const std::string& GetLandmarkTextureName()
const
73 return m_landmarkTextureName;
76 const std::string& GetRenderableName()
const
78 return m_renderableName;
83 Eegeo_ASSERT(m_textureIdsByState.find(stateName) == m_textureIdsByState.end(),
"state already registered");
84 m_textureIdsByState[stateName] = &asyncTexture;
87 TTextureId GetTextureForState(
const std::string& stateName)
const
90 return pAsyncTexture->GetTextureInfo().textureId;
93 bool ShouldRender()
const
95 const float MinimumAlphaForRendering = 1.0f / 256.0f;
96 return m_alpha > MinimumAlphaForRendering;
99 const dv3& GetOriginalEcefPosition()
const {
return m_originalEcefPosition; }
101 virtual void SetAlpha(
float alpha) { m_alpha = alpha; }
102 float GetAlpha()
const {
return m_alpha; }
105 const std::string m_landmarkTextureName;
106 const std::string m_renderableName;
107 std::map<std::string, Rendering::AsyncTexturing::IAsyncTexture*> m_textureIdsByState;
110 const dv3 m_originalEcefPosition;