|
Traversals |
|
Traversals are the heart of getting interesting things done in the Scene Graph. The Traversal mechanism is
a generic mechanism which is then specialized for specific tasks. Traversals are used to cull and render the
scene. Intersection traversals also are provided and are used by the "Terrain Follow" object.
|
|
Renderers |
|
The rendering engine is encapsulated, permitting any engine to be added provided it supports the
necessary basic rendering capabilities. The current engine is based on OpenGL, and a Direct3D version
will most likely be added at some point.
The OpenGL renderer has been optimized to handle various permutations of attributes specified on a GeoSet, without wasting precious cycles.
|
|
Behaviors |
|
The Scene Graph supports the concept of "Behaviors." These are animation behaviors that can be attached to
each node. The animation behaviors can alter the rendering of the given node and its sub-children. Examples
include the simple display behavior of rotating object, or the more advanced concept of altering an animation
variable that subsequent animation behaviors will use. Many mathematical expression behaviors are available to
allow computing new values.
|
|
Communications |
|
As described in the Behaviors section, the Scene Graph supports the concept of animation variables which can
be used to drive animations and compute additional animation variable values. The source of these variables
can be built-in variables, such as frame number, elapsed time, etc or external communications mechanisms.
The Scene Graph has built-in support for the following communications mechanisms:
|
|
Loaders |
|
A Scene Graph requires data. Though the Scene can be generated using the programmatic APIs, the truly interesting
scenes come when it can load existing model formats. Loaders for the Scene Graph are independent entities that
can be added when necessary. They use the exposed programmatic APIs of the main Scene Graph libraries to achieve their
loading.
I add importers as necessary to get data for some of the features of the scene graph. Currently, it supports GEO, AC3D, PLY, DEM, and Heightmaps. GEO is the main format because it is Open, supports real-time model designs, supports animation behaviors, and GEO can import from a few other key formats (OpenFLT and 3DStudio.)
|
|
Makers |
|
Makers are convenience classes. They know how to build specific types of
geometry for the developer. They build the geometry out of the supported GeoSets. Examples are an ellipsoid maker, which
will build ellipsoids using triangle strip GeoSets. Strategy objects are supplied to the makers to allow the user to
control facets of the making process such as texture coordinate generation. Some future makers will include ones for
making aircraft instruments (attitude indicates, compasses, HUDs, etc.) You can see my vis sim background showing through.
Typically, the Makers would be replaced by modeling packages, but are a convenience at this time.
|
|
Support Objects |
|
There are a number of supporting objects in the Scene Graph libraries. They range from Math objects, intersection
objects, optimization objects, to display helper objects.
The 3D math library currently supports vectors, matrices and quaternions. Additional 3D object support is included for bounding boxes, bounding spheres, cameras, rays, viewports, materials, textures, delauney triangulations, triangle strip builders, terrain following, stats overlays, and depth complexity display.
|