Package toxi.geom
Class LineStrip3D
java.lang.Object
toxi.geom.LineStrip3D
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionadd
(float x, float y, float z) add
(ReadonlyVec3D p) get
(int i) Returns the vertex at the given index.getDecimatedVertices
(float step) Computes a list of points along the spline which are uniformly separated by the given step distance.getDecimatedVertices
(float step, boolean doAddFinalVertex) Computes a list of points along the spline which are close to uniformly separated by the given step distance.float
iterator()
void
setVertices
(List<Vec3D> vertices) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
LineStrip3D
public LineStrip3D() -
LineStrip3D
-
-
Method Details
-
add
-
add
-
add
-
get
Returns the vertex at the given index. This function follows Python convention, in that if the index is negative, it is considered relative to the list end. Therefore the vertex at index -1 is the last vertex in the list.- Parameters:
i
- index- Returns:
- vertex
-
getDecimatedVertices
Computes a list of points along the spline which are uniformly separated by the given step distance.- Parameters:
step
-- Returns:
- point list
-
getDecimatedVertices
Computes a list of points along the spline which are close to uniformly separated by the given step distance. The uniform distribution is only an approximation and is based on the estimated arc length of the polyline. The distance between returned points might vary in places, especially if there're sharp angles between line segments.- Parameters:
step
-doAddFinalVertex
- true, if the last vertex computed should be added regardless of its distance.- Returns:
- point list
-
getEstimatedArcLength
public float getEstimatedArcLength() -
getSegments
-
getVertices
- Returns:
- the vertices
-
iterator
-
setVertices
- Parameters:
vertices
- the vertices to set
-