JxrPlatformAdapter.InputEvent.HitInfo


public class JxrPlatformAdapter.InputEvent.HitInfo


Info about the hit result of the ray.

Summary

Public fields

final @Nullable Vector3

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

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

Public constructors

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

Public fields

hitPosition

Added in 1.0.0-alpha01
public final @Nullable 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).

inputEntity

Added in 1.0.0-alpha01
public final @Nullable JxrPlatformAdapter.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.

transform

Added in 1.0.0-alpha01
public final @NonNull Matrix4 transform

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

Public constructors

HitInfo

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

the entity that was hit by the input ray.

@Nullable Vector3 hitPosition

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

@NonNull Matrix4 transform

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