Although Inventor provides predefined highlight styles, at times you may want to highlight selected objects with a different style. You can provide your own highlight style in two ways: derive a new highlight class from
SoGLRenderAction (described here), or make changes directly to the scene graph whenever the selection changes (using SoSelection callbacks, as described in Handling Events and Selection). If you're using manipulators, it's probably easiest to allow the manipulator to make changes to the scene graph through use of selection callbacks. In this case, the manipulator shows which objects are selected.
Creating a new highlight style by deriving a class from SoGLRenderAction is basically the same as deriving any new action class, as described in Creating an Action. You can use the action-class macros found in SoSubAction.h. The SO_ACTION_HEADER() macro declares type identifier and naming variables and methods that all node classes must support. The SO_ACTION_SOURCE() macro defines the static variables and methods declared in the SO_ACTION_HEADER() macro.
Creating a new highlight action class requires these steps:
Implement other methods, if desired, to specify the appearance of the highlight. These optional methods include
setColor(), setLinePattern(), and setLineWidth().