ControlTouchPadInputEventData

lumin. ControlTouchPadInputEventData

The input event received for Control or Magic Leap Mobile App touchpad input.

Extends

Methods

getDeviceId() → {number}

Inherited From:
Returns:

The device Id

Type
number

getEventSource() → {lumin.input.EventSource}

Inherited From:
Returns:

The event source

Type
lumin.input.EventSource

getEventType() → {lumin.input.EventType}

Inherited From:
Returns:

The event type

Type
lumin.input.EventType

getPrismId() → {number}

Inherited From:

Returns the Prism ID of the target Prism.

Returns:

the Prism ID of the target Prism.

Type
number

getTouch(tidxopt) → {vec3}

Returns touch xy coordinates and z force.

The coordinate ranges are:


  • x: -1.0 to 1.0 (left to right)
  • y: -1.0 to 1.0 (bottom to top)
  • z: 0.0 to 1.0 (no touch to full force)

The center of the touchpad corresponds to xy coordinate (0, 0).

Parameters:
Name Type Attributes Default Description
tidx number <optional>
0

touch index

Returns:

vector containing xy coordinates and force of the touch
at the given touch index

Type
vec3

getTouchCount() → {number}

Returns the current touch count.

Returns:

the current touch count

Type
number

getTouchState() → {boolean}

Returns current state of the touch

Returns:

true if the touch is active

Type
boolean

isInputEventType() → {boolean}

Inherited From:

Returns true if this is an input event (a subclass of InputEventData).

Returns:

true if this is an input event

Type
boolean

isMultiTouch() → {boolean}

Returns whether the touch is a single or multi touch.

Returns:

true if the touch is a multi touch

Type
boolean

toString() → {string}

Inherited From:

Returns a string representation of this event for debug purposes.

Returns:
Type
string