CARLA
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
MapGen
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
9
#include "
Carla/MapGen/CityMapDefinitions.h
"
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
47
struct
GraphNode
INHERIT_GRAPH_TYPE_BASE_CLASS
('n')
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
56
struct
GraphHalfEdge
INHERIT_GRAPH_TYPE_BASE_CLASS
('e')
57
{
58
float
Angle;
59
};
60
61
struct
GraphFace
INHERIT_GRAPH_TYPE_BASE_CLASS
('f')
62
{
63
};
64
65
#undef INHERIT_GRAPH_TYPE_BASE_CLASS
66
67
}
// namespace MapGen
NonCopyable.h
MapGen
Definition:
CityAreaDescription.h:13
std::operator<<
std::ostream & operator<<(std::ostream &out, const ::carla::client::Timestamp ×tamp)
standard ostream operator
Definition:
Timestamp.h:65
CityMapDefinitions.h
MapGen::EIntersectionType
EIntersectionType
Definition:
CityMapDefinitions.h:11
GraphFace
carla::rpc::Rotation
geom::Rotation Rotation
Definition:
rpc/Transform.h:14
GraphHalfEdge
MapGen::INHERIT_GRAPH_TYPE_BASE_CLASS
struct GraphNode INHERIT_GRAPH_TYPE_BASE_CLASS('n')
Definition:
GraphTypes.h:47
GraphNode
NonCopyable
Definition:
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/NonCopyable.h:3
Generated by
1.8.13