Assign a random route to every ACarlaWheeledVehicle entering the trigger volume. More...
#include <RoutePlanner.h>
Inheritance diagram for ARoutePlanner:
Collaboration diagram for ARoutePlanner:Public Member Functions | |
| void | AddRoute (float probability, const TArray< FVector > &routePoints) |
| ARoutePlanner (const FObjectInitializer &ObjectInitializer) | |
| void | AssignRandomRoute (AWheeledVehicleAIController &Controller) const |
| virtual void | BeginDestroy () override |
| void | CleanRoute () |
| void | DrawRoutes () |
| void | Init () |
| void | SetBoxExtent (const FVector &Extent) |
Public Attributes | |
| bool | bIsIntersection = false |
| TArray< float > | Probabilities |
| TArray< USplineComponent * > | Routes |
| UBoxComponent * | TriggerVolume |
Protected Member Functions | |
| virtual void | BeginPlay () override |
| virtual void | EndPlay (EEndPlayReason::Type EndPlayReason) override |
| void | OnTriggerBeginOverlap (UPrimitiveComponent *OverlappedComp, AActor *OtherActor, UPrimitiveComponent *OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult &SweepResult) |
Assign a random route to every ACarlaWheeledVehicle entering the trigger volume.
Routes must be added in editor after placing this actor into the world. Spline tangents are ignored, only locations are taken into account for making the route.
Definition at line 23 of file RoutePlanner.h.
| ARoutePlanner::ARoutePlanner | ( | const FObjectInitializer & | ObjectInitializer | ) |
Definition at line 48 of file RoutePlanner.cpp.
References TriggerVolume.
| void ARoutePlanner::AddRoute | ( | float | probability, |
| const TArray< FVector > & | routePoints | ||
| ) |
Definition at line 96 of file RoutePlanner.cpp.
References Probabilities, and Routes.
Referenced by AOpenDriveActor::BuildRoutes().
Here is the caller graph for this function:| void ARoutePlanner::AssignRandomRoute | ( | AWheeledVehicleAIController & | Controller | ) | const |
Definition at line 123 of file RoutePlanner.cpp.
References AWheeledVehicleAIController::GetRandomEngine(), PickARoute(), Probabilities, Routes, and AWheeledVehicleAIController::SetFixedRoute().
Referenced by OnTriggerBeginOverlap().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
Definition at line 66 of file RoutePlanner.cpp.
References CleanRoute(), Probabilities, and Routes.
Here is the call graph for this function:
|
overrideprotectedvirtual |
Definition at line 174 of file RoutePlanner.cpp.
References Init().
Here is the call graph for this function:| void ARoutePlanner::CleanRoute | ( | ) |
Definition at line 117 of file RoutePlanner.cpp.
References Probabilities, and Routes.
Referenced by BeginDestroy().
Here is the caller graph for this function:| void ARoutePlanner::DrawRoutes | ( | ) |
Definition at line 206 of file RoutePlanner.cpp.
References bIsIntersection, and Routes.
|
overrideprotectedvirtual |
Definition at line 180 of file RoutePlanner.cpp.
References OnTriggerBeginOverlap(), and TriggerVolume.
Here is the call graph for this function:| void ARoutePlanner::Init | ( | ) |
Definition at line 150 of file RoutePlanner.cpp.
References IsSplineValid(), OnTriggerBeginOverlap(), Routes, and TriggerVolume.
Referenced by BeginPlay().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 191 of file RoutePlanner.cpp.
References AssignRandomRoute(), and GetVehicleController().
Referenced by EndPlay(), and Init().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 35 of file RoutePlanner.h.
References TriggerVolume.
Referenced by AOpenDriveActor::BuildRoutes().
Here is the caller graph for this function:| bool ARoutePlanner::bIsIntersection = false |
Definition at line 80 of file RoutePlanner.h.
Referenced by AOpenDriveActor::BuildRoutes(), and DrawRoutes().
| TArray<float> ARoutePlanner::Probabilities |
Definition at line 77 of file RoutePlanner.h.
Referenced by AddRoute(), AssignRandomRoute(), BeginDestroy(), and CleanRoute().
| TArray<USplineComponent *> ARoutePlanner::Routes |
Definition at line 74 of file RoutePlanner.h.
Referenced by AddRoute(), AssignRandomRoute(), BeginDestroy(), CleanRoute(), DrawRoutes(), and Init().
| UBoxComponent* ARoutePlanner::TriggerVolume |
Definition at line 71 of file RoutePlanner.h.
Referenced by ARoutePlanner(), EndPlay(), and Init().
1.8.13