Features shown:
without tubes (bresenham)
1. normal
2. with stippling (JOGL backend only)
with tubes
edges: list of line segments
3. color from appearance, opaque
4. color from appearance, transparency enabled
5. color from vertices of line set
6. with relative radii allowing varying thickness
edges: a single long "edge"
7. color from vertices of line set
8. with relative radii, and a custom "cross section" curve
Notes:
1. Textures cannot be applied to these tubes.
See
BallAndStickFactory
for a class which allows this.
2. Width of lines (Examples 1 and 2) and tubes (the rest) are set independently
since linewidth is specified in pixels, and tube radius in object coordinates.
3. Note that the indexed line sets demonstrate different ways to specify the edges
of the line set:
a. as many line segments, or
b. as a single long curve
See the method
IndexedLineSetFactory#setEdgeIndices()
.
The resulting tubes will appear differently.
4. Colors specified in the shader are ALWAYS RGB values; alpha (transparency) values
must be set using the separate "transparency" attribute.
5. This example has been tested on the JOGL backend; other backends may not yield the
same behavior, particularly where rendering hints are involved.