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

A sub-scene with its own georeference origin. More...

Inheritance diagram for CesiumForUnity.CesiumSubScene:

Public Member Functions

void SetOriginEarthCenteredEarthFixed (double x, double y, double z)
 Sets the origin of the coordinate system to particular ecefX, ecefY, ecefZ coordinates in the Earth-Centered, Earth-Fixed (ECEF) frame.
 
void SetOriginLongitudeLatitudeHeight (double longitude, double latitude, double height)
 Sets the origin of the coordinate system to a particular longitude, latitude, and height.
 
void UpdateOrigin ()
 Recomputes the coordinate system based on an updated origin.
 

Properties

double activationRadius [get, set]
 The maximum distance at which to activate this sub-scene, in meters.
 
bool showActivationRadius [get, set]
 Whether to show the activation radius as a wireframe sphere in the Editor.
 
CesiumGeoreferenceOriginAuthority originAuthority [get, set]
 Identifies which set of coordinates authoritatively defines the origin of this sub-scene.
 
double latitude [get, set]
 The latitude of the origin of the coordinate system, in degrees, in the range -90 to 90.
 
double longitude [get, set]
 The longitude of the origin of the coordinate system, in degrees, in the range -180 to 180.
 
double height [get, set]
 The height in the origin of the coordinate system, in meters above the ellipsoid.
 
double ecefX [get, set]
 The Earth-Centered, Earth-Fixed X coordinate of the origin of the coordinate system, in meters.
 
double ecefY [get, set]
 The Earth-Centered, Earth-Fixed Y coordinate of the origin of the coordinate system, in meters.
 
double ecefZ [get, set]
 The Earth-Centered, Earth-Fixed Z coordinate of the origin of the coordinate system, in meters.
 

Detailed Description

A sub-scene with its own georeference origin.

When a game object with a CesiumOriginShift comes close to a sub-scene, that sub-scene is activated and all other sub-scenes are deactivated. This allows relatively normal Unity scenes to be designed at multiple locations on the globe.

When determining the distance to a sub-scene, only the CesiumGeoreference's Transform is considered. The Transform associated with the sub-scene is ignored. The sub-scene transform will affect the transformation of the objects inside it once activated, however.

Definition at line 22 of file CesiumSubScene.cs.

Member Function Documentation

◆ SetOriginEarthCenteredEarthFixed()

void CesiumForUnity.CesiumSubScene.SetOriginEarthCenteredEarthFixed ( double x,
double y,
double z )
inline

Sets the origin of the coordinate system to particular ecefX, ecefY, ecefZ coordinates in the Earth-Centered, Earth-Fixed (ECEF) frame.

Calling this method is more efficient than setting the properties individually.

Parameters
xThe X coordinate in meters.
yThe Y coordinate in meters.
zThe Z coordinate in meters.

Definition at line 224 of file CesiumSubScene.cs.

◆ SetOriginLongitudeLatitudeHeight()

void CesiumForUnity.CesiumSubScene.SetOriginLongitudeLatitudeHeight ( double longitude,
double latitude,
double height )
inline

Sets the origin of the coordinate system to a particular longitude, latitude, and height.

Calling this method is more efficient than setting the properties individually.

Parameters
longitudeThe longitude in degrees, in the range -180 to 180.
latitudeThe latitude in degrees, in the range -90 to 90.
heightThe height in meters above the ellipsoid. Do not confuse this with a geoid height or height above mean sea level, which can be tens of meters higher or lower depending on where in the world the object is located.

Definition at line 246 of file CesiumSubScene.cs.

◆ UpdateOrigin()

void CesiumForUnity.CesiumSubScene.UpdateOrigin ( )
inline

Recomputes the coordinate system based on an updated origin.

It is usually not necessary to call this directly as it is called automatically when needed.

Definition at line 431 of file CesiumSubScene.cs.

Property Documentation

◆ activationRadius

double CesiumForUnity.CesiumSubScene.activationRadius
getset

The maximum distance at which to activate this sub-scene, in meters.

Even if the CesiumOriginShift game object is inside this activation radius, this sub-scene may still not be activated if another sub-scene is closer.

Definition at line 39 of file CesiumSubScene.cs.

◆ ecefX

double CesiumForUnity.CesiumSubScene.ecefX
getset

The Earth-Centered, Earth-Fixed X coordinate of the origin of the coordinate system, in meters.

This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.EarthCenteredEarthFixed. Setting this property changes the originAuthority accordingly.

Definition at line 146 of file CesiumSubScene.cs.

◆ ecefY

double CesiumForUnity.CesiumSubScene.ecefY
getset

The Earth-Centered, Earth-Fixed Y coordinate of the origin of the coordinate system, in meters.

This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.EarthCenteredEarthFixed. Setting this property changes the originAuthority accordingly.

Definition at line 165 of file CesiumSubScene.cs.

◆ ecefZ

double CesiumForUnity.CesiumSubScene.ecefZ
getset

The Earth-Centered, Earth-Fixed Z coordinate of the origin of the coordinate system, in meters.

This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.EarthCenteredEarthFixed. Setting this property changes the originAuthority accordingly.

Definition at line 184 of file CesiumSubScene.cs.

◆ height

double CesiumForUnity.CesiumSubScene.height
getset

The height in the origin of the coordinate system, in meters above the ellipsoid.

Do not confuse this with a geoid height or height above mean sea level, which can be tens of meters higher or lower depending on where in the world the object is located. This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.LongitudeLatitudeHeight. Setting this property changes the originAuthority accordingly.

Definition at line 127 of file CesiumSubScene.cs.

◆ latitude

double CesiumForUnity.CesiumSubScene.latitude
getset

The latitude of the origin of the coordinate system, in degrees, in the range -90 to 90.

This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.LongitudeLatitudeHeight. Setting this property changes the originAuthority accordingly.

Definition at line 87 of file CesiumSubScene.cs.

◆ longitude

double CesiumForUnity.CesiumSubScene.longitude
getset

The longitude of the origin of the coordinate system, in degrees, in the range -180 to 180.

This property is ignored unless originAuthority is CesiumGeoreferenceOriginAuthority.LongitudeLatitudeHeight. Setting this property changes the originAuthority accordingly.

Definition at line 106 of file CesiumSubScene.cs.

◆ originAuthority

CesiumGeoreferenceOriginAuthority CesiumForUnity.CesiumSubScene.originAuthority
getset

Identifies which set of coordinates authoritatively defines the origin of this sub-scene.

Definition at line 68 of file CesiumSubScene.cs.

◆ showActivationRadius

bool CesiumForUnity.CesiumSubScene.showActivationRadius
getset

Whether to show the activation radius as a wireframe sphere in the Editor.

Definition at line 54 of file CesiumSubScene.cs.


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