5#include "CesiumGeospatial/SimplePlanarEllipsoidCurve.h"
7#include "CesiumFlyToComponent.generated.h"
64UCLASS(ClassGroup =
"Cesium", Meta = (BlueprintSpawnableComponent))
79 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
92 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
106 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
116 meta = (ClampMin = 0.0))
122 UPROPERTY(EditAnywhere, BlueprintReadWrite, Category =
"Cesium")
129 UPROPERTY(BlueprintAssignable, Category =
"Cesium");
136 UPROPERTY(BlueprintAssignable, Category =
"Cesium");
149 UFUNCTION(BlueprintCallable, Category =
"Cesium")
151 const FVector& EarthCenteredEarthFixedDestination,
152 double YawAtDestination,
153 double PitchAtDestination,
154 bool CanInterruptByMoving);
170 UFUNCTION(BlueprintCallable, Category =
"Cesium")
172 const FVector& LongitudeLatitudeHeightDestination,
173 double YawAtDestination,
174 double PitchAtDestination,
175 bool CanInterruptByMoving);
187 UFUNCTION(BlueprintCallable, Category =
"Cesium")
189 const FVector& UnrealDestination,
190 double YawAtDestination,
191 double PitchAtDestination,
192 bool CanInterruptByMoving);
198 UFUNCTION(BlueprintCallable, Category =
"Cesium")
210 FActorComponentTickFunction* ThisTickFunction) override;
213 FQuat GetCurrentRotationEastSouthUp();
214 void SetCurrentRotationEastSouthUp(const FQuat& EastSouthUpRotation);
216 bool _flightInProgress = false;
217 bool _canInterruptByMoving;
218 float _currentFlyTime;
220 FVector _destinationEcef;
221 FQuat _sourceRotation;
222 FQuat _destinationRotation;
223 FVector _previousPositionEcef;
ECesiumFlyToRotation
Indicates which rotation to use for orienting the object during flights.
@ Actor
Uses the relative rotation of the root component of the Actor to which the CesiumFlyToComponent is at...
@ ControlRotationInEastSouthUp
Uses the ControlRotation of the Controller of the Pawn to which the CesiumFlyToComponent is attached.
@ ControlRotationInUnreal
Uses the ControlRotation of the Controller of the Pawn to which the CesiumFlyToComponent is attached.
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FCesiumFlightCompleted)
The delegate for when the Actor finishes flying.
ECesiumFlyToRotation RotationToUse
Indicates which rotation to use during flights.
FCesiumFlightCompleted OnFlightComplete
A delegate that will be called when the Actor finishes flying.
UCurveFloat * ProgressCurve
A curve that is used to determine the flight progress percentage for all the other curves.
void FlyToLocationUnreal(const FVector &UnrealDestination, double YawAtDestination, double PitchAtDestination, bool CanInterruptByMoving)
Begin a smooth flight to the given destination in Unreal coordinates, such that the Actor ends at the...
void FlyToLocationEarthCenteredEarthFixed(const FVector &EarthCenteredEarthFixedDestination, double YawAtDestination, double PitchAtDestination, bool CanInterruptByMoving)
Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF) destination,...
float Duration
The length in seconds that the flight should last.
bool IsFlightInProgress() const
Returns whether a flight is currently in progress.
void InterruptFlight()
Interrupts the flight that is currently in progress, leaving the Actor wherever it is currently.
UCurveFloat * MaximumHeightByDistanceCurve
A curve that controls the maximum height that will be achieved during the flight as a function of the...
void FlyToLocationLongitudeLatitudeHeight(const FVector &LongitudeLatitudeHeightDestination, double YawAtDestination, double PitchAtDestination, bool CanInterruptByMoving)
Begin a smooth camera flight to the given WGS84 longitude in degrees (x), latitude in degrees (y),...
FCesiumFlightInterrupted OnFlightInterrupted
A delegate that will be called when the Actor's flight is interrupted.
UCurveFloat * HeightPercentageCurve
A curve that controls what percentage of the maximum height the Actor should take at a given time on ...
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction *ThisTickFunction) override
This component can be added to a movable actor to anchor it to the globe and maintain precise placeme...