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 |
|---|
Public methods |
|
|---|---|
boolean |
|
final Vector3 |
The position of the hit in the receiver's activity space. |
final @NonNull Entity |
The |
final @NonNull Matrix4 |
The matrix transforming activity space coordinates into the hit entity's local coordinate space. |
int |
hashCode() |
Public constructors
HitInfo
public HitInfo(
@NonNull Entity inputEntity,
Vector3 hitPosition,
@NonNull Matrix4 transform
)
| Parameters | |
|---|---|
@NonNull Entity inputEntity |
The |
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
getHitPosition
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
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
public final @NonNull Matrix4 getTransform()
The matrix transforming activity space coordinates into the hit entity's local coordinate space.