Options
All
  • Public
  • Public/Protected
  • All
V1.7
  • V1.6
  • V1.7
Menu

Class InputHelper

Hierarchy

  • InputHelper

Index

Constructors

constructor

Methods

getActiveDevices

getAllPerformedGestures

  • getAllPerformedGestures(): {} | null
  • Returns a map of the gestures performed by all the active devices, mapped by their device IDs

    Returns {} | null

    the map of devices and gestures

getDeviceOrientation

  • getDeviceOrientation(deviceID: number): [number, number, number, number] | null
  • Returns the orientation of the given device (in world coordinates)

    Parameters

    • deviceID: number

      the ID of the device to retreive the orientation for

    Returns [number, number, number, number] | null

    the given device's orientation (in world coordinates)

getDevicePosition

  • getDevicePosition(deviceID: number): [number, number, number] | null
  • Returns the position of the given device (in world coordinates)

    Parameters

    • deviceID: number

      the ID of the device to retreive the position for

    Returns [number, number, number] | null

    the given device's position (in world coordinates)

getDeviceType

getDevicesButtonDown

  • getDevicesButtonDown(keycode: KeyCodes): Array<number> | null
  • Returns a list of all the devices that a given key is down on (Note that a button is considered "down" at any point while it is held)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns Array<number> | null

    the list of devices that have the given key down

getDevicesButtonPressed

  • getDevicesButtonPressed(keycode: KeyCodes): Array<number> | null
  • Returns a list of all the devices that a given key has been pressed on this frame (Note that a button is considered "pressed" only on the first frame that it is held, use isButtonDown to test if the button is down over multiple frames)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns Array<number> | null

    the list of devices that have the given key pressed

getDevicesButtonReleased

  • getDevicesButtonReleased(keycode: KeyCodes): Array<number> | null
  • Returns a list of all the devices that a given key has been released on this frame

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns Array<number> | null

    the list of devices that have the given key released

getDevicesGesturePerformed

  • getDevicesGesturePerformed(gesture: GestureType): Array<number> | null
  • Returns whether ANY device is receiving (or has received) a given gesture this frame and also returns a list of those devices

    Parameters

    Returns Array<number> | null

    a list of devices currently performing the given gesture any device, false otherwise

getDownButtons

  • getDownButtons(): {} | null
  • Returns a map of all keys down this frame, mapped by their devices

    Returns {} | null

    a map of devices to lists of keys that are currently down on that device

getEyeFixationPosition

  • Returns the data associated with the fixation of the eyes (in world coordinates)

    Returns EyeFixationPosition | null

    the position of the user's fixation and the confidence in the values given by the eye tracking system(ranges from 0.0 to 1.0f), null if eye fixation data doesn't exist

