Agrarsense
|
#include <Vehicle.h>
Public Member Functions | |
AVehicle () | |
virtual EVehicleTypes | GetVehicleType () const |
virtual FString | GetTopicName () |
void | TogglePhysics (bool isOn) |
void | TeleportVehicleTo (FVector NewLocation, FRotator NewRotation) |
virtual void | TeleportVehicleTo_Implementation (FVector NewLocation, FRotator NewRotation) |
void | ResetCamera () |
void | ToggleLights (bool isOn) |
void | SetVisualizeVehicleOverlapArea (bool Visible) |
FString | ExportToJsonFile (const FString &FileName) |
void | SetVehicleIsInGarage (bool VehicleIsInGarage) |
bool | IsVehicleInGarage () const |
USensorsManagerComponent * | GetSensorsManager () const |
ACollisionSensor * | GetCollisionSensor () const |
ATransformSensor * | GetTransformSensor () const |
AOverlapSensor * | GetOverlapSensor () const |
FTransform | GetMovedFromGarageTransform () const |
void | SetCurrentTransformToMovedFromGarageTransform () |
virtual FText | GetInteractableName_Implementation () const override |
virtual FTransform | GetInteractableWorldTransform_Implementation () const override |
virtual FString | GetActorID_Implementation () const override |
virtual FString | GetActorName_Implementation () const override |
virtual FString | GetActorInformation_Implementation () const override |
virtual void | SetActorName_Implementation (const FString &NewActorName) override |
virtual void | SetActorIDAndName_Implementation (const FString &NewActorName, const FString &NewID) override |
virtual void | PossessedBy (AController *NewController) override |
Public Member Functions inherited from IInteractable | |
FText | GetInteractableName () const |
FTransform | GetInteractableWorldTransform () const |
Public Member Functions inherited from IActorInformation | |
FString | GetActorID () const |
FString | GetActorName () const |
FString | GetActorInformation () const |
void | SetActorName (const FString &NewActorName) |
void | SetActorIDAndName (const FString &NewActorName, const FString &NewID) |
Public Attributes | |
FText | InteractableName |
FVehicleGarageChangedDelegate | OnVehicleGarageChanged |
Protected Member Functions | |
virtual void | BeginPlay () override |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
Protected Attributes | |
TObjectPtr< USensorsManagerComponent > | SensorsManager |
ACollisionSensor * | CollisionSensor = nullptr |
ATransformSensor * | TransformSensor = nullptr |
AOverlapSensor * | OverlapSensor = nullptr |
UNiagaraComponent * | NiagaraComponent = nullptr |
FString | ActorName |
FString | ActorID |
FTransform | OriginalCameraTransform |
Private Attributes | |
bool | VehicleInGarage = false |
FTransform | MovedFromGarageTransform |
Additional Inherited Members | |
Static Public Member Functions inherited from IActorInformation | |
static void | SetAndValidateActorIDAndName (FString &ActorName, FString &ActorID, TWeakObjectPtr< AActor > Actor) |
static bool | DestroyActorByID (const FString &ID) |
static AActor * | GetActorByID (const FString &ID) |
template<typename T > | |
static TArray< T * > | GetActorsWithInterface () |
static void | PrintAllIds () |
AVehicle::AVehicle | ( | ) |
Definition at line 19 of file Vehicle.cpp.
References InteractableName, and SensorsManager.
|
overrideprotectedvirtual |
Reimplemented in AForwarder, AHarvester, and APIDDrone.
Definition at line 26 of file Vehicle.cpp.
References ActorID, CollisionSensor, Drone, Forwarder, GetVehicleType(), NiagaraComponent, OverlapSensor, FOverlapSensorParameters::OwningActor, FOverlapSensorParameters::RelativePosition, FOverlapSensorParameters::Size, USensorFactory::SpawnCollisionSensor(), USensorFactory::SpawnOverlapSensor(), USensorFactory::SpawnTransformSensor(), Sphere, TogglePhysics(), TransformSensor, and FOverlapSensorParameters::TriggerShape.
|
overrideprotectedvirtual |
Reimplemented in AForwarder, AHarvester, and APIDDrone.
Definition at line 86 of file Vehicle.cpp.
References CollisionSensor, NiagaraComponent, OverlapSensor, SensorsManager, and TransformSensor.
FString AVehicle::ExportToJsonFile | ( | const FString & | FileName | ) |
Export the Vehicle and its sensors to a JSON file.
FileName | The name of the file without extension. |
Definition at line 135 of file Vehicle.cpp.
References USimulatorJsonExporter::ExportVehicleAndSensorsToJSON(), IsVehicleInGarage(), and MovedFromGarageTransform.
Referenced by UROSCommands::HandleExportSensors(), and UROSCommands::HandleExportVehicles().
|
inlineoverridevirtual |
Definition at line 203 of file Vehicle.h.
Referenced by AOverlapSensor::Init().
|
inlineoverridevirtual |
Definition at line 213 of file Vehicle.h.
References UEnumUtilities::ConvertVehicleTypeToString(), ASensor::GetActorID_Implementation(), ASensor::GetActorName_Implementation(), and AOverlapSensor::Vehicle.
|
inlineoverridevirtual |
Definition at line 208 of file Vehicle.h.
Referenced by AOverlapSensor::Init().
|
inline |
Get collision sensor attached to this Vehicle
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inline |
Get transform of the vehicle when it moved to garage
|
inline |
Get overlap sensor attached to this Vehicle
|
inline |
Get sensor manager attached to this Vehicle
|
inlinevirtual |
|
inline |
Get transform sensor attached to this Vehicle
|
inlinevirtual |
Get type of the Vehicle
Reimplemented in AForwarder, AHarvester, and APIDDrone.
Definition at line 50 of file Vehicle.h.
References NONE.
Referenced by BeginPlay().
|
inline |
Checks if the vehicle is currently in the "Garage" where vehicle can be setup with sensors.
Definition at line 131 of file Vehicle.h.
Referenced by ExportToJsonFile(), and APIDDrone::Tick().
|
overridevirtual |
Definition at line 79 of file Vehicle.cpp.
References ResetCamera().
void AVehicle::ResetCamera | ( | ) |
Reset the camera to original position and rotation BlueprintImplementableEvent meant to be implemented in blueprint e.g. BP_Forwarder
Referenced by PossessedBy().
|
inlineoverridevirtual |
Definition at line 231 of file Vehicle.h.
References IActorInformation::SetAndValidateActorIDAndName().
|
inlineoverridevirtual |
|
inline |
|
inline |
Sets the state of the vehicle garage state boolean.
VehicleIsInGarage | - A boolean indicating whether the vehicle is in the garage or not. |
Definition at line 120 of file Vehicle.h.
void AVehicle::SetVisualizeVehicleOverlapArea | ( | bool | Visible | ) |
Sets the visibility of the vehicle overlap area visualization.
Visible | Whether the vehicle overlap area should be visible or not. |
Definition at line 127 of file Vehicle.cpp.
References OverlapSensor, and AOverlapSensor::SetVisualizeOverlapArea().
void AVehicle::TeleportVehicleTo | ( | FVector | NewLocation, |
FRotator | NewRotation | ||
) |
Teleport the vehicle into a specific location and rotation
NewLocation | |
NewRotation |
|
virtual |
Teleport to implementation
NewLocation | |
NewRotation |
Definition at line 122 of file Vehicle.cpp.
void AVehicle::ToggleLights | ( | bool | isOn | ) |
Toggle lights of the vehicle on or off. BlueprintImplementableEvent meant to be implemented in blueprint e.g. BP_Forwarder
isOn | Physics on or off |
void AVehicle::TogglePhysics | ( | bool | isOn | ) |
Toggle physics of the vehicle on or off. BlueprintImplementableEvent meant to be implemented in blueprint e.g. BP_Forwarder
isOn | Physics on or off |
Referenced by BeginPlay(), and UROSCommands::HandleTeleportActorByID().
|
protected |
Definition at line 275 of file Vehicle.h.
Referenced by BeginPlay().
|
protected |
Definition at line 260 of file Vehicle.h.
Referenced by BeginPlay(), and EndPlay().
FText AVehicle::InteractableName |
Definition at line 241 of file Vehicle.h.
Referenced by AForwarder::AForwarder(), AHarvester::AHarvester(), APIDDrone::APIDDrone(), and AVehicle().
|
private |
Definition at line 284 of file Vehicle.h.
Referenced by ExportToJsonFile().
|
protected |
Definition at line 269 of file Vehicle.h.
Referenced by BeginPlay(), and EndPlay().
FVehicleGarageChangedDelegate AVehicle::OnVehicleGarageChanged |
|
protected |
Definition at line 266 of file Vehicle.h.
Referenced by BeginPlay(), EndPlay(), and SetVisualizeVehicleOverlapArea().
|
protected |
Definition at line 257 of file Vehicle.h.
Referenced by AVehicle(), EndPlay(), and ASimulationLevelManager::GetSensorsManager().
|
protected |
Definition at line 263 of file Vehicle.h.
Referenced by BeginPlay(), and EndPlay().