FakeXrExtensions.FakeInputEvent


public class FakeXrExtensions.FakeInputEvent


Fake input event.

Summary

Nested types

Fake hit info.

Public constructors

Public methods

int

Returns the current action associated with this input event.

@NonNull Vec3

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

int

Returns the dispatch flags for this event.

@Nullable InputEvent.HitInfo

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

@NonNull Vec3

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

int

Returns the pointer type of this event.

@Nullable 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.

void
void
setDispatchFlags(int dispatchFlags)
void
void
void
setTimestamp(long timestamp)

Public fields

action

Added in 1.0.0-alpha01
public int action

direction

Added in 1.0.0-alpha01
public Vec3 direction

dispatchFlags

Added in 1.0.0-alpha01
public int dispatchFlags

origin

Added in 1.0.0-alpha01
public Vec3 origin

pointerType

Added in 1.0.0-alpha01
public int pointerType

source

Added in 1.0.0-alpha01
public int source

timestamp

Added in 1.0.0-alpha01
public long timestamp

Public constructors

FakeInputEvent

Added in 1.0.0-alpha01
public FakeInputEvent()

Public methods

getAction

Added in 1.0.0-alpha01
public int getAction()

Returns the current action associated with this input event.

getDirection

Added in 1.0.0-alpha01
public @NonNull Vec3 getDirection()

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-alpha01
public int getDispatchFlags()

Returns the dispatch flags for this event.

getHitInfo

Added in 1.0.0-alpha01
public @Nullable InputEvent.HitInfo getHitInfo()

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-alpha01
public @NonNull Vec3 getOrigin()

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

getPointerType

Added in 1.0.0-alpha01
public int getPointerType()

Returns the pointer type of this event.

getSecondaryHitInfo

Added in 1.0.0-alpha01
public @Nullable InputEvent.HitInfo getSecondaryHitInfo()

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

getSource

Added in 1.0.0-alpha01
public int getSource()

Returns the source of this event.

getTimestamp

Added in 1.0.0-alpha01
public long getTimestamp()

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

setDirection

Added in 1.0.0-alpha01
public void setDirection(@NonNull Vec3 direction)

setDispatchFlags

Added in 1.0.0-alpha01
public void setDispatchFlags(int dispatchFlags)

setFakeHitInfo

Added in 1.0.0-alpha01
public void setFakeHitInfo(
    @NonNull FakeXrExtensions.FakeInputEvent.FakeHitInfo hitInfo
)

setOrigin

Added in 1.0.0-alpha01
public void setOrigin(@NonNull Vec3 origin)

setTimestamp

Added in 1.0.0-alpha01
public void setTimestamp(long timestamp)