Data Type: Line Set ()
A Line Set data object is able to store independent line segments of variable length. Optionally, for each vertex one or more scalar data items can be stored. Line Set objects inherit the vertex set interface, cf. Section "Vertex Set". In order to visualize the line segments of a Line Set object the module Line Set View can be used. Line Sets sets can be stored using the file format.
Inherits all commands of Vertex Set. In particular, the methods getNumPoints, getPoint, and setPoint are inherited.
setNumPoints <num>
Sets the number of points of the line set. The coordinates of new points need to be initialized afterwards using setPoint. Care must be taken that only existing points are referenced, i.e., that no point index is bigger than n-1.addPoint <x> <y> <z>
Adds a new point to the line set's vertex array. The new point will not yet be referenced by any line segment. The method returns the index of the new point.getNumDataValues
Returns the number of data values per point.setNumDataValues <num>
Sets the number of data values per vertex. New data values need to be initialized afterwards using setData.getNumLines
Returns the number of lines.getLineLength <line>
Returns the number of points of the specified line.getLineVertex <line> <point>
Returns the index of point <point> of line <line>.getData <line> <point> [<set>]
Returns the data value in set <set> of point <point> of line <line>. If <set> is omitted the first data value at that point is returned.setData <line> <point> <value> [<set>]
Sets the data value in set <set> of point <point> of line <line>. If <set> is omitted the first data set is used. Before using this method the number of data sets has to be set using setNumDataValues.addLine <p1> [<p2> [<p3> ...]]
Adds a new line consisting of the points <p1>, <p2>, <p3> ... to the line set. The index of the new line is returned.deleteLine <line>
Deletes the specified line without changing the number of points of the line set.deleteAllLines
Deletes all lines of the line set.removeDuplicatePoints [<tolerance>]
Removes duplicate points in a line set. If tolerance is not specified, only exact matches are considered. Data values are taken from the last occurance of a duplicate vertex.removeLineVertex <line> <point>
Delete point <point> of line <line>. The method does not remove the point from the global vertex array even if the point is not referenced by any other line.addLineVertex <line> <point> [<pos>]
Adds an additional vertex to line <line>. The second argument <point> is the index of the referenced point. <pos> specifies the position of the new vertex within the line. If this argument is omitted the new vertex will be appended after all other vertices of the line.smooth <factor>
Smoothes the lines by replacing the coordinates of each vertex by the weighted average of its neighboring vertices. The bigger <scale> the more are the vertices smoothed.getRange
Returns the min and the max of all data values of the line set.