Package physics.collision
Class RayCastResult
java.lang.Object
physics.collision.RayCastResult
- Since:
- 21.06.2021
- Author:
- Juyas
-
Constructor Summary
ConstructorDescriptionCreate a RayCastResult, where the target was not hit.RayCastResult
(org.joml.Vector2f point, org.joml.Vector2f normal, org.joml.Vector2f strike, float strikeLength) Create a successful raycast result with details collision information. -
Method Summary
-
Constructor Details
-
RayCastResult
public RayCastResult()Create a RayCastResult, where the target was not hit. -
RayCastResult
public RayCastResult(org.joml.Vector2f point, org.joml.Vector2f normal, org.joml.Vector2f strike, float strikeLength) Create a successful raycast result with details collision information.- Parameters:
point
- the point, where the raycast hitnormal
- the normal on the face of the object that got hitstrike
- the vector from raycast start to the pointstrikeLength
- the distance from the raycast start to the point
-
-
Method Details
-
getStrikeLength
public float getStrikeLength()- See Also:
-
strikeLength
-
getNormal
public org.joml.Vector2f getNormal()- See Also:
-
normal
-
getPoint
public org.joml.Vector2f getPoint()- See Also:
-
point
-
getStrike
public org.joml.Vector2f getStrike()- See Also:
-
strike
-
didHit
public boolean didHit()- See Also:
-
hit
-