From: Carsten N. <car...@gm...> - 2008-06-27 14:41:10
|
Hello Sajjadul, Sajjadul Islam wrote: > Hello, > > I am stuck with one of the most important concepts of scenegraph. > > > Node and Field - what are the differences between them. > > > Consider the example given in the Tutorial - Car and the wheel > There the yellow circles are nodes and the orange are the cores. > > What are the fields in the diagram? they are not visible in that diagram (the one at the bottom of <http://opensg.vrsource.org/trac/wiki/Tutorial/OpenSG1/FirstApplication> is the one you refer to, right?). To explain the terms Node and Field let me add two more that are also relevant in this context: FieldContainer and NodeCore. FieldContainer is the base class of every object that is part of the scenegraph in OpenSG. As its name suggests it holds a set of Fields (the base class FieldContainer has no fields itself, but derived classes add them). The fields store the actual data (e.g. vertices for geometry, or the pointers to child nodes). You can think of both FieldContainer and Field as helper data structures that unify access to data stored in the scenegraph, they are not really part of the abstract concept of a scenegraph. Node and NodeCore are two types that are derived from FieldContainer and they both have a distinct set of fields that they store. Node for example has a (multi) field for its children, a (single) field for the bounding volume and a (single) field for the node core (the single and multi indicates whether the field can store just one or multiple values). In the abstract concept of a scenegraph there is normally no split between nodes and node cores, there are only nodes of different types. These nodes fulfill two purposes: they contain hierarchical information about the scene and they define the meaning of each node (i.e. whether it is a transformation or geometry or something else). In OpenSG the combination of a Node and a NodeCore are what corresponds to a node in the abstract concept. An OpenSG Node provides the hierarchical structure of the scene, while the NodeCores define the semantics of each of them. Hope it helps, Carstn |