InputEvent.HitInfo


public final class InputEvent.HitInfo


Information about the hit result of the ray.

Summary

Public constructors

HitInfo(
    @NonNull Entity inputEntity,
    Vector3 hitPosition,
    @NonNull Matrix4 transform
)

Public methods

boolean
equals(Object other)
final Vector3

The position of the hit in the receiver's activity space.

final @NonNull Entity

The entity that was hit by the input ray.

final @NonNull Matrix4

The matrix transforming activity space coordinates into the hit entity's local coordinate space.

int

Public constructors

HitInfo

Added in 1.0.0-alpha01
public HitInfo(
    @NonNull Entity inputEntity,
    Vector3 hitPosition,
    @NonNull Matrix4 transform
)
Parameters
@NonNull Entity inputEntity

The entity that was hit by the input ray.

ACTION_MOVE, ACTION_UP, and ACTION_CANCEL events will report the same node as was hit during the initial ACTION_DOWN.

Vector3 hitPosition

The position of the hit in the receiver's activity space.

All events may report the current ray's hit position. This can be null if there no longer is a collision between the ray and the input node (eg, during a drag event).

@NonNull Matrix4 transform

The matrix transforming activity space coordinates into the hit entity's local coordinate space.

Public methods

equals

public boolean equals(Object other)

getHitPosition

Added in 1.0.0-alpha01
public final Vector3 getHitPosition()

The position of the hit in the receiver's activity space.

All events may report the current ray's hit position. This can be null if there no longer is a collision between the ray and the input node (eg, during a drag event).

getInputEntity

Added in 1.0.0-alpha01
public final @NonNull Entity getInputEntity()

The entity that was hit by the input ray.

ACTION_MOVE, ACTION_UP, and ACTION_CANCEL events will report the same node as was hit during the initial ACTION_DOWN.

getTransform

Added in 1.0.0-alpha01
public final @NonNull Matrix4 getTransform()

The matrix transforming activity space coordinates into the hit entity's local coordinate space.

hashCode

public int hashCode()