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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Line.Builder
builder()
Creates a builder to buildLine
s.boolean
getMax()
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.int
Getter for the amount of points in this line.Vector3d[]
Getter for a copy of the points array.
(A line is immutable once created)int
hashCode()
-
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 buildLine
s.- Returns:
- a new builder
-