In: Computer Science
Let's understand a few more defnition to get exact point ,
The Scene Database
The Inventor scene database consists of information representing one or more 3D scenes. This database can contain several scene graphs. Each scene graph consists of a related set of 3D objects and attributes.
Scene Graphs
A scene graph consists of one or more nodes, each of which represents a geometry, property, or grouping object. Hierarchical scenes are created by adding nodes as children of grouping nodes, resulting in a directed acyclic graph.
Note: Although Inventor nodes are organized into graphs, Inventor has no enforced policy on how the scene database is organized. You could, for example, create your own nodes that are organized into structures that are not graphs. (See The Inventor Toolmaker for more information on extending the Open Inventor toolkit.)
Types of Nodes
A node is the fundamental element of a scene graph. It contains data and methods that define some specific 3D shape, property, or grouping. When a node is created, it is automatically inserted into the database as a root node. Usually, you connect the node to other nodes in the database to construct a hierarchy.
Nodes are divided into three basic categories:
Shape nodes, which represent 3D geometric objects
Property nodes, which represent appearance and other qualitative characteristics of the scene
Group nodes, which are containers that collect nodes into graphs
These categories are not strict and are used only to help you learn about Inventor classes.
Creating Nodes
Use the new operator to create nodes. For example:
SoSphere *headSphere = new SoSphere; |
Creating Groups
Suppose you want to combine the transform node, the material node, and the sphere node created earlier into a single group, the “head” group for a robot object. First, create the SoGroup. Then use the addChild() method for each child node, as follows:
SoGroup *head = new SoGroup; head->addChild(myXform); head->addChild(bronze); head->addChild(headSphere); |