Chapter 7. Creating a Node Kit

Table of Contents

This chapter describes how to create a node-kit class. The examples show how to create a new subclass and how to customize the node-kit catalog. Creating a node kit is essentially the same as creating a node, except you use special node-kit macros found in SoSubKit.h. In addition, you use special macros for defining the node-kit catalog.

NodeKit and custom nodes described in Chapter 2, Creating a Node may represent the same thing, but they are conceptually different. A NodeKit is use to represent a structured group of nodes. It really represents a SceneGraph by itself. A custom node is used to represent a stand-alone node, which is internally implemented using other nodes. NodeKit are also more high level but have some drawback. For examples, the structure of their internal scenegraph cannot be changed on the fly.

Before reading this chapter, be sure to read Chapter 16, Node Kits , as well as Chapter 2 in this book.

The first part of this chapter offers an overview of the steps required to create a new node kit. When necessary, additional sections explain key concepts in further detail and list the relevant macros. The chapter examples show how to create three node-kit classes: