[Up] [Previous] [Next]

2. Scene Graphs

The purpose of an Open Inventor file or program is to describe what is referred to as a scene graph. You can think of a scene graph as a diagram that has a bunch of lines connecting a bunch of points. The points are the objects and transformations (called nodes in Open Inventor) that interest you, like a cube, or a cone, or the ability to rotate something around the X axis by 45 degrees. The lines are an indication of the relationship between the points. For example, collections of simple objects can be grouped together to form a more complex object, in which case the node for the complex object would be referred to as the parent node and the simple objects would be referred to as child nodes. Once you have a scene graph, you can use a type of program that is referred to as a viewer to render the scene so that you can see what it looks like.

2.1 Nodes and Fields

Open Inventor has many different kinds of nodes that you can put into a scene graph. One kind of node is used to describe cones, another kind of node is used to describe the surface appearance of objects, etc. Each of these kinds of node is referred to as a class. All the nodes in a particular class have the same kinds of properties, like height, or width, or location.

Since you can have more than one instance of any particular class of node, each with different characteristics, how does Open Inventor know if, for example, you want one cone to be tall and another cone to be short? It keeps track of this information with fields. In the case of the two cones you would set the height field differently for each cone. Different classes of nodes have different collections of fields for you to use. Learning how to use a node class involves learning what the fields are, what values they can have, and what effect different field values will have on your scene when you view it.

2.2 Field Connections

It is possible to connect two or more fields so that they share the same value. If the field value for the source (their can only be one source) of the connection changes, Open Inventor automatically updates the value for the field on the destination end of the connection. One important use of field connections is in animation. Since the values of the fields in the nodes help determine what a scene looks like, if you use connections that will make field values change over time, your scene will change appearance over time.

2.3 Coordinates

When building a scene you often need to describe how big an object is and where it is located:

More Information

For more information about scene graphs and how Open Inventor works you should browse through chapter 3 of Inventor Mentor. You can skip over sections that discuss how various notions are used with C++ programs.


MIT home page HTML written and maintained by Reid M. Pinchback (reidmp@mit.edu)
Last modified 96/06/10; copyright © 1996 MIT