Chapters 3 through 7 illustrated how different nodes implement the SoGLRenderAction( C++ | Java | .NET ). This action draws the objects represented by a scene graph. Here is how various nodes implement the SoGLRenderAction( C++ | Java | .NET ):
If the node is a group node, it visits each of its children in a specified order. If it is an SoSeparator( C++ | Java | .NET ) node, it saves the traversal state before traversing its children and restores it after traversing its children.
If the node is a property node, it often replaces a value in the corresponding element of the traversal state (other property nodes, such as SoTransform( C++ | Java | .NET ), may have different behaviors). For example:
SoMaterial( C++ | Java | .NET ) replaces the values for the current material.
SoLightModel( C++ | Java | .NET ) replaces the values for the current lighting model.
SoDrawStyle( C++ | Java | .NET ) replaces the values for the current drawing style.
SoCoordinate3( C++ | Java | .NET ) replaces the values for the current coordinates.
If the node is derived from SoTransformation( C++ | Java | .NET ), it modifies the current transformation matrix. Each new set of values is preconcatenated onto the existing transformation matrix.
If the node is a shape node, it causes its shape to be drawn, using the current elements in the traversal state. Figure 8.2, “ Shared Instances of a Shape Node ” shows an indexed face set instanced in two different groups. When rendered as part of group1, it uses the current elements of the traversal state, causing a red wireframe face set to be drawn. Because subsequent nodes in group2 modify the current material, drawing style, and transformation matrix, the next instance of the indexed face set, later in the graph, appears green and filled. It is also twice as big as the red face set and translated to a new location.