关卡路线图。包含哪些区域是道路的 2D 信息 和车道方向。 更多...
#include <RoadMap.h>
Public 成员函数 | |
FRoadMapPixelData | GetDataAt (const FVector &WorldLocation) const |
如果位于映射限制之外,则钳制值。 | |
FRoadMapPixelData | GetDataAt (uint32 PixelX, uint32 PixelY) const |
检索存储在给定像素处的数据。 | |
uint32 | GetHeight () const |
uint32 | GetWidth () const |
FVector | GetWorldLocation (uint32 PixelX, uint32 PixelY) const |
返回给定像素的世界位置。 | |
FRoadMapIntersectionResult | Intersect (const FTransform &BoxTransform, const FVector &BoxExtent, float ChecksPerCentimeter) const |
将角色边界与地图相交。 | |
void | Reset (uint32 Width, uint32 Height, float PixelsPerCentimeter, const FTransform &WorldToMap, const FVector &MapOffset) |
重置当前映射 - 初始化给定大小的空映射。 | |
bool | SaveAsPNG (const FString &Folder, const FString &MapName) const |
将当前地图另存为 PNG,并将像素数据编码为颜色。 | |
void | SetPixelAt (uint32 PixelX, uint32 PixelY, ECityMapMeshTag Tag, const FTransform &Transform, bool bInvertDirection=false) |
URoadMap (const FObjectInitializer &ObjectInitializer) | |
创建有效的空地图(每个点都是越野的)。 | |
Private 成员函数 | |
int32 | GetIndex (uint32 PixelX, uint32 PixelY) const |
bool | IsValid () const |
Private 属性 | |
uint32 | Height |
地图的高度(以像素为单位)。 | |
FVector | MapOffset |
地图坐标中的偏移量。 | |
float | PixelsPerCentimeter |
每厘米像素数。 | |
TArray< uint16 > | RoadMapData |
uint32 | Width |
地图的宽度(以像素为单位)。 | |
FTransform | WorldToMap |
世界到地图的转换。 | |
URoadMap::URoadMap | ( | const FObjectInitializer & | ObjectInitializer | ) |
FRoadMapPixelData URoadMap::GetDataAt | ( | const FVector & | WorldLocation | ) | const |
如果位于映射限制之外,则钳制值。
在文件 RoadMap.cpp 第 282 行定义.
引用了 ClampFloatToUInt(), GetDataAt(), Height, IsValid(), MapOffset, PixelsPerCentimeter, Width , 以及 WorldToMap.
|
inline |
检索存储在给定像素处的数据。
引用了 GetIndex(), IsValid() , 以及 RoadMapData.
被这些函数引用 GetDataAt() , 以及 Intersect().
|
inline |
|
inlineprivate |
|
inline |
FVector URoadMap::GetWorldLocation | ( | uint32 | PixelX, |
uint32 | PixelY ) const |
FRoadMapIntersectionResult URoadMap::Intersect | ( | const FTransform & | BoxTransform, |
const FVector & | BoxExtent, | ||
float | ChecksPerCentimeter ) const |
将角色边界与地图相交。
边界框将投影到地图上,并尽可能地对照它进行检查 与越野区域和对面车道的交叉路口.
在文件 RoadMap.cpp 第 296 行定义.
引用了 GetDataAt(), FRoadMapIntersectionResult::OffRoad, FRoadMapIntersectionResult::OppositeLane , 以及 UE_LOG().
|
inlineprivate |
void URoadMap::Reset | ( | uint32 | Width, |
uint32 | Height, | ||
float | PixelsPerCentimeter, | ||
const FTransform & | WorldToMap, | ||
const FVector & | MapOffset ) |
重置当前映射 - 初始化给定大小的空映射。
在文件 RoadMap.cpp 第 128 行定义.
引用了 Height, MapOffset, PixelsPerCentimeter, RoadMapData, Width , 以及 WorldToMap.
被这些函数引用 ACityMapGenerator::GenerateRoadMap().
bool URoadMap::SaveAsPNG | ( | const FString & | Folder, |
const FString & | MapName ) const |
将当前地图另存为 PNG,并将像素数据编码为颜色。
在文件 RoadMap.cpp 第 332 行定义.
引用了 FRoadMapPixelData::EncodeAsColor(), GetHeight(), GetWidth(), Height, IsValid(), MapOffset, PixelsPerCentimeter, RoadMapData, FPixelReader::SavePixelsToDisk(), UE_LOG(), Width , 以及 WorldToMap.
被这些函数引用 ACityMapGenerator::GenerateRoadMap().
void URoadMap::SetPixelAt | ( | uint32 | PixelX, |
uint32 | PixelY, | ||
ECityMapMeshTag | Tag, | ||
const FTransform & | Transform, | ||
bool | bInvertDirection = false ) |
在文件 RoadMap.cpp 第 150 行定义.
引用了 FRoadMapPixelData::Encode(), carla::geom::Rotation::GetForwardVector(), GetIndex() , 以及 RoadMapData.
被这些函数引用 ACityMapGenerator::GenerateRoadMap().
|
private |
地图的高度(以像素为单位)。
被这些函数引用 GetDataAt(), GetHeight(), IsValid(), Reset() , 以及 SaveAsPNG().
|
private |
地图坐标中的偏移量。
被这些函数引用 GetDataAt(), GetWorldLocation(), Reset() , 以及 SaveAsPNG().
|
private |
|
private |
被这些函数引用 GetDataAt(), IsValid(), Reset(), SaveAsPNG(), SetPixelAt() , 以及 URoadMap().
|
private |
地图的宽度(以像素为单位)。
被这些函数引用 GetDataAt(), GetIndex(), GetWidth(), IsValid(), Reset() , 以及 SaveAsPNG().
|
private |
世界到地图的转换。
被这些函数引用 GetDataAt(), GetWorldLocation(), Reset() , 以及 SaveAsPNG().