Package de.bluecolored.bluemap.api.math
Class Line.Builder
java.lang.Object
de.bluecolored.bluemap.api.math.Line.Builder
- Enclosing class:
- Line
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdds a point to the end of line.Adds multiple points to the end of line.addPoints
(Collection<Vector3d> points) Adds multiple points to the end of line.build()
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
addPoint
Adds a point to the end of line.- Parameters:
point
- the point to be added.- Returns:
- this builder for chaining
-
addPoints
Adds multiple points to the end of line.- Parameters:
points
- the points to be added.- Returns:
- this builder for chaining
-
addPoints
Adds multiple points to the end of line.- Parameters:
points
- the points to be added.- Returns:
- this builder for chaining
-
build
Builds a newLine
with the points set in this builder.
There need to be at least 2 points to build aLine
.- Returns:
- the new
Line
- Throws:
IllegalStateException
- if there are less than 2 points added to this builder
-