Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Parts Created by Default

The following constructor creates an instance of an SoShapeKit :

C++ :

SoShapeKit* myShapeKit = new SoShapeKit();

C# :

SoShapeKit myShapeKit = new SoShapeKit();

Java :

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, SoLightKit, and SoCameraKit create the parts “shape,” “light,” and “camera,” respectively. The default types for these parts are SoCube, SoDirectionalLight, and SoPerspectiveCamera.

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 Creating an Instance of SoShapeKit . The shape kit now consists of four nodes: the SoShapeKit 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.

Creating an Instance of SoShapeKit