Scene tree display tool, is there one??

Scene graph display tool/code request

Has anyone written a scene display tool, something to layout /print a scene in a tree structure (j3dtree for java3d for example).

Is there a debug capability in xith3d already???

I am adding very scene specific lighting, instead of a generalized scene-wide approach. Sometimes I can add a light and only a portion of what I expect is illuminated.

I am sure that it is miscoding on my part but using model loaders etc complicates the branchgroup hierarchy. Being able to see what is in which groups would simplify identifying problems.

You can get the root of your scene graph, and dump that into a JTree. Write a recursive toTreeNode(SceneGraphObject obj) and that shoul do it. I don’t have time to write some example code now, but some might be able to help more.

I thought that some code that printed the tree structure somewhere… can’t remember now.

Yes, like Pedro suggests, a small recursion will do the job filling a JTree.
For example something like this will populate a tree:

Maybe there’s even a simpler way (inside Xith?)… :slight_smile: Some Xith experts will know…