All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
RouteViewGeometryFactoryTangentVert.h
1 // Copyright eeGeo Ltd (2012-2014), All Rights Reserved
2 
3 #pragma once
4 
5 #include "RouteVertexClassification.h"
6 #include "VectorMath.h"
7 
8 //#define CURVE_COLOURING
9 //#define CURVE_FLOW_COLOURING
10 //#define CURVE_ADJUSTMENT_COLOURING
11 //#define ROUTE_VIEW_RESERVE_CHECKS
12 
13 namespace Eegeo
14 {
15  namespace Routes
16  {
17  namespace View
18  {
19  // TODO: Move this elsewhere. It's causing pain with definition of isnan though...
20  inline bool hasNan(const Eegeo::v2 v)
21  {
22  return (std::isnan(v.x) || std::isnan(v.y));
23  }
24 
25  // cut-down struct for processing data
26  struct RouteVert
27  {
28  RouteVert()
29  : tangentVert(v2::Zero())
30  , offset(v2::Zero())
31  , colour(v4::Zero())
32  {}
33 
34  v2 tangentVert;
35  float height;
36  float halfWidth;
37  RouteVertexClassification classification;
38  v2 offset;
39  v4 colour;
40  };
41  }
42  }
43 }