getEyeStressInformation

  • Returns data about potential eye stress

    Returns EyeStressInfo | null

    data structure of eye stress if it exists - isFixationDepthUncomfortable whether or not the users current fixation point is too close to them - hasDepthViolationOccured whether or not a depth violation has occurred (this happens when a user's fixation point remains too close for too long) - remainingAtUncomfortableDistance the number of seconds remaining for a user to have their fixation depth at an unacceptable distance before a depth violation occurs null thoerwise

getGestureData

  • Returns the gesture data associated with a given gesture for a given device

    Parameters

    • deviceID: number

      the device to retreive the gesture data for

    • gesture: GestureType

      the gesture to retrieve the gesture data for

    Returns Array<GestureState> | null

    a list of the gesture data that has been received since it was last updated

getLeftEyeInformation

  • getLeftEyeInformation(): EyeInfo | null
  • Returns the data associated with the left eye (in world coordinates)

    Returns EyeInfo | null

    data structure of the left eye information if it exists - position the position of the left eye - rotation the rotation of the left eye - confidence the confidence in the values given by the eye tracking system (ranges from 0.0 to 1.0f) - isBlinking true if the user has their left eye closed, false otherwise null otherwise

getLeftHandState

getPerformedGesture

  • getPerformedGesture(deviceID: number): Array<GestureType> | null
  • Returns a list of all gestures performed (or being performed) on a given device this frame

    Parameters

    • deviceID: number

      the ID of the device for which to retreive the gesture data

    Returns Array<GestureType> | null

    the list of gestures performed (or being performed) this frame device this frame, false otherwise

getPressedButtons

  • getPressedButtons(): {} | null
  • Returns a map of all keys pressed this frame, mapped by their devices

    Returns {} | null

    a map of devices to lists of keys that are currently pressed on that device

getPrimaryDevice

getPrimaryDeviceId

  • getPrimaryDeviceId(): number
  • Returns The DeviceID for the primary control device.

    Returns number

    The DeviceID of the primary Control, if no devices then be invalid returned.

getReleasedButtons

  • getReleasedButtons(): {} | null
  • Returns a map of all keys released this frame, mapped by their devices

    Returns {} | null

    a map of devices to lists of keys released on that device

getRightEyeInformation

  • getRightEyeInformation(): EyeInfo | null
  • Returns the data associated with the right eye (in world coordinates)

    Returns EyeInfo | null

    data structure of the right eye information if it exists - position the position of the right eye - rotation the rotation of the right eye - confidence the confidence in the values given by the eye tracking system (ranges from 0.0 to 1.0f) - isBlinking true if the user has their right eye closed, false otherwise null otherwise

getRightHandState

getTouchPadPosition

  • Returns the touched touchpad position(s) for a given device

    Parameters

    • deviceID: number

      the ID of the device to retreive the touchpad position for

    Returns TouchPadState | null

    the returned touchpad information

  • Returns the touchpad touch information for all active devices that have touchpad information

    Returns Array<TouchPadState> | null

    touchPadInfo the list of device touchpad information return true if at least one device with touchpad information exists, false otherwise

isButtonDown

  • isButtonDown(keycode: KeyCodes): boolean
  • isButtonDown(keycode: KeyCodes, deviceID: number): boolean
  • Returns whether a given key is currently down on ANY active device (Note that a button is considered "down" at any point while it is held)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns boolean

    true if there is a device has the given key down, false otherwise

  • Returns whether a given key is currently down the given device (Note that a button is considered "down" at any point while it is held)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    • deviceID: number

      the device to test the keycode on

    Returns boolean

    true if the given device has the given key down, false otherwise

isButtonPressed

  • isButtonPressed(keycode: KeyCodes): boolean
  • isButtonPressed(keycode: KeyCodes, deviceID: number): boolean
  • Returns whether a given key has been pressed on ANY active device this frame (Note that a button is considered "pressed" only on the first frame that it is held, use isButtonDown to test if the button is down over multiple frames)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns boolean

    true if there is a device has pressed the given key this frame, false otherwise

  • Returns whether a given key has been pressed on the given device this frame (Note that a button is considered "pressed" only on the first frame that it is held, use isButtonDown to test if the button is down over multiple frames)

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    • deviceID: number

      the device to test the keycode on

    Returns boolean

    true if the given device has the given key pressed this frame, false otherwise

isButtonReleased

  • isButtonReleased(keycode: KeyCodes): boolean
  • isButtonReleased(keycode: KeyCodes, deviceID: number): boolean
  • Returns whether a given key has been released on ANY active device this frame

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    Returns boolean

    true if there is a device has released the given key this frame, false otherwise

  • Returns whether a given key has been released on the given device this frame

    Parameters

    • keycode: KeyCodes

      the code of the key to test

    • deviceID: number

      the device to test the keycode on

    Returns boolean

    true if the given deivce has released the given key this frame, false otherwise

isDeviceOrientationUpdated

  • isDeviceOrientationUpdated(deviceID: number): boolean
  • Checks if the given device's orientation has been updated this frame

    Parameters

    • deviceID: number

      the ID of the device to test

    Returns boolean

    true if the given device has had its orientation updated this frame, false otherwise

isDevicePositionUpdated

  • isDevicePositionUpdated(deviceID: number): boolean
  • Checks if the given device's position has been updated this frame

    Parameters

    • deviceID: number

      the ID of the device to test

    Returns boolean

    true if the given device has had its position updated this frame, false otherwise

isEyeTrackingUpdated

  • isEyeTrackingUpdated(): boolean
  • Returns whether or not new eye tracking information has been received this frame

    Returns boolean

    true if new eye tracking information has been received this frame, false otherwise

isGestureDataUpdated

  • isGestureDataUpdated(deviceID: number, gesture: GestureType): boolean
  • Returns whether new data for a gesture has been received this frame

    Parameters

    • deviceID: number

      the device to check the gesture data for

    • gesture: GestureType

      the gesture to check the gesture data for

    Returns boolean

    true if this device exists, has data for the given gesture and that data has been updated this frame, false otherwise

isGesturePerformed

  • Returns whether ANY device is receiving (or has received) a given gesture this frame

    Parameters

    Returns boolean

    true if the given gesture has been received (or is being received) this frame by any device, false otherwise

isLeftHandTrackingUpdated

  • isLeftHandTrackingUpdated(): boolean
  • Returns whether or not new left hand tracking information has been received this frame

    Returns boolean

    true if new left hand tracking information has been received this frame, false otherwise

isPrimaryDevice

  • isPrimaryDevice(deviceID: number): boolean
  • Returns Checks if the DeviceId provided is the Primary DeviceId.

    Parameters

    • deviceID: number

      the ID of the device to check.

    Returns boolean

    true if the deviceId is that of the Primary device otherwise false is returned.

isRightHandTrackingUpdated

  • isRightHandTrackingUpdated(): boolean
  • Returns whether or not new right hand tracking information has been received this frame

    Returns boolean

    true if new right hand tracking information has been received this frame, false otherwise

isTouchPadDown

  • isTouchPadDown(): boolean
  • isTouchPadDown(deviceID: number): boolean
  • Returns whether ANY active device's touchpad is currently being used

    Returns boolean

    true if there is a device whose touchpad is being used, false otherwise

  • Returns whether the given device's touchpad is currently being used

    Parameters

    • deviceID: number

    Returns boolean

    true if the given device exists and has its touchpad being used

Generated using TypeDoc