User guide
59
void registerPlugins()
{
REGISTER_PLUGIN(CubeMaker, "CubeMaker", 0, 1);
}
DEFINE_SGG_PLUGIN(class)
Declares a data structure of Katana's plug-in system (FnPlugin) that contains information about the scene graph
generator plug-in, for example, its name and API version.
The class to pass to the macro is the class derived from ScenegraphGenerator, which must contain the static create
() and getArgumentTemplate() functions. For more information refer to Static Methods for more information.
void registerPlugins()
Is called by Katana's plug-in system to identify the plug-ins contained in a shared object file (compiled extension).
Should contain calls of the REGISTER_PLUGIN() macro (see below).
REGISTER_PLUGIN(class, className, majorVersion, minorVersion)
Registers a plug-in with the given class, name, and version information.
The major version and minor version are the version of the SGG plug-in defined in a shared object file.
Fills the plug-in's describing data structure of type FnPlugin with values and calls the internal registerPlugin()
function to add the appropriate plug-ins to the global list of plug-ins known to Katana.
ScenegraphContext
The abstract ScenegraphContext class is the base class responsible for providing Katana the information needed to
generate a scene graph location along with its attributes. Each custom scene graph context implemented in an SGG
plug-in must extend this class.
Typically, at least two types of context are required:
• The first type is used for the root location, which replaces the location of type scenegraph generator in the scene
graph when the SGG plug-in is run. This is also known as the root context.
• The second type of context is used for child and sibling locations that create the desired groups, polygonal
geometry, or similar. This is sometimes called a leaf context.
8 SCENE GRAPH GENERATOR PLUG-INS | SGG PLUG-IN API CLASSES