Holds the static meshes and instances necessary for building a city map. 更多...
#include <CityMapMeshHolder.h>
Public 成员函数 | |
ACityMapMeshHolder (const FObjectInitializer &ObjectInitializer) | |
Initializes the mesh holders. | |
Protected 成员函数 | |
void | AddInstance (ECityMapMeshTag Tag, FTransform Transform) |
Add an instance of a mesh with a given transform. | |
void | AddInstance (ECityMapMeshTag Tag, uint32 X, uint32 Y) |
Add an instance of a mesh with a given tile location. | |
void | AddInstance (ECityMapMeshTag Tag, uint32 X, uint32 Y, float Angle) |
Add an instance of a mesh with a given tile location and rotation. | |
float | GetMapScale () const |
UStaticMesh * | GetStaticMesh (ECityMapMeshTag Tag) |
Return the static mesh corresponding to Tag. | |
const UStaticMesh * | GetStaticMesh (ECityMapMeshTag Tag) const |
Return the static mesh corresponding to Tag. | |
ECityMapMeshTag | GetTag (const UStaticMesh &StaticMesh) const |
Return the tag corresponding to StaticMesh. | |
FVector | GetTileLocation (uint32 X, uint32 Y) const |
Return the 3D world location (relative to this actor) of the given 2D tile. | |
virtual void | OnConstruction (const FTransform &Transform) override |
Initializes the instantiators. | |
virtual void | PostInitializeComponents () override |
void | SetStaticMesh (ECityMapMeshTag Tag, UStaticMesh *Mesh) |
Set the static mesh associated with Tag. | |
Private 成员函数 | |
void | DeletePieces () |
Clear all instances of the static mesh actors. | |
virtual void | UpdateMap () |
Here does nothing, implement in derived classes. | |
void | UpdateMapScale () |
Set the scale to the dimensions of the base mesh. | |
Private 属性 | |
float | MapScale = 1.0f |
USceneComponent * | SceneRootComponent |
TMap< ECityMapMeshTag, UStaticMesh * > | StaticMeshes |
TMap< UStaticMesh *, ECityMapMeshTag > | TagMap |
Holds the static meshes and instances necessary for building a city map.
在文件 CityMapMeshHolder.h 第 20 行定义.
ACityMapMeshHolder::ACityMapMeshHolder | ( | const FObjectInitializer & | ObjectInitializer | ) |
Initializes the mesh holders.
It is safe to call SetStaticMesh after this. However, instances cannot be added until OnConstruction is called.
在文件 CityMapMeshHolder.cpp 第 26 行定义.
引用了 CityMapMeshTag::FromUInt(), NUMBER_OF_TAGS, SceneRootComponent , 以及 StaticMeshes.
|
protected |
Add an instance of a mesh with a given transform.
Tag | The mesh' tag |
Transform | Transform that will be applied to the mesh |
在文件 CityMapMeshHolder.cpp 第 132 行定义.
引用了 UCarlaSettings::CARLA_ROAD_TAG , 以及 GetStaticMesh().
|
protected |
Add an instance of a mesh with a given tile location.
Tag | The mesh' tag |
X | Tile coordinate X |
Y | Tile coordinate Y |
在文件 CityMapMeshHolder.cpp 第 120 行定义.
引用了 AddInstance() , 以及 GetTileLocation().
被这些函数引用 AddInstance(), AddInstance() , 以及 ACityMapGenerator::GenerateRoads().
|
protected |
Add an instance of a mesh with a given tile location and rotation.
Tag | The mesh' tag |
X | Tile coordinate X |
Y | Tile coordinate Y |
Angle | Rotation around Z axis |
在文件 CityMapMeshHolder.cpp 第 125 行定义.
引用了 AddInstance() , 以及 GetTileLocation().
|
private |
Clear all instances of the static mesh actors.
在文件 CityMapMeshHolder.cpp 第 154 行定义.
|
inlineprotected |
|
protected |
Return the static mesh corresponding to Tag.
在文件 CityMapMeshHolder.cpp 第 104 行定义.
引用了 StaticMeshes.
被这些函数引用 AddInstance() , 以及 UpdateMapScale().
|
protected |
|
protected |
Return the tag corresponding to StaticMesh.
在文件 CityMapMeshHolder.cpp 第 114 行定义.
引用了 TagMap.
被这些函数引用 ACityMapGenerator::GenerateRoadMap().
|
protected |
Return the 3D world location (relative to this actor) of the given 2D tile.
在文件 CityMapMeshHolder.cpp 第 91 行定义.
引用了 MapScale.
被这些函数引用 AddInstance() , 以及 AddInstance().
|
overrideprotectedvirtual |
Initializes the instantiators.
在文件 CityMapMeshHolder.cpp 第 50 行定义.
|
overrideprotectedvirtual |
|
protected |
Set the static mesh associated with Tag.
在文件 CityMapMeshHolder.cpp 第 96 行定义.
引用了 StaticMeshes , 以及 TagMap.
|
privatevirtual |
Here does nothing, implement in derived classes.
被 ACityMapGenerator 重载.
在文件 CityMapMeshHolder.cpp 第 152 行定义.
被这些函数引用 PostInitializeComponents().
|
private |
Set the scale to the dimensions of the base mesh.
在文件 CityMapMeshHolder.cpp 第 177 行定义.
引用了 CityMapMeshTag::GetBaseMeshTag(), GetStaticMesh(), MapScale , 以及 CityMapMeshTag::ToString().
被这些函数引用 PostInitializeComponents().
|
private |
在文件 CityMapMeshHolder.h 第 110 行定义.
被这些函数引用 GetTileLocation() , 以及 UpdateMapScale().
|
private |
在文件 CityMapMeshHolder.h 第 107 行定义.
被这些函数引用 ACityMapMeshHolder().
|
private |
在文件 CityMapMeshHolder.h 第 113 行定义.
被这些函数引用 ACityMapMeshHolder(), GetStaticMesh(), GetStaticMesh() , 以及 SetStaticMesh().
|
private |
在文件 CityMapMeshHolder.h 第 116 行定义.
被这些函数引用 GetTag() , 以及 SetStaticMesh().