Java3D Scene Graph Traversal Question.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Java3D Scene Graph Traversal Question.

ZacharyABCD
This post was updated on .
The javadoc for javax.media.j3d.Behavior explains that the lower nodes are executed
earlier than the higher nodes, if I am accurate.

Is this exactly the same, in terms of priority, for javax.media.j3d.TransformGroup
nodes as well?  In what order are either of these nodes executed, from the top (root)
of the scene graph to the leaf on some branch, particularly in relation to one another
if both of these types of nodes relate back to one another?

-Does the Scene Graph traverse root to leaves, top down and from left to right?
Reply | Threaded
Open this post in threaded view
|

Re: Java3D Scene Graph Traversal Question.

gouessej
Administrator
Hello

I just put the link to the Java documentation of this class to help other readers:
http://jogamp.org/deployment/java3d/1.7.0-pre1/j3dcore/javadoc/org/jogamp/java3d/Behavior.html
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: Java3D Scene Graph Traversal Question.

philjord
Yes the full scene graph is traversed and all transforms multiplied in. I assume it does the children in first to last order (which would be naturally drawn left to right on a normal drawn graph).


Note that in a reasonable size system many many of the tree branches, Nodes (Shape3D etc) and Node components (Appearance etc) are shared and linked so there are 2 distinct traversals;
One that compiles the tree into a fast access structure for rendering, that occurs on the makeLive call of a BranchGroup, this is quite expensive in terms of processing.
One that occurs on every render frame that accumulates the render settings for a Geometry and makes the render calls, this one is very fast (but goes through a structure that is not designed for human readability)