Open Inventor Release 2024.2.0
 
Loading...
Searching...
No Matches
Creating an Abstract Node Class

Creating an abstract node class is slightly different from creating a nonabstract one. Examples of abstract node classes are SoCamera, SoLight, and SoShape.

First, abstract classes should use the ABSTRACT versions of the macros described in SoSubNode.h. For example, the SoLight class makes this call in its initClass() method:

SO_NODE_INIT_ABSTRACT_CLASS( SoLight, "Light", SoNode );

Second, the constructor for an abstract class should be protected, meaning that it is impossible to create an instance of it.