All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RoadNameGeometryBuilder.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "Roads.h"
6 #include "Rendering.h"
7 #include "Types.h"
8 #include "Fonts.h"
9 #include "TextMeshes.h"
10 #include "ChunkedFileFormat.h"
11 #include "Space.h"
12 #include "VectorMathDecl.h"
13 #include "TextRenderableConfiguration.h"
14 
15 #include <vector>
16 
17 namespace Eegeo
18 {
19  namespace Resources
20  {
21  namespace Roads
22  {
24  {
25  public:
26  RoadNameGeometryBuilder(const RoadNameTransformBuilder& roadNameTransformBuilder,
27  TextMeshes::PreTransformedTextMeshBuilder& preTransformedTextMeshBuilder,
28  int maxCharsPerRoadName,
29  const Fonts::FontInstance& roadNameFont,
30  const Fonts::FontMaterialSet& roadNameMaterials,
33  float textSize
34  );
35 
36  void BuildFromRoadNameData(const Eegeo::Space::CubeMap::CubeMapCellInfo& cellInfo, const std::vector<RoadNameData>& roadNameDatas, std::vector<Rendering::Renderables::TextRenderable*>& out_roadNameRenderables);
37 
38  void BuildFromChunkReaderRoadNames(const Eegeo::Space::CubeMap::CubeMapCellInfo& cellInfo, const IO::ChunkedFileFormat::RoadNamesChunkReader::RoadNames& roadNames, std::vector<Rendering::Renderables::TextRenderable*>& out_roadNameRenderables);
39  private:
40  void CreateRenderables(const Eegeo::Space::CubeMap::CubeMapCellInfo& cellInfo, std::vector<Rendering::Renderables::TextRenderable*>& out_roadNameRenderables);
41 
42  void SetupTextRenderable(Rendering::Renderables::TextRenderable& textRenderable) const;
43 
44  const RoadNameTransformBuilder& m_roadNameTransformBuilder;
45  TextMeshes::PreTransformedTextMeshBuilder& m_preTransformedTextMeshBuilder;
46  const int m_maxCharsPerRoadName;
47  const Fonts::FontInstance& m_roadNameFont;
48  const Fonts::FontMaterialSet& m_roadNameMaterials;
51  float m_textSize;
52 
53  std::vector<u32> m_stringScratch;
54  };
55  }
56  }
57 }