Class EntityHit
java.lang.Object
org.spongepowered.api.world.volume.EntityHit
The result of an intersection between a ray and an entity.
-
Constructor Details
-
EntityHit
Creates a new entity hit from the entity, the intersection point and the normal.- Parameters:
entity
- The intersected entityintersection
- The intersection pointnormal
- The intersection normaldistance
- The distance from the start to the intersection
-
-
Method Details
-
entity
Gets the intersected entity.- Returns:
- The intersected entity
-
intersection
Gets the intersection point.- Returns:
- The point of intersection
-
normal
Gets the intersection normal.- Returns:
- The normal of intersection
-
distance
public double distance()Gets the distance from the start to the intersection.- Returns:
- The distance from the start to the intersection
-
equals
-
hashCode
public int hashCode() -
toString
-