Cesium for Unity 1.15.2
Loading...
Searching...
No Matches
CesiumForUnity.CesiumFlyToController Class Reference

A controller that can smoothly fly to locations around the globe while offering control over the characteristics of its flights. More...

Inheritance diagram for CesiumForUnity.CesiumFlyToController:

Public Member Functions

delegate void CompletedFlightDelegate ()
 Encapsulates a method that is called whenever the controller finishes flying.
 
delegate void InterruptedFlightDelegate ()
 Encapsulates a method that is called whenever the controller's flight is interrupted.
 
void FlyToLocationEarthCenteredEarthFixed (double3 destination, float yawAtDestination, float pitchAtDestination, bool canInterruptByMoving)
 Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF) destination such that the controller ends at the specified yaw and pitch.
 
void FlyToLocationEarthCenteredEarthFixed (Vector3 destination, float yawAtDestination, float pitchAtDestination, bool canInterruptByMoving)
 Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF) destination such that the controller ends at the specified yaw and pitch.
 
void FlyToLocationLongitudeLatitudeHeight (double3 destination, float yawAtDestination, float pitchAtDestination, bool canInterruptByMoving)
 Begin a smooth flight to the given WGS84 longitude in degrees (x), latitude in degrees (y), and height in meters (z) such that the controller ends at the specified yaw and pitch.
 
void FlyToLocationLongitudeLatitudeHeight (Vector3 destination, float yawAtDestination, float pitchAtDestination, bool canInterruptByMoving)
 Begin a smooth flight to the given WGS84 longitude in degrees (x), latitude in degrees (y), and height in meters (z) such that the controller ends at the specified yaw and pitch.
 

Properties

AnimationCurve flyToAltitudeProfileCurve [get, set]
 A curve that dictates what percentage of the max altitude the controller should take at a given time on the curve.
 
AnimationCurve flyToProgressCurve [get, set]
 A curve that is used to determine the progress percentage for all the other curves.
 
AnimationCurve flyToMaximumAltitudeCurve [get, set]
 A curve that dictates the maximum altitude at each point along the curve.
 
double flyToDuration [get, set]
 The length in seconds that the flight should last.
 
double flyToGranularityDegrees [get, set]
 The granularity in degrees with which keypoints should be generated for the flight interpolation.
 

Events

CompletedFlightDelegate OnFlightComplete
 An event that is raised when the controller finishes flying.
 
InterruptedFlightDelegate OnFlightInterrupted
 An event that is raised when the controller's flight is interrupted.
 

Detailed Description

A controller that can smoothly fly to locations around the globe while offering control over the characteristics of its flights.

This controller is compatible with CesiumCameraController. During flights, it will disable inputs on CesiumCameraController as necessary, such as camera rotation with the mouse.

Definition at line 19 of file CesiumFlyToController.cs.

Member Function Documentation

◆ CompletedFlightDelegate()

delegate void CesiumForUnity.CesiumFlyToController.CompletedFlightDelegate ( )

Encapsulates a method that is called whenever the controller finishes flying.

◆ FlyToLocationEarthCenteredEarthFixed() [1/2]

void CesiumForUnity.CesiumFlyToController.FlyToLocationEarthCenteredEarthFixed ( double3 destination,
float yawAtDestination,
float pitchAtDestination,
bool canInterruptByMoving )
inline

Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF) destination such that the controller ends at the specified yaw and pitch.

The characteristics of the flight can be configured with CesiumFlyToController.flyToAltitudeProfileCurve, CesiumFlyToController.flyToProgressCurve, CesiumFlyToController.flyToMaximumAltitudeCurve, CesiumFlyToController.flyToDuration, and CesiumFlyToController.flyToGranularityDegrees.

Parameters
destinationThe destination in ECEF coordinates.
yawAtDestinationThe yaw of the controller at the destination.
pitchAtDestinationThe pitch of the controller at the destination.
canInterruptByMovingWhether the flight can be interrupted with movement inputs.

Definition at line 401 of file CesiumFlyToController.cs.

◆ FlyToLocationEarthCenteredEarthFixed() [2/2]

void CesiumForUnity.CesiumFlyToController.FlyToLocationEarthCenteredEarthFixed ( Vector3 destination,
float yawAtDestination,
float pitchAtDestination,
bool canInterruptByMoving )
inline

Begin a smooth flight to the given Earth-Centered, Earth-Fixed (ECEF) destination such that the controller ends at the specified yaw and pitch.

The characteristics of the flight can be configured with CesiumFlyToController.flyToAltitudeProfileCurve, CesiumFlyToController.flyToProgressCurve, CesiumFlyToController.flyToMaximumAltitudeCurve, CesiumFlyToController.flyToDuration, and CesiumFlyToController.flyToGranularityDegrees.

Parameters
destinationThe destination in ECEF coordinates.
yawAtDestinationThe yaw of the controller at the destination.
pitchAtDestinationThe pitch of the controller at the destination.
canInterruptByMovingWhether the flight can be interrupted with movement inputs.

