Package de.bluecolored.bluemap.api.math
Class Line
java.lang.Object
de.bluecolored.bluemap.api.math.Line
A line consisting of 2 or more
Vector3d-points.-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Line.Builderbuilder()Creates a builder to buildLines.booleangetMax()Calculates and returns the maximum corner of the axis-aligned-bounding-box of this line.getMin()Calculates and returns the minimum corner of the axis-aligned-bounding-box of this line.getPoint(int i) Getter for the point at the given index.intGetter for the amount of points in this line.Vector3d[]Getter for a copy of the points array.
(A line is immutable once created)inthashCode()
-
Constructor Details
-
Line
-
Line
-
-
Method Details
-
getPointCount
public int getPointCount()Getter for the amount of points in this line.- Returns:
- the amount of points
-
getPoint
Getter for the point at the given index.- Parameters:
i- the index- Returns:
- the point at the given index
-
getPoints
Getter for a copy of the points array.
(A line is immutable once created)- Returns:
- the points of this line
-
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
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
-
hashCode
public int hashCode() -
builder
Creates a builder to buildLines.- Returns:
- a new builder
-