|
Scene Graph Architecture |
|
This page will offer some minimal documentation on the architecture of the Scene Graph.
Classes and Objects The following tables illustrates how the SceneGraph classes/objects are organized. Some of the classes are classes that a user of the SceneGraph would encounter. Others are more internal classes that one would only encounter when extending the scene graph.
|
| Behaviors | The Behavior classes are behaviors which can be attributed to a node. They are not restricted in what they can do. Some behaviors modify the current node's transformation matrix, allowing rotations, scales, translates, etc. Others modify animation variables using various equations and input variables. |
| Comms | The Communication classes allow the scene graph to receive data from outside applications via Shared Memory, TCP/IP, UDP, and data files. This data is routed to the animation variables automatically, allowing the animations to be driven by external sources. Just as easily an application that uses the Scene Graph can directly modify the animation variables to drive the animation. | Loaders | Loader classes are data loaders which build scene graphs from the data they load. Examples are GEO, AC3D, DEM, and Heightmap loaders. The Geo Loader is the most complete, as it can even load the animation behaviors stored in the file. |
| Makers | Makers are utility classes for making entities. They are similar to loaders in that they generate scene graph nodes, but from logical concepts instead of files. |
| Math | Math classes are simply the math libraries needed to develop. Examples are matrices, vectors, and quaternions. |
| Nodes | Nodes are the foundation of the scene graph and represent everything that can be drawn by the graph. They also represent some of the logic that can be performed by the scene graph. |
| Objects | Objects (I know, nice name choice) are objects used in the Scene Graph system which are not nodes but are more than likely going to be used by the user of the scene graph. Examples including bounding boxes, graphics contexts, viewports, statistics overlays, triangle strip builders, terrain following helper, timers, rays, etc. |
| Renderers | Renderers are the entity that bridges between the scene graph and the actual underlying graphics API. They permit the SceneGraph to be hosted on OpenGL, DirectX, even gaming consoles. Currently, only the OpenGL renderer is provided. |
| Traversals | Traversing the scene graph is done by traversal objects, separate from the the nodes and their structure. A basic draw traversal and a cull-draw traversal are implemented. An intersection traversal is also available. |
Graph Structure
As with most scene graphs, there are a set of node types which can be attached into a graph structure. Nodes are children and siblings of other nodes. Nodes can attach special behavior to rendering their children, including selecting which of their children will be traversed. As this is standard almost every scene graph, I won't go into further detail.