Options
All
  • Public
  • Public/Protected
  • All
Menu

Class EntityService

A service for subscribing/unsubscribing to entities

Hierarchy

  • EntityService

Index

Constructors

constructor

Properties

Private _getEntityPositionInReferenceFrame

_getEntityPositionInReferenceFrame: getEntityPositionInReferenceFrame = getEntityPositionInReferenceFrame

Private _scratchCartesian

_scratchCartesian: Cartesian3 = new Cartesian3

Private _scratchMatrix3

_scratchMatrix3: Matrix3 = new Matrix3

Private _scratchMatrix4

_scratchMatrix4: Matrix4 = new Matrix4

Private _scratchQuaternion

_scratchQuaternion: Quaternion = new Quaternion

collection

collection: EntityCollection = new EntityCollection

Protected sessionService

sessionService: SessionService

subscribedEvent

subscribedEvent: Event<object> = new Event<{id:string, options?:{}}>()

subscriptions

subscriptions: Map<string, __type> = new Map<string, {}>()

unsubscribedEvent

unsubscribedEvent: Event<object> = new Event<{id:string}>()

Methods

Private _handleSubscribed

  • _handleSubscribed(evt: object): void

Private _handleUnsubscribed

  • _handleUnsubscribed(id: string): void

createEntityPose

  • createEntityPose(entityOrId: Entity | string, referenceFrameOrId: string | ReferenceFrame | Entity): EntityPose
  • Create a new EntityPose instance to represent the pose of an entity relative to a given reference frame. If no reference frame is specified, then the pose is based on the context's defaultReferenceFrame.

    Parameters

    • entityOrId: Entity | string
    • referenceFrameOrId: string | ReferenceFrame | Entity

      the reference frame to use

    Returns EntityPose

createFixed

  • createFixed(cartographic: Cartographic, localToFixed: northUpEastToFixedFrame): Entity
  • Create an entity that is positioned at the given cartographic location, with an orientation computed according to the provided localToFixed transform function.

    For the localToFixed parameter, you can pass any of the following:

    Argon.Cesium.Transforms.eastNorthUpToFixedFrame
    Argon.Cesium.Transforms.northEastDownToFixedFrame
    Argon.Cesium.Transforms.northUpEastToFixedFrame
    Argon.Cesium.Transforms.northWestUpToFixedFrame
    

    Additionally, argon.js provides:

    Argon.eastUpSouthToFixedFrame
    

    Alternative transform functions can be created with:

    Argon.Cesium.Transforms.localFrameToFixedFrameGenerator
    

    Parameters

    • cartographic: Cartographic
    • localToFixed: northUpEastToFixedFrame

    Returns Entity

getCartographic

  • getCartographic(entity: Entity, time: JulianDate, result?: Cartographic): Cartographic | undefined
  • Get the cartographic position of an Entity at the given time

    Parameters

    • entity: Entity
    • time: JulianDate
    • Optional result: Cartographic

    Returns Cartographic | undefined

subscribe

  • subscribe(idOrEntity: string | Entity): Promise<Entity>
  • subscribe(idOrEntity: string | Entity, options?: __type, session?: SessionPort): Promise<Entity>
  • Subscribe to pose updates for the given entity id

    Parameters

    • idOrEntity: string | Entity

    Returns Promise<Entity>

    A Promise that resolves to a new or existing entity

  • Parameters

    • idOrEntity: string | Entity
    • Optional options: __type
    • Optional session: SessionPort

    Returns Promise<Entity>

unsubscribe

  • unsubscribe(idOrEntity: any): void
  • unsubscribe(idOrEntity: string | Entity, session?: SessionPort): void
  • Unsubscribe from pose updates for the given entity id

    Parameters

    • idOrEntity: any

    Returns void

  • Parameters

    • idOrEntity: string | Entity
    • Optional session: SessionPort

    Returns void

updateEntityFromSerializedState

Generated using TypeDoc