FakeXrExtensions.FakeInputEvent


class FakeXrExtensions.FakeInputEvent


Fake input event.

Summary

Nested types

Fake hit info.

Public constructors

Public functions

Int

Returns the current action associated with this input event.

Vec3

The direction the ray is pointing in, in the receiver's task coordinate space.

Int

Returns the dispatch flags for this event.

InputEvent.HitInfo?

Info about the first scene node (closest to the ray origin) that was hit by the input ray, if any.

Vec3

The origin of the ray, in the receiver's task coordinate space.

Int

Returns the pointer type of this event.

InputEvent.HitInfo?

Info about the second scene node from the same task that was hit, if any.

Int

Returns the source of this event.

Long

The time this event occurred, in the android.os.SystemClock#uptimeMillis time base.

Unit
setDirection(direction: Vec3)
Unit
setDispatchFlags(dispatchFlags: Int)
Unit
Unit
setOrigin(origin: Vec3)
Unit
setTimestamp(timestamp: Long)

Public constructors

FakeInputEvent

Added in 1.0.0-alpha02
FakeInputEvent()

Public functions

getAction

Added in 1.0.0-alpha02
fun getAction(): Int

Returns the current action associated with this input event.

getDirection

Added in 1.0.0-alpha02
fun getDirection(): Vec3

The direction the ray is pointing in, in the receiver's task coordinate space. Any point along the ray can be represented as origin + d * direction, where d is non-negative.

getDispatchFlags

Added in 1.0.0-alpha02
fun getDispatchFlags(): Int

Returns the dispatch flags for this event.

getHitInfo

Added in 1.0.0-alpha02
fun getHitInfo(): InputEvent.HitInfo?

Info about the first scene node (closest to the ray origin) that was hit by the input ray, if any. This will be null if no node was hit. Note that the hit node remains the same during an ongoing DOWN -> MOVE -> UP action, even if the pointer stops hitting the node during the action.

getOrigin

Added in 1.0.0-alpha02
fun getOrigin(): Vec3

The origin of the ray, in the receiver's task coordinate space.

getPointerType

Added in 1.0.0-alpha02
fun getPointerType(): Int

Returns the pointer type of this event.

getSecondaryHitInfo

Added in 1.0.0-alpha02
fun getSecondaryHitInfo(): InputEvent.HitInfo?

Info about the second scene node from the same task that was hit, if any.

getSource

Added in 1.0.0-alpha02
fun getSource(): Int

Returns the source of this event.

getTimestamp

Added in 1.0.0-alpha02
fun getTimestamp(): Long

The time this event occurred, in the android.os.SystemClock#uptimeMillis time base.

setDirection

Added in 1.0.0-alpha02
fun setDirection(direction: Vec3): Unit

setDispatchFlags

Added in 1.0.0-alpha02
fun setDispatchFlags(dispatchFlags: Int): Unit

setOrigin

Added in 1.0.0-alpha02
fun setOrigin(origin: Vec3): Unit

setTimestamp

Added in 1.0.0-alpha02
fun setTimestamp(timestamp: Long): Unit