-
- All Implemented Interfaces:
public final class RayInformationRay information class to store relevant data about rays and any intersection found.
-
-
Field Summary
Fields Modifier and Type Field Description private final TranslatableBodybprivate final Vec2coordinatesprivate final Integerindex
-
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 TranslatableBodygetB()Getter for body variable. final Vec2getCoordinates()Getter for coords variable. final IntegergetIndex()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.
-
-
-
-