SCENE GRAPH

Scene Graphs



Nodes

Nodes are divided into three basic categories

Fields

Nodes may contain data elements within fields. Each field within a node is also a class, rather than a basic data type; for example, if a node needed to contain a single floating point value, it would have an SoSFFloat field data member rather than just a float, as in a C data structure.

There are two main reasons for doing this:


Basic Data Types and Naming Conventions

Upon first inspection, the names of Inventor classes seem strange: they all have either an "So" or "Sb" prefix. The difference between them is important. "So" stands for scene object, and data types with this prefix are usually related to the scene graph; for example, all nodes have an "So" prefix. "Sb" stands for scene basic, and refers to basic data types such as vectors, matrices, and colors.

Some of the more important Sb types are as follows:


Groups


Scene Graph


Scene Database



Scene Graph Showing Nodes Used to Create a Robot


Rendered Image of the Robot



#Inventor V2.0 ascii
Separator {
    Separator { # Body
        Transform { translation 0 3 0 }
        Material { # A bronze color:
            ambientColor .33 .22 .27
            diffuseColor .78 .57 .11
            specularColor .99 .94 .81
            shininess .28
        }
        Cylinder { radius 2.5 height 6 }
    }
    Separator { # Head
        Transform { translation 0 7.5 0 }
        Material { # A silver color:
            ambientColor .2 .2 .2
            diffuseColor .6 .6 .6
            specularColor .5 .5 .5
            shininess .5
        }
        Sphere { }
    }
}

The Scene Graph in Open Inventor File Format