Table of Contents

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

bool

HeightMeters

Gets or sets the anchor height in meters above the ellipsoid.

public double HeightMeters { get; set; }

Property Value

double

LatitudeDegrees

Gets or sets the anchor latitude in degrees.

public double LatitudeDegrees { get; set; }

Property Value

double

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

Vector3

LongitudeDegrees

Gets or sets the anchor longitude in degrees.

public double LongitudeDegrees { get; set; }

Property Value

double

Revision

Gets the revision used by runtime scripts to detect anchor changes.

public int Revision { get; }

Property Value

int

RotationOffset

Gets or sets the local rotation offset applied after the east/up/north alignment.

public Quaternion RotationOffset { get; set; }

Property Value

Quaternion

Methods

ApplyTo(Entity, CesiumGeoreferenceComponent)

Applies the anchored transform to the provided entity.

public void ApplyTo(Entity entity, CesiumGeoreferenceComponent georeference)

Parameters

entity Entity

The entity to reposition and rotate.

georeference CesiumGeoreferenceComponent

The georeference used to resolve the anchor.

Exceptions

ArgumentNullException

Thrown when entity or georeference is 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

georeference CesiumGeoreferenceComponent

The georeference that maps globe coordinates into the current local frame.

Returns

Vector3

The resolved local position for the anchor.

Exceptions

ArgumentNullException

Thrown when georeference is 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

georeference CesiumGeoreferenceComponent

The georeference that maps globe coordinates into the current local frame.

Returns

Quaternion

The resolved local rotation for the anchor.

Exceptions

ArgumentNullException

Thrown when georeference is null because the anchor orientation depends on the active globe-to-local frame.