Record Class RaycastHit
java.lang.Object
java.lang.Record
de.gurkenlabs.litiengine.physics.RaycastHit
- Record Components:
point- the point of impactentity- the entity hit by the raycastdistance- the distance to the point of impact
Represents the result of a raycast in the physics engine. A RaycastHit contains the point of impact, the entity hit, and the distance to the impact
point.
-
Constructor Summary
ConstructorsConstructorDescriptionRaycastHit(Point2D point, ICollisionEntity entity, double distance) Creates an instance of aRaycastHitrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubledistance()Returns the value of thedistancerecord component.entity()Returns the value of theentityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.point()Returns the value of thepointrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
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 thecomparemethod from their corresponding wrapper classes. -
point
-
entity
-
distance
-