public class Polyline
extends java.lang.Object
| Modifier and Type | Field and Description | 
|---|---|
| int | idx | 
| int | myWorldCoordCnt | 
| Constructor and Description | 
|---|
| Polyline(int idx)Creates an empty polyline with a specified index value. | 
| Polyline(Polyline p)Creates a duplicate copy of a polyline | 
| Modifier and Type | Method and Description | 
|---|---|
| double | computeLength()Computes the length of this line. | 
| int | getIndex()Returns the index value for this polyline. | 
| LineSegment[] | getSegments()Creates a list of line segments | 
| Vertex3d | getVertex(int idx) | 
| int[] | getVertexIndices() | 
| Vertex3d[] | getVertices()Do not replace individual vertices in this array | 
| Point3d | interpolatePosition(double s)Interpolate point along polyline | 
| Vector3d | interpolateTangent(double s)Interpolate tangent vector to polyline at specified point | 
| static void | main(java.lang.String[] args) | 
| int | numVertices() | 
| void | set(Vertex3d[] vtxs,
   int numVtxs)Creates a line a list of vertices. | 
| void | updateBounds(Point3d min,
            Point3d max) | 
| double | updateLengths()Computes the length of this line and per-segment length info. | 
public Polyline(int idx)
idx - desired index valuepublic Polyline(Polyline p)
public int getIndex()
public int[] getVertexIndices()
public void set(Vertex3d[] vtxs, int numVtxs)
vtxs - vertices to form the linenumVtxs - number of verticespublic double computeLength()
public double updateLengths()
public Point3d interpolatePosition(double s)
s - - normalized curve parameter in range [0-1]public Vector3d interpolateTangent(double s)
s - - normalized curve parameter in range [0-1]public int numVertices()
public Vertex3d[] getVertices()
public Vertex3d getVertex(int idx)
public LineSegment[] getSegments()
public static void main(java.lang.String[] args)