Class Line

java.lang.Object
de.bluecolored.bluemap.api.math.Line

public class Line extends Object
A line consisting of 2 or more Vector3d-points.
  • Constructor Details

  • Method Details

    • getPointCount

      public int getPointCount()
      Getter for the amount of points in this line.
      Returns:
      the amount of points
    • getPoint

      public Vector3d getPoint(int i)
      Getter for the point at the given index.
      Parameters:
      i - the index
      Returns:
      the point at the given index
    • getPoints

      public Vector3d[] getPoints()
      Getter for a copy of the points array.
      (A line is immutable once created)
      Returns:
      the points of this line
    • getMin

      public Vector3d getMin()
      Calculates and returns the minimum corner of the axis-aligned-bounding-box of this line.
      Returns:
      the min of the AABB of this line
    • getMax

      public Vector3d getMax()
      Calculates and returns the maximum corner of the axis-aligned-bounding-box of this line.
      Returns:
      the max of the AABB of this line
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • builder

      public static Line.Builder builder()
      Creates a builder to build Lines.
      Returns:
      a new builder