Design of Application Tree

The application can be represented by a tree of Inventor nodes. The top branches of the tree are represented here in Figure 1. These nodes are defined and attached to the tree in vrmuseum_main.c++. This file contains the function main for the application.

Figure 1:Nodes in vrmuseum_main.c++

Top Nodes

As shown in Figure 1, the root of the tree is a SoSeparator node. Attached to the SoSeparator node are a few necessities, the light and camera node. Additional lights can be and are attached in the various subtrees. The SoSwitch node is the main entry point for the various rooms of the project. Changing the whichChild property of the SoSwitch node carries the viewer from one room to another. It is up to the programmer of each room to design a function that locates and changes the SoSwitch node's child to change rooms. Child 0, the Introduction Room Subtree, is the initial screen presented when the application starts.

Following the main SoSwitch node are the nodes for the fixed text at the top of the screen used throughout the application. Currently, the only fixed text is for audio volume control. A SoFont node defines the font size and the text is further defined in a separate file, see Sound Control Subtree for further details.

The vrmuseum_main.c++ file also contains a callback function that is attached to the camera's position and orientation. This function resets the fixed text on the screen anytime the camera is moved.


Back

Table of Contents

Next