Interface Line3d

All Known Subinterfaces:
MLine3d

public interface Line3d
Read-only interface for handling lines in 3-dimensional space.
Since:
9.10.2
  • Method Details

    • create

      static Line3d create​(Vector3d firstPoint, Vector3d secondPoint)
      Creates a new instance.
      Parameters:
      firstPoint - the first point
      secondPoint - the second point
      Returns:
      a Line3d instance
      Since:
      9.10.2
    • getFirstPoint

      Vector3d getFirstPoint()
      Returns the first bootstrapping point of this line.
      Returns:
      the first bootstrapping point of this line
      Since:
      9.10.2
    • getSecondPoint

      Vector3d getSecondPoint()
      Returns the second bootstrapping point of this line.
      Returns:
      the second bootstrapping point of this line
      Since:
      9.10.2
    • getDirection

      Vector3d getDirection()
      Returns the normalized direction vector of this line.
      Returns:
      the normalized direction vector of this line
      Since:
      9.10.2
    • getIntersectionPoint

      Optional<MVector3d> getIntersectionPoint​(Plane plane)
      Returns the point of intersection between this line and the given plane. If the line does not intersect the plane, then returns empty.
      Parameters:
      plane - the plane with which the intersection is returned
      Returns:
      the point of intersection between this line and the given plane
      Since:
      9.10.2
    • distanceSqr

      double distanceSqr​(MVector3d point)
      Calculates the squared distance of a point from this line.
      Parameters:
      point - the point
      Returns:
      the squared distance of a point from this line
      Since:
      9.10.2
    • distance

      double distance​(MVector3d point)
      Calculates the distance of a point from this line.
      Parameters:
      point - the point
      Returns:
      the distance of a point from this line
      Since:
      9.10.2
    • intersects

      boolean intersects​(AABB3d aabb)
      Returns true if the line intersects the axis-aligned bounding box, false otherwise.
      Parameters:
      aabb - the axis-aligned bounding box with which this is checked for intersection
      Returns:
      if the line intersects the axis-aligned bounding box, false otherwise
      Since:
      9.10.2