CHAPTER 5 Scenegraph node reference 5.1 Scenegraph compilation
Shape3Dobjects; objects with the pickableproperty will not be optimized during the compile process. 5.1.1 Appearance merging and sorting The Appearancesassigned to Shape3Dobjects in the scenegraph are computationally quite expensive for the scenegraph renderer. They take up memory, and when the renderer hits an Appearance, it must make a long and complex series of OpenGL or DirectX calls to the rendering subsystem to add the information within the Appearanceto the rendering pipeline. Two optimizations can take place: duplicate Appearance objects can be removed and replaced with a reference to a unique Appearanceobject, and Shape3D objects can be rendered in an order such that changes in Appearancestate are minimized. These optimizations reduce memory consumption and save on calls to the rendering subsystem. Obviously, only Appearanceobjects that do not have any WRITEcapability bits set can be optimized using scenegraph compilation. 5.1.2 Geometry merging Geometry merging attempts to minimize the number of discrete Shape3Dobjects in the scenegraph. A scenegraph will benefit from geometry merging if the Shape3Dobjects fulfill the following criteria: Many Shape3Ds with the same attributes and TGs Shape3Ds that do not use indexed geometry Shape3Ds with no capability bits set on their Appearances Shape3Ds without the pickableproperty The compilation process will sort and attempt to merge the static subgraphs in the scenegraph. Dynamic subgraphs, that is, Nodeswith writable attributes (such as Group.ALLOW_CHILDREN_WRITE), will have their static child Nodesprocessed while ignoring the dynamic child Nodes. 5.2 Node java.lang.Object | +–javax.media.j3d.SceneGraphObject | +–javax.media.j3d.Node Nodeis an abstract base class for Groupand Leaf Nodes. It defines methods to control bounding volumes (through the Boundsclass), automatic computation of Bounds, collision detection and picking (mouse selection). Most important, it allows each Nodeto have a single parent Node. The parent Node allows arbitrarily complex scenegraph structures to be defined. Group-derived Nodeshave the ability to manage a Collectionof Node-derived child objects, while Leaf-derived Nodesdefine the leaves of the scenegraph tree. In other words, Leaf Nodescannot have child Nodes. 5.3 Bounds and CollisionBounds Java 3D maintains object boundary information for the Nodesin the scenegraph. Every Nodein the scenegraph contains a Boundsfield that stores the geometric extent of the Node. Java 3D uses the Node Boundsinformation extensively, for everything from visibility testing to Behavior scheduling. 69
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services