All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
HeatmapTextureMethods.h
1 #pragma once
2 
3 #include "HeatmapShapes.h"
4 #include "VectorMathDecl.h"
5 #include "Geometry.h"
6 #include "Helpers.h"
7 #include "AsyncTexturing.h"
8 
9 #include <vector>
10 
11 namespace Eegeo
12 {
13  namespace Shapes
14  {
15  namespace Heatmaps
16  {
17  namespace HeatmapTextureMethods
18  {
19  void BuildBinormals(const v3& normal, v3& out_binormalA, v3& out_binormalB);
20 
21  float CalculateParameterizationHalfExtentMeters(
22  const Geometry::OrientedBox2& orientedBox,
23  const float borderPercent
24  );
25 
26  m44 BuildWorldToTextureCoordTransform(
27  const v3& normal,
28  const v3& binormalA,
29  const v3& binormalB,
30  const Geometry::OrientedBox2& orientedBox,
31  float parameterizationHalfExtentMeters
32  );
33 
34  void WriteGradientTexture(
35  const std::vector<float>& gradientStops,
36  const std::vector<v4>& gradientColors,
37  const Helpers::GLHelpers::TextureInfo& textureInfo
38  );
39 
40  Rendering::AsyncTexturing::Texture* CreateTexture(int width, int height);
41 
42  void BuildConditionedHeatmapDensityParameters(
43  const std::vector<float>& heatmapDensityStops,
44  const std::vector<double>& heatmapRadiiMeters,
45  const std::vector<double>& heatmapGains,
46  const double radiusMetersDefault,
47  std::vector<float>& out_heatmapDensityStops,
48  std::vector<double>& out_heatmapRadiiMeters,
49  std::vector<double>& out_heatmapGains
50  );
51 
52  void BuildConditionedHeatmapGradientParameters(
53  const std::vector<float>& gradientStops,
54  const std::vector<v4>& gradientColors,
55  std::vector<float>& out_gradientStops,
56  std::vector<v4>& out_gradientColors
57  );
58 
59  float CalculateDensityBlendByZoom(
60  double zoom,
61  double zoomMin,
62  double zoomMax
63  );
64  }
65  }
66  }
67 }