Record Class RayHit
java.lang.Object
java.lang.Record
com.marginallyclever.robotoverlord.RayHit
@Deprecated
public record RayHit(com.marginallyclever.robotoverlord.components.ShapeComponent target, double distance, javax.vecmath.Vector3d normal)
extends Record
Deprecated.
A ray hit is a record of a ray hitting a
ShapeComponent
at a certain distance.-
Constructor Summary
ConstructorDescriptionRayHit
(com.marginallyclever.robotoverlord.components.ShapeComponent target, double distance, javax.vecmath.Vector3d normal) Deprecated.Creates an instance of aRayHit
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
distance()
Deprecated.Returns the value of thedistance
record component.final boolean
Deprecated.Indicates whether some other object is "equal to" this one.final int
hashCode()
Deprecated.Returns a hash code value for this object.javax.vecmath.Vector3d
normal()
Deprecated.Returns the value of thenormal
record component.com.marginallyclever.robotoverlord.components.ShapeComponent
target()
Deprecated.Returns the value of thetarget
record component.final String
toString()
Deprecated.Returns a string representation of this record class.
-
Constructor Details
-
RayHit
public RayHit(com.marginallyclever.robotoverlord.components.ShapeComponent target, double distance, javax.vecmath.Vector3d normal) Deprecated.Creates an instance of aRayHit
record class.- Parameters:
target
- the value for thetarget
record componentdistance
- the value for thedistance
record componentnormal
- the value for thenormal
record component
-
-
Method Details
-
toString
Deprecated.Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Deprecated.Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Deprecated.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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
target
public com.marginallyclever.robotoverlord.components.ShapeComponent target()Deprecated.Returns the value of thetarget
record component.- Returns:
- the value of the
target
record component
-
distance
public double distance()Deprecated.Returns the value of thedistance
record component.- Returns:
- the value of the
distance
record component
-
normal
public javax.vecmath.Vector3d normal()Deprecated.Returns the value of thenormal
record component.- Returns:
- the value of the
normal
record component
-