InputEvent.HitInfo


public final class InputEvent.HitInfo


Information about the hit result of the input ray, originating from one of the InputEvent.Source, and intersecting with some Entity on the scene.

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-alpha05
public HitInfo(
    @NonNull Entity inputEntity,
    Vector3 hitPosition,
    @NonNull Matrix4 transform
)
Parameters
@NonNull Entity inputEntity

The Entity that was hit by the input ray. Action.ACTION_MOVE, Action.ACTION_UP and Action.ACTION_CANCEL events will report the same node as was hit during the initial Action.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 (e.g. 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-alpha05
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 (e.g. during a drag event).

getInputEntity

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

The Entity that was hit by the input ray. Action.ACTION_MOVE, Action.ACTION_UP and Action.ACTION_CANCEL events will report the same node as was hit during the initial Action.ACTION_DOWN.

getTransform

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

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

hashCode

public int hashCode()