CARLA
Toggle main menu visibility
Loading...
Searching...
No Matches
Unreal
CarlaUnreal
Plugins
Carla
Source
Carla
MapGen
CityMapMeshTag.h
Go to the documentation of this file.
1
// Copyright (c) 2026 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 "CoreMinimal.h"
10
11
#include "CityMapMeshTag.generated.h"
12
13
/// Tag to identify the meshes used by the ProceduralMapGenerator.
14
///
15
/// It will work as long as we have less than 255 meshes, currently blueprint
16
/// type enums support uint8 only.
17
UENUM(BlueprintType)
18
enum class
ECityMapMeshTag
: uint8
19
{
20
RoadTwoLanes_LaneLeft
UMETA
(DisplayName =
"Road: Two Lanes - Lane Left"
),
21
RoadTwoLanes_LaneRight
UMETA
(DisplayName =
"Road: Two Lanes - Lane Right"
),
22
RoadTwoLanes_SidewalkLeft
UMETA
(DisplayName =
"Road: Two Lanes - Sidewalk Left"
),
23
RoadTwoLanes_SidewalkRight
UMETA
(DisplayName =
"Road: Two Lanes - Sidewalk Right"
),
24
RoadTwoLanes_LaneMarkingSolid
UMETA
(DisplayName =
"Road: Two Lanes - Lane Marking Solid"
),
25
RoadTwoLanes_LaneMarkingBroken
UMETA
(DisplayName =
"Road: Two Lanes - Lane Marking Broken"
),
26
27
Road90DegTurn_Lane0
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 0"
),
28
Road90DegTurn_Lane1
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 1"
),
29
Road90DegTurn_Lane2
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 2"
),
30
Road90DegTurn_Lane3
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 3"
),
31
Road90DegTurn_Lane4
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 4"
),
32
Road90DegTurn_Lane5
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 5"
),
33
Road90DegTurn_Lane6
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 6"
),
34
Road90DegTurn_Lane7
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 7"
),
35
Road90DegTurn_Lane8
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 8"
),
36
Road90DegTurn_Lane9
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane 9"
),
37
Road90DegTurn_Sidewalk0
UMETA
(DisplayName =
"Road: 90 Degree Turn - Sidewalk 0"
),
38
Road90DegTurn_Sidewalk1
UMETA
(DisplayName =
"Road: 90 Degree Turn - Sidewalk 1"
),
39
Road90DegTurn_Sidewalk2
UMETA
(DisplayName =
"Road: 90 Degree Turn - Sidewalk 2"
),
40
Road90DegTurn_Sidewalk3
UMETA
(DisplayName =
"Road: 90 Degree Turn - Sidewalk 3"
),
41
Road90DegTurn_LaneMarking
UMETA
(DisplayName =
"Road: 90 Degree Turn - Lane Marking"
),
42
43
RoadTIntersection_Lane0
UMETA
(DisplayName =
"Road: T-Intersection - Lane 0"
),
44
RoadTIntersection_Lane1
UMETA
(DisplayName =
"Road: T-Intersection - Lane 1"
),
45
RoadTIntersection_Lane2
UMETA
(DisplayName =
"Road: T-Intersection - Lane 2"
),
46
RoadTIntersection_Lane3
UMETA
(DisplayName =
"Road: T-Intersection - Lane 3"
),
47
RoadTIntersection_Lane4
UMETA
(DisplayName =
"Road: T-Intersection - Lane 4"
),
48
RoadTIntersection_Lane5
UMETA
(DisplayName =
"Road: T-Intersection - Lane 5"
),
49
RoadTIntersection_Lane6
UMETA
(DisplayName =
"Road: T-Intersection - Lane 6"
),
50
RoadTIntersection_Lane7
UMETA
(DisplayName =
"Road: T-Intersection - Lane 7"
),
51
RoadTIntersection_Lane8
UMETA
(DisplayName =
"Road: T-Intersection - Lane 8"
),
52
RoadTIntersection_Lane9
UMETA
(DisplayName =
"Road: T-Intersection - Lane 9"
),
53
RoadTIntersection_Sidewalk0
UMETA
(DisplayName =
"Road: T-Intersection - Sidewalk 0"
),
54
RoadTIntersection_Sidewalk1
UMETA
(DisplayName =
"Road: T-Intersection - Sidewalk 1"
),
55
RoadTIntersection_Sidewalk2
UMETA
(DisplayName =
"Road: T-Intersection - Sidewalk 2"
),
56
RoadTIntersection_Sidewalk3
UMETA
(DisplayName =
"Road: T-Intersection - Sidewalk 3"
),
57
RoadTIntersection_LaneMarking
UMETA
(DisplayName =
"Road: T-Intersection - Lane Marking"
),
58
59
RoadXIntersection_Lane0
UMETA
(DisplayName =
"Road: X-Intersection - Lane 0"
),
60
RoadXIntersection_Lane1
UMETA
(DisplayName =
"Road: X-Intersection - Lane 1"
),
61
RoadXIntersection_Lane2
UMETA
(DisplayName =
"Road: X-Intersection - Lane 2"
),
62
RoadXIntersection_Lane3
UMETA
(DisplayName =
"Road: X-Intersection - Lane 3"
),
63
RoadXIntersection_Lane4
UMETA
(DisplayName =
"Road: X-Intersection - Lane 4"
),
64
RoadXIntersection_Lane5
UMETA
(DisplayName =
"Road: X-Intersection - Lane 5"
),
65
RoadXIntersection_Lane6
UMETA
(DisplayName =
"Road: X-Intersection - Lane 6"
),
66
RoadXIntersection_Lane7
UMETA
(DisplayName =
"Road: X-Intersection - Lane 7"
),
67
RoadXIntersection_Lane8
UMETA
(DisplayName =
"Road: X-Intersection - Lane 8"
),
68
RoadXIntersection_Lane9
UMETA
(DisplayName =
"Road: X-Intersection - Lane 9"
),
69
RoadXIntersection_Sidewalk0
UMETA
(DisplayName =
"Road: X-Intersection - Sidewalk 0"
),
70
RoadXIntersection_Sidewalk1
UMETA
(DisplayName =
"Road: X-Intersection - Sidewalk 1"
),
71
RoadXIntersection_Sidewalk2
UMETA
(DisplayName =
"Road: X-Intersection - Sidewalk 2"
),
72
RoadXIntersection_Sidewalk3
UMETA
(DisplayName =
"Road: X-Intersection - Sidewalk 3"
),
73
RoadXIntersection_LaneMarking
UMETA
(DisplayName =
"Road: X-Intersection - Lane Marking"
),
74
75
NUMBER_OF_TAGS
UMETA
(Hidden),
76
INVALID
UMETA
(Hidden)
77
};
78
79
/// Helper class for working with ECityMapMeshTag.
80
class
CityMapMeshTag
81
{
82
public
:
83
84
/// Return the number of tags.
85
static
constexpr
uint8
GetNumberOfTags
() {
86
return
ToUInt
(ECityMapMeshTag::NUMBER_OF_TAGS);
87
}
88
89
/// Return the base mesh. The base mesh defines the unit tile for map scaling.
90
static
ECityMapMeshTag
GetBaseMeshTag
();
91
92
/// Get the size in tiles of a road intersection side. I.e., return N such NxN
93
/// is the size of a road intersection piece.
94
static
uint32
GetRoadIntersectionSize
();
95
96
/// @name Tag conversions
97
/// @{
98
99
/// Convert @a Tag to an unsigned integer type.
100
static
constexpr
uint8
ToUInt
(
ECityMapMeshTag
Tag) {
101
return
static_cast<
uint8
>
(Tag);
102
}
103
104
/// Convert an unsigned integer to a ECityMapMeshTag.
105
static
ECityMapMeshTag
FromUInt
(uint8 Value) {
106
check(Value <
GetNumberOfTags
());
107
return
static_cast<
ECityMapMeshTag
>
(Value);
108
}
109
110
/// Get @a Tag name as FString.
111
static
FString
ToString
(
ECityMapMeshTag
Tag);
112
113
/// Convert @a Value to ECityMapMeshTag and get its name as FString.
114
static
FString
ToString
(uint8 Value) {
115
return
ToString
(
FromUInt
(Value));
116
}
117
118
/// @}
119
};
NUMBER_OF_TAGS
static constexpr tag_size_t NUMBER_OF_TAGS
Definition
CityMapMeshHolder.cpp:25
ECityMapMeshTag
ECityMapMeshTag
Tag to identify the meshes used by the ProceduralMapGenerator.
Definition
CityMapMeshTag.h:19
EActorAttributeType::UMETA
@ UMETA
Definition
Unreal/CarlaUnreal/Plugins/Carla/Source/Carla/Actor/ActorAttribute.h:29
EVehicleInputPriority::INVALID
@ INVALID
Definition
VehicleInputPriority.h:17
CityMapMeshTag
Helper class for working with ECityMapMeshTag.
Definition
CityMapMeshTag.h:81
CityMapMeshTag::ToString
static FString ToString(uint8 Value)
Convert Value to ECityMapMeshTag and get its name as FString.
Definition
CityMapMeshTag.h:114
CityMapMeshTag::FromUInt
static ECityMapMeshTag FromUInt(uint8 Value)
Convert an unsigned integer to a ECityMapMeshTag.
Definition
CityMapMeshTag.h:105
CityMapMeshTag::GetNumberOfTags
static constexpr uint8 GetNumberOfTags()
Return the number of tags.
Definition
CityMapMeshTag.h:85
CityMapMeshTag::ToString
static FString ToString(ECityMapMeshTag Tag)
Get Tag name as FString.
Definition
CityMapMeshTag.cpp:26
CityMapMeshTag::GetBaseMeshTag
static ECityMapMeshTag GetBaseMeshTag()
Return the base mesh. The base mesh defines the unit tile for map scaling.
Definition
CityMapMeshTag.cpp:16
CityMapMeshTag::ToUInt
static constexpr uint8 ToUInt(ECityMapMeshTag Tag)
Convert Tag to an unsigned integer type.
Definition
CityMapMeshTag.h:100
CityMapMeshTag::GetRoadIntersectionSize
static uint32 GetRoadIntersectionSize()
Get the size in tiles of a road intersection side.
Definition
CityMapMeshTag.cpp:21
Generated by
1.18.0