Definition at line 448 of file CesiumFlyToController.cs.

◆ FlyToLocationLongitudeLatitudeHeight() [1/2]

void CesiumForUnity.CesiumFlyToController.FlyToLocationLongitudeLatitudeHeight ( double3 destination,
float yawAtDestination,
float pitchAtDestination,
bool canInterruptByMoving )
inline

Begin a smooth flight to the given WGS84 longitude in degrees (x), latitude in degrees (y), and height in meters (z) such that the controller ends at the specified yaw and pitch.

The characteristics of the flight can be configured with CesiumFlyToController.flyToAltitudeProfileCurve, CesiumFlyToController.flyToProgressCurve, CesiumFlyToController.flyToMaximumAltitudeCurve, CesiumFlyToController.flyToDuration, and CesiumFlyToController.flyToGranularityDegrees.

Parameters
destinationThe longitude (x), latitude (y), and height (z) of the destination.
yawAtDestinationThe yaw of the controller at the destination.
pitchAtDestinationThe pitch of the controller at the destination.
canInterruptByMovingWhether the flight can be interrupted with movement inputs.

Definition at line 483 of file CesiumFlyToController.cs.

◆ FlyToLocationLongitudeLatitudeHeight() [2/2]

void CesiumForUnity.CesiumFlyToController.FlyToLocationLongitudeLatitudeHeight ( Vector3 destination,
float yawAtDestination,
float pitchAtDestination,
bool canInterruptByMoving )
inline

Begin a smooth flight to the given WGS84 longitude in degrees (x), latitude in degrees (y), and height in meters (z) such that the controller ends at the specified yaw and pitch.

The characteristics of the flight can be configured with CesiumFlyToController.flyToAltitudeProfileCurve, CesiumFlyToController.flyToProgressCurve, CesiumFlyToController.flyToMaximumAltitudeCurve, CesiumFlyToController.flyToDuration, and CesiumFlyToController.flyToGranularityDegrees.

Parameters
destinationThe longitude (x), latitude (y), and height (z) of the destination.
yawAtDestinationThe yaw of the controller at the destination.
pitchAtDestinationThe pitch of the controller at the destination.
canInterruptByMovingWhether the flight can be interrupted with movement inputs.

Definition at line 516 of file CesiumFlyToController.cs.

◆ InterruptedFlightDelegate()

delegate void CesiumForUnity.CesiumFlyToController.InterruptedFlightDelegate ( )

Encapsulates a method that is called whenever the controller's flight is interrupted.

Property Documentation

◆ flyToAltitudeProfileCurve

AnimationCurve CesiumForUnity.CesiumFlyToController.flyToAltitudeProfileCurve
getset

A curve that dictates what percentage of the max altitude the controller should take at a given time on the curve.

This curve must be kept in the 0 to 1 range on both axes. The CesiumFlyToController.flyToMaximumAltitudeCurve dictates the actual max altitude at each point along the curve.

Definition at line 33 of file CesiumFlyToController.cs.

◆ flyToDuration

double CesiumForUnity.CesiumFlyToController.flyToDuration
getset

The length in seconds that the flight should last.

Definition at line 76 of file CesiumFlyToController.cs.

◆ flyToGranularityDegrees

double CesiumForUnity.CesiumFlyToController.flyToGranularityDegrees
getset

The granularity in degrees with which keypoints should be generated for the flight interpolation.

This value should be greater than 0.0, otherwise the controller will not take flight.

This represents the difference in degrees between each keypoint on the flight path. The lower the value, the more keypoints are generated, and the smoother the flight interpolation will be.

Definition at line 97 of file CesiumFlyToController.cs.

◆ flyToMaximumAltitudeCurve

AnimationCurve CesiumForUnity.CesiumFlyToController.flyToMaximumAltitudeCurve
getset

A curve that dictates the maximum altitude at each point along the curve.

This can be used in conjuction with CesiumFlyToController.flyToAltitudeProfileCurve to allow the controller to take some altitude during the flight.

Definition at line 63 of file CesiumFlyToController.cs.

◆ flyToProgressCurve

AnimationCurve CesiumForUnity.CesiumFlyToController.flyToProgressCurve
getset

A curve that is used to determine the progress percentage for all the other curves.

Definition at line 46 of file CesiumFlyToController.cs.

Event Documentation

◆ OnFlightComplete

CompletedFlightDelegate CesiumForUnity.CesiumFlyToController.OnFlightComplete

An event that is raised when the controller finishes flying.

Definition at line 122 of file CesiumFlyToController.cs.

◆ OnFlightInterrupted

InterruptedFlightDelegate CesiumForUnity.CesiumFlyToController.OnFlightInterrupted

An event that is raised when the controller's flight is interrupted.

Definition at line 132 of file CesiumFlyToController.cs.


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