-
- All Implemented Interfaces:
public final class RayInformation
Ray information class to store relevant data about rays and any intersection found.
-
-
Field Summary
Fields Modifier and Type Field Description private final TranslatableBody
b
private final Vec2
coordinates
private final Integer
index
-
Constructor Summary
Constructors Constructor Description RayInformation(TranslatableBody b, Double x, Double y, Integer index)
Constructor to store information about a ray intersection. RayInformation(TranslatableBody b, Vec2 v, Integer index)
Convenience constructor equivalent to .
-
Method Summary
Modifier and Type Method Description final TranslatableBody
getB()
Getter for body variable. final Vec2
getCoordinates()
Getter for coords variable. final Integer
getIndex()
Getter for index variable. -
-
Constructor Detail
-
RayInformation
RayInformation(TranslatableBody b, Double x, Double y, Integer index)
Constructor to store information about a ray intersection.- Parameters:
b
- Body involved with ray intersection.x
- x position of intersection.y
- y position of intersection.index
- Index of shapes side that intersection intersects.
-
RayInformation
RayInformation(TranslatableBody b, Vec2 v, Integer index)
Convenience constructor equivalent to .- Parameters:
b
- Body involved with ray intersection.v
- x/y position of intersection.index
- Index of shapes side that intersection intersects.
-
-
Method Detail
-
getB
final TranslatableBody getB()
Getter for body variable.
-
getCoordinates
final Vec2 getCoordinates()
Getter for coords variable.
-
-
-
-