CARLA
载入中...
搜索中...
未找到
Unreal
CarlaUE4
Plugins
Carla
Source
Carla
MapGen
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
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
CityMapDefinitions.h
INHERIT_GRAPH_TYPE_BASE_CLASS
#define INHERIT_GRAPH_TYPE_BASE_CLASS(c)
Definition
GraphTypes.h:44
NonCopyable.h
GraphFace
GraphHalfEdge
GraphNode
NonCopyable
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Util/NonCopyable.h:3
MapGen
Definition
CityAreaDescription.h:13
MapGen::EIntersectionType
EIntersectionType
Definition
CityMapDefinitions.h:11
std::operator<<
std::ostream & operator<<(std::ostream &out, const ::carla::client::Timestamp ×tamp)
standard ostream operator
Definition
Timestamp.h:65
制作者
1.10.0