CARLA
 
载入中...
搜索中...
未找到
GraphTypes.h
浏览该文件的文档.
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
11
12#include <vector>
13
14namespace 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
64
65#undef INHERIT_GRAPH_TYPE_BASE_CLASS
66
67} // namespace MapGen
#define INHERIT_GRAPH_TYPE_BASE_CLASS(c)
Definition GraphTypes.h:44
std::ostream & operator<<(std::ostream &out, const ::carla::client::Timestamp &timestamp)
standard ostream operator
Definition Timestamp.h:65