All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteViewGeometryFactoryConfig.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "MathFunc.h"
6 
7 namespace Eegeo
8 {
9  namespace Routes
10  {
11  namespace View
12  {
14  {
15  bool enabledCurves;
16  float roadFilterTolerance;
17  float curveAngleThresholdInDegrees;
18  int bezierSegmentCount;
19 
20  // Note: I mean the canonical meaning of level, not the C++ impl
21  int coarsestKeyLevelToGenerateCurvedGeometry;
22 
23  inline float CurveAngleThresholdDot() const
24  {
25  return Math::Cos(curveAngleThresholdInDegrees);
26  }
27 
29  : enabledCurves(true)
30  , roadFilterTolerance(0.f)
31  , curveAngleThresholdInDegrees(0.f)
32  , bezierSegmentCount(5)
33  , coarsestKeyLevelToGenerateCurvedGeometry(11)
34  {}
35 
36  static RouteViewGeometryFactoryConfig DefaultConfig()
37  {
39  config.enabledCurves = true;
40  config.roadFilterTolerance = 2.f;
41  config.curveAngleThresholdInDegrees = 45.f;
42  config.bezierSegmentCount = 5;
43  config.coarsestKeyLevelToGenerateCurvedGeometry = 11;
44 
45  return config;
46  }
47  };
48  }
49  }
50 }