Record Class Hit
java.lang.Object
java.lang.Record
com.marginallyclever.ro3.raypicking.Hit
- Record Components:
target- the MeshInstance that theRayintersected.distance- the distance from theRayorigin to the point of contact.normal- the normal of theMeshat the point of contact, in world space.point- the point of contact in world space.triangle- the triangle at the point of contact.
public record Hit(MeshInstance target, double distance, javax.vecmath.Vector3d normal, javax.vecmath.Point3d point, PathTriangle triangle)
extends Record
A ray hit is a record of a ray hitting a
MeshInstance at a certain distance.-
Constructor Summary
ConstructorsConstructorDescriptionHit(MeshInstance target, double distance, javax.vecmath.Vector3d normal, javax.vecmath.Point3d point, PathTriangle triangle) Creates an instance of aHitrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance()Returns the value of thedistancerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.javax.vecmath.Vector3dnormal()Returns the value of thenormalrecord component.javax.vecmath.Point3dpoint()Returns the value of thepointrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.triangle()Returns the value of thetrianglerecord component.
-
Constructor Details
-
Hit
public Hit(MeshInstance target, double distance, javax.vecmath.Vector3d normal, javax.vecmath.Point3d point, PathTriangle triangle) Creates an instance of aHitrecord class.
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
target
-
distance
-
normal
-
point
-
triangle
-