Record Class RayAABBHit
java.lang.Object
java.lang.Record
com.marginallyclever.convenience.helpers.RayAABBHit
public record RayAABBHit(boolean isHit, boolean isInside, double tEnter, double tExit)
extends Record
RayAABBHit
represents the result of a ray intersecting with an Axis-Aligned Bounding Box (AABB).-
Constructor Summary
ConstructorsConstructorDescriptionRayAABBHit
(boolean isHit, boolean isInside, double tEnter, double tExit) Creates an instance of aRayAABBHit
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static RayAABBHit
hit
(boolean inside, double tEnter, double tExit) boolean
isHit()
Returns the value of theisHit
record component.boolean
isInside()
Returns the value of theisInside
record component.static RayAABBHit
miss()
double
tEnter()
Returns the value of thetEnter
record component.double
tExit()
Returns the value of thetExit
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
RayAABBHit
public RayAABBHit(boolean isHit, boolean isInside, double tEnter, double tExit) Creates an instance of aRayAABBHit
record class.- Parameters:
isHit
- the value for theisHit
record componentisInside
- the value for theisInside
record componenttEnter
- the value for thetEnter
record componenttExit
- the value for thetExit
record component
-
-
Method Details
-
miss
-
hit
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='. -
isHit
public boolean isHit()Returns the value of theisHit
record component.- Returns:
- the value of the
isHit
record component
-
isInside
public boolean isInside()Returns the value of theisInside
record component.- Returns:
- the value of the
isInside
record component
-
tEnter
public double tEnter()Returns the value of thetEnter
record component.- Returns:
- the value of the
tEnter
record component
-
tExit
public double tExit()Returns the value of thetExit
record component.- Returns:
- the value of the
tExit
record component
-