CARLA
Public Member Functions | Public Attributes | Protected Attributes | Private Attributes | List of all members
AOpenDriveActor Class Reference

#include <OpenDriveActor.h>

+ Inheritance diagram for AOpenDriveActor:
+ Collaboration diagram for AOpenDriveActor:

Public Member Functions

void AddSpawners ()
 
 AOpenDriveActor (const FObjectInitializer &ObjectInitializer)
 
void BuildRoutes ()
 
void BuildRoutes (FString MapName)
 
void DebugRoutes () const
 
void RemoveDebugRoutes () const
 
void RemoveRoutes ()
 Remove all the existing ARoutePlanner and VehicleSpawners previously generated by this class to avoid overlapping. More...
 
void RemoveSpawners ()
 

Public Attributes

TArray< ARoutePlanner * > RoutePlanners
 

Protected Attributes

UBillboardComponent * SpriteComponent
 A UBillboardComponent to hold Icon sprite. More...
 
UTexture2D * SpriteTexture
 Sprite for the Billboard Component. More...
 

Private Attributes

bool bAddSpawners = false
 If true, spawners will be placed when generating the routes. More...
 
bool bOnIntersections = false
 If true, spawners will be placed on junctions too. More...
 
float RoadAccuracy = 2.f
 Distance between waypoints where the cars will drive. More...
 
float SpawnersHeight = 300.f
 Determine the height where the spawners will be placed, relative to each RoutePlanner. More...
 
float TriggersHeight = 100.f
 Trigger elevantion. More...
 
TArray< AVehicleSpawnPoint * > VehicleSpawners
 

Detailed Description

Definition at line 22 of file OpenDriveActor.h.

Constructor & Destructor Documentation

◆ AOpenDriveActor()

AOpenDriveActor::AOpenDriveActor ( const FObjectInitializer &  ObjectInitializer)

Definition at line 30 of file OpenDriveActor.cpp.

References AddSpawners(), bAddSpawners, BuildRoutes(), DebugRoutes(), RemoveDebugRoutes(), RemoveRoutes(), RemoveSpawners(), and SpriteComponent.

+ Here is the call graph for this function:

Member Function Documentation

◆ AddSpawners()

void AOpenDriveActor::AddSpawners ( )

Definition at line 275 of file OpenDriveActor.cpp.

References bOnIntersections, RoutePlanners, SpawnersHeight, and VehicleSpawners.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

◆ BuildRoutes() [1/2]

void AOpenDriveActor::BuildRoutes ( )

Definition at line 136 of file OpenDriveActor.cpp.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

◆ BuildRoutes() [2/2]

void AOpenDriveActor::BuildRoutes ( FString  MapName)

Definition at line 141 of file OpenDriveActor.cpp.

References ARoutePlanner::AddRoute(), ARoutePlanner::bIsIntersection, carla::opendrive::OpenDriveParser::Load(), UOpenDrive::LoadXODR(), min_element(), RoadAccuracy, RoutePlanners, ARoutePlanner::SetBoxExtent(), and TriggersHeight.

+ Here is the call graph for this function:

◆ DebugRoutes()

void AOpenDriveActor::DebugRoutes ( ) const

Definition at line 257 of file OpenDriveActor.cpp.

References RoutePlanners.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

◆ RemoveDebugRoutes()

void AOpenDriveActor::RemoveDebugRoutes ( ) const

Definition at line 268 of file OpenDriveActor.cpp.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

◆ RemoveRoutes()

void AOpenDriveActor::RemoveRoutes ( )

Remove all the existing ARoutePlanner and VehicleSpawners previously generated by this class to avoid overlapping.

Definition at line 244 of file OpenDriveActor.cpp.

References RoutePlanners.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

◆ RemoveSpawners()

void AOpenDriveActor::RemoveSpawners ( )

Definition at line 297 of file OpenDriveActor.cpp.

References VehicleSpawners.

Referenced by AOpenDriveActor().

+ Here is the caller graph for this function:

Member Data Documentation

◆ bAddSpawners

bool AOpenDriveActor::bAddSpawners = false
private

If true, spawners will be placed when generating the routes.

Definition at line 63 of file OpenDriveActor.h.

Referenced by AOpenDriveActor().

◆ bOnIntersections

bool AOpenDriveActor::bOnIntersections = false
private

If true, spawners will be placed on junctions too.

Definition at line 67 of file OpenDriveActor.h.

Referenced by AddSpawners().

◆ RoadAccuracy

float AOpenDriveActor::RoadAccuracy = 2.f
private

Distance between waypoints where the cars will drive.

Definition at line 48 of file OpenDriveActor.h.

Referenced by BuildRoutes().

◆ RoutePlanners

TArray<ARoutePlanner *> AOpenDriveActor::RoutePlanners

Definition at line 112 of file OpenDriveActor.h.

Referenced by AddSpawners(), BuildRoutes(), DebugRoutes(), and RemoveRoutes().

◆ SpawnersHeight

float AOpenDriveActor::SpawnersHeight = 300.f
private

Determine the height where the spawners will be placed, relative to each RoutePlanner.

Definition at line 72 of file OpenDriveActor.h.

Referenced by AddSpawners().

◆ SpriteComponent

UBillboardComponent* AOpenDriveActor::SpriteComponent
protected

A UBillboardComponent to hold Icon sprite.

Definition at line 29 of file OpenDriveActor.h.

Referenced by AOpenDriveActor().

◆ SpriteTexture

UTexture2D* AOpenDriveActor::SpriteTexture
protected

Sprite for the Billboard Component.

Definition at line 32 of file OpenDriveActor.h.

◆ TriggersHeight

float AOpenDriveActor::TriggersHeight = 100.f
private

Trigger elevantion.

Definition at line 52 of file OpenDriveActor.h.

Referenced by BuildRoutes().

◆ VehicleSpawners

TArray<AVehicleSpawnPoint *> AOpenDriveActor::VehicleSpawners
private

Definition at line 37 of file OpenDriveActor.h.

Referenced by AddSpawners(), and RemoveSpawners().


The documentation for this class was generated from the following files: