CARLA
 
载入中...
搜索中...
未找到
Public 成员函数 | Private 成员函数 | Private 属性 | 所有成员列表
URoadMap类 参考

关卡路线图。包含哪些区域是道路的 2D 信息 和车道方向。 更多...

#include <RoadMap.h>

+ 类 URoadMap 继承关系图:
+ URoadMap 的协作图:

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
 世界到地图的转换。 更多...
 

详细描述

关卡路线图。包含哪些区域是道路的 2D 信息 和车道方向。

在文件 RoadMap.h90 行定义.

构造及析构函数说明

◆ URoadMap()

URoadMap::URoadMap ( const FObjectInitializer &  ObjectInitializer)

创建有效的空地图(每个点都是越野的)。

在文件 RoadMap.cpp104 行定义.

引用了 RoadMapData , 以及 FRoadMapPixelData::Value.

成员函数说明

◆ GetDataAt() [1/2]

FRoadMapPixelData URoadMap::GetDataAt ( const FVector &  WorldLocation) const

如果位于映射限制之外,则钳制值。

在文件 RoadMap.cpp282 行定义.

引用了 ClampFloatToUInt(), GetDataAt(), Height, IsValid(), MapOffset, PixelsPerCentimeter, Width , 以及 WorldToMap.

+ 函数调用图:

◆ GetDataAt() [2/2]

FRoadMapPixelData URoadMap::GetDataAt ( uint32  PixelX,
uint32  PixelY 
) const
inline

检索存储在给定像素处的数据。

在文件 RoadMap.h128 行定义.

引用了 GetIndex(), IsValid() , 以及 RoadMapData.

被这些函数引用 GetDataAt() , 以及 Intersect().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ GetHeight()

uint32 URoadMap::GetHeight ( ) const
inline

在文件 RoadMap.h119 行定义.

引用了 Height.

被这些函数引用 SaveAsPNG().

+ 这是这个函数的调用关系图:

◆ GetIndex()

int32 URoadMap::GetIndex ( uint32  PixelX,
uint32  PixelY 
) const
inlineprivate

在文件 RoadMap.h161 行定义.

引用了 Width.

被这些函数引用 GetDataAt() , 以及 SetPixelAt().

+ 这是这个函数的调用关系图:

◆ GetWidth()

uint32 URoadMap::GetWidth ( ) const
inline

在文件 RoadMap.h114 行定义.

引用了 Width.

被这些函数引用 SaveAsPNG().

+ 这是这个函数的调用关系图:

◆ GetWorldLocation()

FVector URoadMap::GetWorldLocation ( uint32  PixelX,
uint32  PixelY 
) const

返回给定像素的世界位置。

在文件 RoadMap.cpp270 行定义.

引用了 MapOffset, PixelsPerCentimeter , 以及 WorldToMap.

◆ Intersect()

FRoadMapIntersectionResult URoadMap::Intersect ( const FTransform &  BoxTransform,
const FVector &  BoxExtent,
float  ChecksPerCentimeter 
) const

将角色边界与地图相交。

边界框将投影到地图上,并尽可能地对照它进行检查 与越野区域和对面车道的交叉路口.

在文件 RoadMap.cpp296 行定义.

引用了 GetDataAt(), FRoadMapIntersectionResult::OffRoad, FRoadMapIntersectionResult::OppositeLane , 以及 UE_LOG().

+ 函数调用图:

◆ IsValid()

bool URoadMap::IsValid ( ) const
inlineprivate

在文件 RoadMap.h166 行定义.

引用了 Height, RoadMapData , 以及 Width.

被这些函数引用 GetDataAt() , 以及 SaveAsPNG().

+ 这是这个函数的调用关系图:

◆ Reset()

void URoadMap::Reset ( uint32  Width,
uint32  Height,
float  PixelsPerCentimeter,
const FTransform &  WorldToMap,
const FVector &  MapOffset 
)

重置当前映射 - 初始化给定大小的空映射。

在文件 RoadMap.cpp128 行定义.

引用了 Height, MapOffset, PixelsPerCentimeter, RoadMapData, Width , 以及 WorldToMap.

被这些函数引用 ACityMapGenerator::GenerateRoadMap().

+ 这是这个函数的调用关系图:

◆ SaveAsPNG()

bool URoadMap::SaveAsPNG ( const FString &  Folder,
const FString &  MapName 
) const

将当前地图另存为 PNG,并将像素数据编码为颜色。

在文件 RoadMap.cpp332 行定义.

引用了 FRoadMapPixelData::EncodeAsColor(), GetHeight(), GetWidth(), Height, IsValid(), MapOffset, PixelsPerCentimeter, RoadMapData, FPixelReader::SavePixelsToDisk(), UE_LOG(), Width , 以及 WorldToMap.

被这些函数引用 ACityMapGenerator::GenerateRoadMap().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ SetPixelAt()

void URoadMap::SetPixelAt ( uint32  PixelX,
uint32  PixelY,
ECityMapMeshTag  Tag,
const FTransform &  Transform,
bool  bInvertDirection = false 
)

在文件 RoadMap.cpp150 行定义.

引用了 FRoadMapPixelData::Encode(), carla::geom::Rotation::GetForwardVector(), GetIndex() , 以及 RoadMapData.

被这些函数引用 ACityMapGenerator::GenerateRoadMap().

+ 函数调用图:
+ 这是这个函数的调用关系图:

类成员变量说明

◆ Height

uint32 URoadMap::Height
private

地图的高度(以像素为单位)。

在文件 RoadMap.h189 行定义.

被这些函数引用 GetDataAt(), GetHeight(), IsValid(), Reset() , 以及 SaveAsPNG().

◆ MapOffset

FVector URoadMap::MapOffset
private

地图坐标中的偏移量。

在文件 RoadMap.h177 行定义.

被这些函数引用 GetDataAt(), GetWorldLocation(), Reset() , 以及 SaveAsPNG().

◆ PixelsPerCentimeter

float URoadMap::PixelsPerCentimeter
private

每厘米像素数。

在文件 RoadMap.h181 行定义.

被这些函数引用 GetDataAt(), GetWorldLocation(), Reset() , 以及 SaveAsPNG().

◆ RoadMapData

TArray<uint16> URoadMap::RoadMapData
private

在文件 RoadMap.h192 行定义.

被这些函数引用 GetDataAt(), IsValid(), Reset(), SaveAsPNG(), SetPixelAt() , 以及 URoadMap().

◆ Width

uint32 URoadMap::Width
private

地图的宽度(以像素为单位)。

在文件 RoadMap.h185 行定义.

被这些函数引用 GetDataAt(), GetIndex(), GetWidth(), IsValid(), Reset() , 以及 SaveAsPNG().

◆ WorldToMap

FTransform URoadMap::WorldToMap
private

世界到地图的转换。

在文件 RoadMap.h173 行定义.

被这些函数引用 GetDataAt(), GetWorldLocation(), Reset() , 以及 SaveAsPNG().


该类的文档由以下文件生成: