Agrarsense
|
#include <PIDDrone.h>
Public Member Functions | |
APIDDrone () | |
virtual EVehicleTypes | GetVehicleType () const override |
virtual FTransform | GetInteractableWorldTransform_Implementation () const override |
void | SetDroneAction (EDroneAction mode) |
Set drone's action (roaming, manual) More... | |
EDroneAction | GetDroneAction () const |
Get drone's action (roaming, manual) More... | |
FDroneParameters | GetDroneParameters () const |
void | ChangeDroneParameters (const FDroneParameters &newParameters) |
void | SetDroneParameters (const FDroneParameters &InParameters) |
void | AddWayPoint (FVector Waypoint) |
void | ClearWaypoints () |
void | FlySetFlightpath () |
Called in tick function for drone roaming through points. More... | |
void | SetManualControl (bool value) |
void | MoveDroneToPosition (const FTransform Transform) |
Override all drone roaming points and continue towards this position. More... | |
TArray< FTransform > | GenerateRoamingPoints (float radius, int32 roamingPoints) |
Generates a roadming points array for the drone in radius. More... | |
virtual void | SetCurrentTransformToMovedFromGarageTransform () override |
Public Member Functions inherited from AVehicle | |
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 |
virtual 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) |
Private Member Functions | |
virtual void | BeginPlay () override |
virtual void | Tick (float DeltaTime) override |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
void | AutoPilot (float DeltaTime) |
bool | IsRoaming () const |
void | SetDesiredLocationMesh (UStaticMeshComponent *meshcomponent) |
void | AssignRoamingPoints (const TArray< FTransform > Points) |
void | SetDroneRotation (USkeletalMeshComponent *target, FRotator rotator) |
FVector | GetCurrentWaypointTarget () |
Private Attributes | |
FDroneParameters | DroneParameters |
EFlightMode | flightmode = EFlightMode::Roaming |
UWorld * | World = nullptr |
FVector | StartingPosition |
USkeletalMeshComponent * | mesh = nullptr |
UStaticMeshComponent * | desiredPositionMesh = nullptr |
bool | waypointReached = false |
bool | manualControl = false |
TArray< FVector > | WayPoints |
int32 | passedWaypoints = 0 |
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 () |
Public Attributes inherited from AVehicle | |
FText | InteractableName |
FVehicleGarageChangedDelegate | OnVehicleGarageChanged |
virtual void | BeginPlay () override |
virtual void | EndPlay (const EEndPlayReason::Type EndPlayReason) override |
Protected Attributes inherited from AVehicle | |
TObjectPtr< USensorsManagerComponent > | SensorsManager |
ACollisionSensor * | CollisionSensor = nullptr |
ATransformSensor * | TransformSensor = nullptr |
AOverlapSensor * | OverlapSensor = nullptr |
UNiagaraComponent * | NiagaraComponent = nullptr |
FString | ActorName |
FString | ActorID |
FTransform | OriginalCameraTransform |
FTransform | MovedFromGarageTransform |
bool | VehicleInGarage = false |
Definition at line 17 of file PIDDrone.h.
APIDDrone::APIDDrone | ( | ) |
Definition at line 20 of file PIDDrone.cpp.
References AVehicle::InteractableName.
|
inline |
Definition at line 83 of file PIDDrone.h.
References FDroneParameters::Points.
|
private |
Definition at line 148 of file PIDDrone.cpp.
References ClearWaypoints(), and WayPoints.
|
private |
Definition at line 219 of file PIDDrone.cpp.
References FDroneParameters::DroneAction, DroneParameters, FlySetFlightpath(), and Stationary.
Referenced by Tick().
|
overrideprivatevirtual |
Reimplemented from AVehicle.
Definition at line 26 of file PIDDrone.cpp.
References desiredPositionMesh, mesh, StartingPosition, and World.
|
inline |
Definition at line 69 of file PIDDrone.h.
Referenced by USimulatorJsonParser::ParseAndSetDroneParameters().
|
inline |
Definition at line 92 of file PIDDrone.h.
Referenced by AssignRoamingPoints().
|
overrideprivatevirtual |
Reimplemented from AVehicle.
Definition at line 38 of file PIDDrone.cpp.
void APIDDrone::FlySetFlightpath | ( | ) |
Called in tick function for drone roaming through points.
Definition at line 53 of file PIDDrone.cpp.
References desiredPositionMesh, FDroneParameters::DroneAction, FDroneParameters::DroneEndAction, DroneParameters, GenerateRandomNew, GenerateRoamingPoints(), GetCurrentWaypointTarget(), GoBackwards, IsRoaming(), mesh, passedWaypoints, FDroneParameters::Points, RepeatFromBeginning, Roaming, Stationary, Stop, and waypointReached.
Referenced by AutoPilot().
TArray< FTransform > APIDDrone::GenerateRoamingPoints | ( | float | radius, |
int32 | roamingPoints | ||
) |
Generates a roadming points array for the drone in radius.
radius | radius of the roaming area |
Definition at line 195 of file PIDDrone.cpp.
Referenced by FlySetFlightpath().
|
private |
Definition at line 137 of file PIDDrone.cpp.
References DroneParameters, passedWaypoints, and FDroneParameters::Points.
Referenced by FlySetFlightpath().
|
inline |
Get drone's action (roaming, manual)
Definition at line 57 of file PIDDrone.h.
|
inline |
Definition at line 63 of file PIDDrone.h.
Referenced by USimulatorJsonExporter::SetDroneParameters().
|
inlineoverridevirtual |
Reimplemented from AVehicle.
Definition at line 31 of file PIDDrone.h.
|
inlineoverridevirtual |
Get type of the Vehicle
Reimplemented from AVehicle.
Definition at line 29 of file PIDDrone.h.
References Drone.
|
inlineprivate |
void APIDDrone::MoveDroneToPosition | ( | const FTransform | Transform | ) |
Override all drone roaming points and continue towards this position.
Transform | drone move position |
Definition at line 124 of file PIDDrone.cpp.
References DroneParameters, FDroneParameters::Points, and Transform.
|
inlineoverridevirtual |
Reimplemented from AVehicle.
Definition at line 123 of file PIDDrone.h.
|
inlineprivate |
Definition at line 156 of file PIDDrone.h.
|
inline |
Set drone's action (roaming, manual)
Definition at line 47 of file PIDDrone.h.
|
inline |
Definition at line 77 of file PIDDrone.h.
|
private |
Definition at line 160 of file PIDDrone.cpp.
|
inline |
Definition at line 104 of file PIDDrone.h.
|
overrideprivatevirtual |
Definition at line 43 of file PIDDrone.cpp.
References AutoPilot(), and AVehicle::IsVehicleInGarage().
|
private |
Definition at line 181 of file PIDDrone.h.
Referenced by BeginPlay(), and FlySetFlightpath().
|
private |
Definition at line 170 of file PIDDrone.h.
Referenced by AutoPilot(), FlySetFlightpath(), GetCurrentWaypointTarget(), and MoveDroneToPosition().
|
private |
Definition at line 173 of file PIDDrone.h.
|
private |
Definition at line 184 of file PIDDrone.h.
|
private |
Definition at line 180 of file PIDDrone.h.
Referenced by BeginPlay(), and FlySetFlightpath().
|
private |
Definition at line 192 of file PIDDrone.h.
Referenced by FlySetFlightpath(), and GetCurrentWaypointTarget().
|
private |
Definition at line 178 of file PIDDrone.h.
Referenced by BeginPlay().
|
private |
Definition at line 183 of file PIDDrone.h.
Referenced by FlySetFlightpath().
|
private |
Definition at line 187 of file PIDDrone.h.
Referenced by AssignRoamingPoints().
|
private |
Definition at line 176 of file PIDDrone.h.
Referenced by BeginPlay().