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 aRayAABBHitrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static RayAABBHithit(boolean inside, double tEnter, double tExit) booleanisHit()Returns the value of theisHitrecord component.booleanisInside()Returns the value of theisInsiderecord component.static RayAABBHitmiss()doubletEnter()Returns the value of thetEnterrecord component.doubletExit()Returns the value of thetExitrecord component.final StringtoString()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 aRayAABBHitrecord class.- Parameters:
isHit- the value for theisHitrecord componentisInside- the value for theisInsiderecord componenttEnter- the value for thetEnterrecord componenttExit- the value for thetExitrecord 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 theisHitrecord component.- Returns:
- the value of the
isHitrecord component
-
isInside
public boolean isInside()Returns the value of theisInsiderecord component.- Returns:
- the value of the
isInsiderecord component
-
tEnter
public double tEnter()Returns the value of thetEnterrecord component.- Returns:
- the value of the
tEnterrecord component
-
tExit
public double tExit()Returns the value of thetExitrecord component.- Returns:
- the value of the
tExitrecord component
-