6.35
IndexedLineSet
The IndexedLineSet node represents a 3D geometry formed by constructing
polylines from 3D vertices specified in the coord field. IndexedLineSet
uses the indices in its coordIndex field to specify the polylines
by connecting vertices from the coord field. An index of "-1"
indicates that the current polyline has ended and the next one begins. The
last polyline may be (but does not have to be) followed by a "-1".
IndexedLineSet is specified in the local coordinate system and is affected
by the transformations of its ancestors.
The coord field specifies the 3D vertices of the line set and
contains a Coordinate node.
Lines are not lit, are not texture-mapped, and do not participate in
collision detection. The width of lines is implementation dependent and
each line segment is solid (i.e., not dashed).
If the color field is not NULL, it shall contain a Color node.
The colours are applied to the line(s) as follows:
- If colorPerVertex is FALSE:
- If the colorIndex field is not empty, one colour is used
for each polyline of the IndexedLineSet. There shall be at least as many
indices in the colorIndex field as there are polylines in the IndexedLineSet.
If the greatest index in the colorIndex field is N, there shall
be N+1 colours in the Color node. The colorIndex field shall not
contain any negative entries.
- If the colorIndex field is empty, the colours from the
Color node are applied to each polyline of the IndexedLineSet in order.
There shall be at least as many colours in the Color node as there are
polylines.
- If colorPerVertex is TRUE:
- If the colorIndex field is not empty, colours are applied
to each vertex of the IndexedLineSet in exactly the same manner that the
coordIndex field is used to supply coordinates for each vertex from
the Coordinate or GeoCoordinate node. The colorIndex field shall contain at least
as many indices as the coordIndex field and shall contain end-of-polyline
markers (-1) in exactly the same places as the coordIndex field.
If the greatest index in the colorIndex field is N, there shall
be N+1 colours in the Color node.
- If the colorIndex field is empty, the coordIndex
field is used to choose colours from the Color node. If the greatest index
in the coordIndex field is N, there shall be N+1 colours in
the Color node.
If the color field is NULL and there is a Material defined for
the Appearance affecting this IndexedLineSet, the emissiveColor of
the Material shall be used to draw the lines. Details on lighting equations
as they affect IndexedLineSet nodes are described in 4.14,
Lighting model.