The following constructor creates an instance of an SoShapeKit( C++ | Java | .NET ):
SoShapeKit *myShapeKit = new SoShapeKit();
SoShapeKit myShapeKit = new SoShapeKit();
SoShapeKit myShapeKit = new SoShapeKit();
When an instance of a node kit is created, certain nodes are created by default. In the kits provided, the SoShapeKit( C++ | Java | .NET ), SoLightKit( C++ | Java | .NET ), and SoCameraKit( C++ | Java | .NET ) create the parts “shape,” “light,” and “camera,” respectively. The default types for these parts are SoCube( C++ | Java | .NET ), SoDirectionalLight( C++ | Java | .NET ), and SoPerspectiveCamera( C++ | Java | .NET ).
When the shape kit is constructed, it automatically creates the cube node as well as the top separator and shape separator nodes for the group. (Internal nodes, such as the separator node, are automatically created when you add a node lower in the node kit structure.) At this point, the scene graph would look like Figure 16.6, “ Creating an Instance of SoShapeKit ”. The shape kit now consists of four nodes: theSoShapeKit( C++ | Java | .NET ) node itself, the top separator node, the shape separator (used for caching even when the transform or material is changing) and the cube node. The other nodes in the shape-kit catalog are not created until you explicitly request them, as described below.