CARLA
GraphTypes.h
Go to the documentation of this file.
1 // Copyright (c) 2017 Computer Vision Center (CVC) at the Universitat Autonoma
2 // de Barcelona (UAB).
3 //
4 // This work is licensed under the terms of the MIT license.
5 // For a copy, see <https://opensource.org/licenses/MIT>.
6 
7 #pragma once
8 
10 #include "Carla/Util/NonCopyable.h"
11 
12 #include <vector>
13 
14 namespace MapGen {
15 
16 #ifdef CARLA_ROAD_GENERATOR_EXTRA_LOG
17 
18  /// For debug only purposes.
19  template <char C>
20  struct DataIndex : private NonCopyable
21  {
22 
23  DataIndex() : index(++NEXT_INDEX) {}
24 
25  static void ResetIndex() {
26  NEXT_INDEX = 0u;
27  }
28 
29  template <typename OSTREAM>
30  friend OSTREAM &operator<<(OSTREAM &os, const DataIndex &d) {
31  os << C << d.index;
32  return os;
33  }
34 
35  // private:
36 
37  uint32 index = 0u;
38 
39  static uint32 NEXT_INDEX;
40  };
41 
42 # define INHERIT_GRAPH_TYPE_BASE_CLASS(c) : public DataIndex<c>
43 #else
44 # define INHERIT_GRAPH_TYPE_BASE_CLASS(c) : private NonCopyable
45 #endif // CARLA_ROAD_GENERATOR_EXTRA_LOG
46 
48  {
49  uint32 EdgeCount;
50  bool bIsIntersection = true; // at this point every node is an intersection.
51  EIntersectionType IntersectionType;
52  float Rotation;
53  std::vector<float> Rots;
54  };
55 
57  {
58  float Angle;
59  };
60 
62  {
63  };
64 
65 #undef INHERIT_GRAPH_TYPE_BASE_CLASS
66 
67 } // namespace MapGen
std::ostream & operator<<(std::ostream &out, const ::carla::client::Timestamp &timestamp)
standard ostream operator
Definition: Timestamp.h:65
geom::Rotation Rotation
Definition: rpc/Transform.h:14
struct GraphNode INHERIT_GRAPH_TYPE_BASE_CLASS('n')
Definition: GraphTypes.h:47