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:
- SbBool: defines a boolean value. In Scheme this type is an integer
which is 1 when true and 0 when false.
- SbColor: defines a RGB (red, green, blue) color.
- SbMatrix: 4x4 matrix.
- SbVecnx: 2D or 3D vector. n is the number of elements in the
vector (2, 3, or 4); x is the type of element (f for float, s for
short integer).
- A container for collecting child objects
- Collect property, shape, and other group nodes into graphs
- Consists of one or more nodes
- Hierarchical scenes are created by adding nodes as children of grouping
nodes
- Consists of information representing one or more 3D scenes
- Can contain several scene graphs
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