Chapter 7. Creating a Node Kit

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.

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:

  • SoAppearanceKit SoAppearanceKit SoAppearanceKit , a node kit in the Inventor library, which is a simple grouping of properties

  • PyramidKit, a node kit that uses an existing node-kit class and changes one of its parts

  • JumpingJackKit, a node kit that adds new parts to the parent class, including a built-in event callback that moves the parts when the user selects the object with the mouse