< Zurück | Inhalt | Weiter >

9.4 LineAttributes

java.lang.Object

|

+−−javax.media.j3d.SceneGraphObject

|

+−−javax.media.j3d.NodeComponent

|

+−−javax.media.j3d.LineAttributes


Table 9.2 Capability bits for the LineAttributes class


ANTIALIASING

PATTERN

WIDTH

OpenGL Reference: glLineStipple, glLineWidth

The LineAttributes class controls the style of lines used to draw the edges of surfaces. See table 9.2. The available styles are:

Antialiasing: on or off

Pattern: dash, dash dot, dot, or solid

Line width: In pixels


To see the effect of the LineAttributes class, the Appearance must be set to render in LINE (wire frame) mode:


Appearance app = new Appearance();

PolygonAttributes polyAttribs = new PolygonAttributes( PolygonAttributes.POLYGON_LINE, PolygonA app.setPolygonAttributes(polyAttribs );


See section 9.7.1 for more detail on PolygonAttributes. Figures 9.3–9.6 show examples rendered using various LineAttribute styles.


image


Figure 9.3 Rendering in LINE mode with a null LineAttributes


image


Figure 9.4 Rendering with a LineAttributes of width 10 without antialiasing

image


Figure 9.5 Rendering with a LineAttributes of width 10 with antialiasing


image


Figure 9.6 Rendering with a LineAttributes of width 2 with a Dash Dot pattern


The lines rendered in LINE mode are effected by color, lighting, and texture applied to surfaces.