#include <OpenDriveGenerator.h>
Public Member Functions | |
AOpenDriveGenerator (const FObjectInitializer &ObjectInitializer) | |
void | GenerateAll () |
void | GeneratePoles () |
Generates pole meshes based on the OpenDRIVE information. More... | |
void | GenerateRoadMesh () |
Generates the road and sidewalk mesh based on the OpenDRIVE information. More... | |
void | GenerateSpawnPoints () |
Generates spawn points along the road. More... | |
const FString & | GetOpenDrive () const |
Get the OpenDRIVE information as string. More... | |
bool | IsOpenDriveValid () const |
Checks if the OpenDrive has been loaded and it's valid. More... | |
bool | LoadOpenDrive (const FString &OpenDrive) |
Set the OpenDRIVE information as string and generates the queryable map structure. More... | |
Protected Member Functions | |
virtual void | BeginPlay () override |
Protected Attributes | |
TArray< AActor * > | ActorMeshList |
FString | OpenDriveData |
float | SpawnersHeight = 300.f |
Determine the height where the spawners will be placed, relative to each RoutePlanner. More... | |
TArray< AVehicleSpawnPoint * > | VehicleSpawners |
Definition at line 33 of file OpenDriveGenerator.h.
AOpenDriveGenerator::AOpenDriveGenerator | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 28 of file OpenDriveGenerator.cpp.
|
overrideprotectedvirtual |
Definition at line 168 of file OpenDriveGenerator.cpp.
References GenerateAll(), UOpenDrive::GetXODR(), and LoadOpenDrive().
void AOpenDriveGenerator::GenerateAll | ( | ) |
Definition at line 161 of file OpenDriveGenerator.cpp.
References GeneratePoles(), GenerateRoadMesh(), and GenerateSpawnPoints().
Referenced by BeginPlay().
void AOpenDriveGenerator::GeneratePoles | ( | ) |
Generates pole meshes based on the OpenDRIVE information.
TODO: To implement
Definition at line 132 of file OpenDriveGenerator.cpp.
References IsOpenDriveValid().
Referenced by GenerateAll().
void AOpenDriveGenerator::GenerateRoadMesh | ( | ) |
Generates the road and sidewalk mesh based on the OpenDRIVE information.
Definition at line 61 of file OpenDriveGenerator.cpp.
References ActorMeshList, carla::rpc::OpendriveGenerationParameters::enable_mesh_visibility, UCarlaStatics::GetGameInstance(), UCarlaStatics::GetGameMode(), ACarlaGameModeBase::GetMap(), UCarlaGameInstance::GetOpendriveGenerationParameters(), IsOpenDriveValid(), carla::log_warning(), AProceduralMeshActor::MeshComponent, FProceduralCustomMesh::Normals, FProceduralCustomMesh::Triangles, and FProceduralCustomMesh::Vertices.
Referenced by GenerateAll().
void AOpenDriveGenerator::GenerateSpawnPoints | ( | ) |
Generates spawn points along the road.
Definition at line 142 of file OpenDriveGenerator.cpp.
References UCarlaStatics::GetGameMode(), ACarlaGameModeBase::GetMap(), IsOpenDriveValid(), SpawnersHeight, and VehicleSpawners.
Referenced by GenerateAll().
const FString & AOpenDriveGenerator::GetOpenDrive | ( | ) | const |
Get the OpenDRIVE information as string.
Definition at line 51 of file OpenDriveGenerator.cpp.
References OpenDriveData.
bool AOpenDriveGenerator::IsOpenDriveValid | ( | ) | const |
Checks if the OpenDrive has been loaded and it's valid.
Definition at line 56 of file OpenDriveGenerator.cpp.
References UCarlaStatics::GetGameMode(), and ACarlaGameModeBase::GetMap().
Referenced by GeneratePoles(), GenerateRoadMesh(), and GenerateSpawnPoints().
bool AOpenDriveGenerator::LoadOpenDrive | ( | const FString & | OpenDrive | ) |
Set the OpenDRIVE information as string and generates the queryable map structure.
Definition at line 37 of file OpenDriveGenerator.cpp.
References OpenDriveData.
Referenced by BeginPlay().
|
protected |
Definition at line 78 of file OpenDriveGenerator.h.
Referenced by GenerateRoadMesh().
|
protected |
Definition at line 75 of file OpenDriveGenerator.h.
Referenced by GetOpenDrive(), and LoadOpenDrive().
|
protected |
Determine the height where the spawners will be placed, relative to each RoutePlanner.
Definition at line 69 of file OpenDriveGenerator.h.
Referenced by GenerateSpawnPoints().
|
protected |
Definition at line 72 of file OpenDriveGenerator.h.
Referenced by GenerateSpawnPoints().