Table of Contents
This document explains how to plug new geometric objects into Realsoft 3D.
You can find the source code for this plugin in samples/plugins/geometrics/sphere
folder.
The plugin implements the following classes:
sphtool.c - A tool button class for activating interactive sphere creation tool
sphia.c - Sphere interactor class. This class implements the interactive creation tool. The actual tool button creates this object for managing user inputs. The reads user input (mouse input, for example) and allows to user to define the center and radius attributes using the mouse or some other interactive input device.
sphwire.c - Wire frame rendering class. This class is responsible for rendering the sphere into the view window, by using Real Time rendering engine.
sphctrl.c - Sphere specific controls for the context sensitive control bar. This object is created and showin in the control bar, when the user selects a sphere.
sphnum.c - Numeric interace for the sphere interactor class. This object is shown in the numeric bar when the sphere interactor is active. The controls show the current center and the radius of the sphere being created.
sphgadg.c - Property gadget for the Property Window. This gadget is shown in the property window's Spec tab when the user selects a sphere.
In addition to these, one may also have to create a new rendering primitive for the photo realistic renderer. In most cases one can use the existing rendering primitives and this is not needed. This tutorial doesn't implement new rendering class because the existing rendering primitives are very capable to represent a sphere.