Each node-kit class shown in Figure 16.2, “ Node-Kit Classes ” has an associated catalog. The catalog lists all the parts (nodes) available in this kit, in the same way as an electronics or software catalog lists all the items available for sale. Just as you order items selectively from a software catalog, you can choose nodes selectively from a node-kit catalog. In addition to simply listing the available parts, a node-kit catalog also describes how the nodes are arranged into a subgraph when you select them.
For example, the catalog for an SoShapeKit SoShapeKit SoShapeKit is shown in Figure 16.3, “ Catalog for SoShapeKit ”.
When you first create an SoShapeKit SoShapeKit SoShapeKit , you get the “base model,” shown in Figure 16.4, “ Basic Version of an SoShapeKit ”. By default, the “shape” part is a cube. You can change this shape and also add options as you need them.
A node-kit catalog contains a separate entry to describe each part. The SoShapeKit SoShapeKit SoShapeKit catalog shown in Figure 16.3, “ Catalog for SoShapeKit ” has 24 entries. Each catalog entry contains the following pieces of information:
Name of the part
Type of node
Default type (used if Type is an abstract class)
Whether this part is created by default
Name of this part's parent
Name of the right sibling of this part
Whether this part is a list
If the part is a list, the type of group node that is used to contain the list items
If the part is a list, the permissible node types for entries in this list
Whether this part is public
The following list shows several sample catalog entries from SoShapeKit SoShapeKit SoShapeKit .
Information |
Sample Entry 1 |
Sample Entry 2 |
---|---|---|
Name |
“callbackList” |
“transform” |
Type |
SoNodeKitListPart |
SoTransform |
Default Type |
(Not Applicable) |
(Not Applicable) |
Created by Default? |
FALSE |
FALSE |
Parent Name |
“this” |
“topSeparator” |
Right Sibling |
“topSeparator” |
“texture2Transform” |
Is It a List? |
TRUE |
FALSE |
List Container Type |
SoSeparator |
(Not Applicable) |
List Element Type |
SoCallback |
(Not Applicable) |
|
SoEventCallback |
|
Is It Public? |
TRUE |
TRUE |
An SoShapeKit SoShapeKit SoShapeKit contains another node kit, “appearance,” which is an SoAppearanceKit SoAppearanceKit SoAppearanceKit . The catalog for SoAppearanceKit SoAppearanceKit SoAppearanceKit is shown in Figure 16.5, “ Catalog for SoAppearanceKit ”.