Class CesiumGlobeAnchorComponent
- Namespace
- LibreRally
- Assembly
- LibreRally.dll
Anchors an entity to an explicit globe location and optional tangent-frame offset.
[DataContract]
[ComponentCategory("LibreRally")]
public sealed class CesiumGlobeAnchorComponent : EntityComponent, IIdentifiable
- Inheritance
-
CesiumGlobeAnchorComponent
- Implements
-
IIdentifiable
- Inherited Members
Properties
AlignToEastUpNorth
Gets or sets a value indicating whether the entity should align to the anchor east/up/north frame.
public bool AlignToEastUpNorth { get; set; }
Property Value
HeightMeters
Gets or sets the anchor height in meters above the ellipsoid.
public double HeightMeters { get; set; }
Property Value
LatitudeDegrees
Gets or sets the anchor latitude in degrees.
public double LatitudeDegrees { get; set; }
Property Value
LocalOffset
Gets or sets the local tangent-frame offset from the anchor position in east/up/north meters.
public Vector3 LocalOffset { get; set; }
Property Value
LongitudeDegrees
Gets or sets the anchor longitude in degrees.
public double LongitudeDegrees { get; set; }
Property Value
Revision
Gets the revision used by runtime scripts to detect anchor changes.
public int Revision { get; }
Property Value
RotationOffset
Gets or sets the local rotation offset applied after the east/up/north alignment.
public Quaternion RotationOffset { get; set; }
Property Value
Methods
ApplyTo(Entity, CesiumGeoreferenceComponent)
Applies the anchored transform to the provided entity.
public void ApplyTo(Entity entity, CesiumGeoreferenceComponent georeference)
Parameters
entityEntityThe entity to reposition and rotate.
georeferenceCesiumGeoreferenceComponentThe georeference used to resolve the anchor.
Exceptions
- ArgumentNullException
Thrown when
entityorgeoreferenceis null because both are required to apply the resolved anchor transform.
ResolveLocalPosition(CesiumGeoreferenceComponent)
Resolves the anchored local position using the provided georeference.
public Vector3 ResolveLocalPosition(CesiumGeoreferenceComponent georeference)
Parameters
georeferenceCesiumGeoreferenceComponentThe georeference that maps globe coordinates into the current local frame.
Returns
- Vector3
The resolved local position for the anchor.
Exceptions
- ArgumentNullException
Thrown when
georeferenceis null because the anchor cannot be projected without a globe-to-local frame.
ResolveLocalRotation(CesiumGeoreferenceComponent)
Resolves the anchored local rotation using the provided georeference.
public Quaternion ResolveLocalRotation(CesiumGeoreferenceComponent georeference)
Parameters
georeferenceCesiumGeoreferenceComponentThe georeference that maps globe coordinates into the current local frame.
Returns
- Quaternion
The resolved local rotation for the anchor.
Exceptions
- ArgumentNullException
Thrown when
georeferenceis null because the anchor orientation depends on the active globe-to-local frame.