Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceService

Hierarchy

  • DeviceService

Index

Constructors

constructor

Properties

Private _defaultFrameState

_defaultFrameState: SuggestedFrameState = new SuggestedFrameState()

Private _deviceLocalOriginRelativeToDeviceUserPose

_deviceLocalOriginRelativeToDeviceUserPose: EntityPose = this.contextService.createEntityPose(this.localOrigin,this.user)

Private _deviceOrientation

_deviceOrientation: Quaternion | undefined

Private _deviceOrientationHeadingAccuracy

_deviceOrientationHeadingAccuracy: number | undefined

Private _deviceOrientationListener

_deviceOrientationListener: any

Private _getEntityPositionInReferenceFrame

_getEntityPositionInReferenceFrame: getEntityPositionInReferenceFrame = getEntityPositionInReferenceFrame

Private _getSerializedEntityState

_getSerializedEntityState: getSerializedEntityState = getSerializedEntityState

Private _isPresentingHMD

_isPresentingHMD: boolean = false

Private _scratchCartesian

_scratchCartesian: Cartesian3 = new Cartesian3

Private _scratchLocalOrigin

_scratchLocalOrigin: Entity = new Entity({position: new ConstantPositionProperty(undefined, undefined),orientation: new ConstantProperty(undefined)})

Private _scratchQuaternion

_scratchQuaternion: Quaternion = new Quaternion

Private _scratchQuaternion2

_scratchQuaternion2: Quaternion = new Quaternion

Private contextService

contextService: ContextService

localOrigin

localOrigin: Entity = this.contextService.entities.add(new Entity({id: 'ar.device.localOrigin',name: 'Device Local Origin',position: undefined,orientation: undefined}))

An entity representing the local origin, defining an East-North-Up coordinate system.

Private sessionService

sessionService: SessionService

stage

stage: Entity = this.contextService.entities.add(new Entity({id: 'ar.device.stage',name: 'Device Stage',position: undefined,orientation: undefined}))

An entity representing the physical floor-level plane below the user

Optional suggestedFrameState

suggestedFrameState: SuggestedFrameState

user

user: Entity = this.contextService.entities.add(new Entity({id: 'ar.device.user',name: 'Device User',position: undefined,orientation: undefined}))

An entity representing the physical pose of the user

Private viewService

viewService: ViewService

Accessors

geoHeadingAccuracy

  • get geoHeadingAccuracy(): number | undefined

geoHorizontalAccuracy

  • get geoHorizontalAccuracy(): number | undefined

geoVerticalAccuracy

  • get geoVerticalAccuracy(): number | undefined

isPresentingHMD

  • get isPresentingHMD(): boolean

Methods

Private _onNextFrameState

Private _tryOrientationUpdates

  • _tryOrientationUpdates(): void

Private _updateDeviceUserPoseFromDeviceOrientation

  • _updateDeviceUserPoseFromDeviceOrientation(): void

createFrameState

exitPresentHMD

  • exitPresentHMD(): Promise<void>

getSubviewEntity

  • getSubviewEntity(index: number): Entity

requestFrameState

  • Request the next (suggested) frame state. Before the returned promise is resolved, the device user entity (as well as any other subscribed entities) will be updated to reflect the latest pose data. The device-user entity is the only entity which is automatically updated when calling this function; Any other data must be explicitly subscribed to in order to receive an updated pose.

    Returns Promise<SuggestedFrameState>

requestPresentHMD

  • requestPresentHMD(): Promise<void>

subscribeGeolocation

unsubscribeGeolocation

Object literals

Private _scratchFrameState

_scratchFrameState: object

entities

entities: object

Type declaration

subviews

subviews: Array<undefined> = []

time

time: any = <any>{}

viewport

viewport: any = <any>{}

Generated using TypeDoc