public class ScenePrinter extends Object implements SceneGraphTraversalObserver
By default, the printer only shows the basic graph structure. Options all you to print out extra information. Fully qualified class names are printed out, but the option exists to just use the class name only.
| Constructor and Description |
|---|
ScenePrinter()
Create a new printer with all flags turned off.
|
| Modifier and Type | Method and Description |
|---|---|
void |
dumpGraph(SceneGraphObject root)
Print the scene graph from the given root node.
|
void |
enableBoundsPrinting(boolean state)
Set the flag for printing the bounds information.
|
void |
enableChildCountPrinting(boolean state)
Set the flag for printing the child count of groups.
|
void |
enableDashPrinting(boolean state)
Set the flag for the alternate indenting scheme, that uses dashes
instead of spaces for each level of intent.
|
void |
enableHashCodePrinting(boolean state)
Set the flag for printing the hash code information.
|
void |
enablePickMaskPrinting(boolean state)
Set the flag for printing the pick mask information.
|
void |
enableTransformMatrixPrinting(boolean state)
Set the flag for printing out the transformation matrix of any
encountered transform groups.
|
boolean |
isBoundsPrintingEnabled()
Check to see the current state of the bounds printing flag.
|
boolean |
isChildCountPrintingEnabled()
Check to see the current state of the child count printing flag.
|
boolean |
isDashPrintingEnabled()
Check to see the current state of the alternate indent printing flag.
|
boolean |
isHashCodePrintingEnabled()
Check to see the current state of the hash code printing flag.
|
boolean |
isPickMaskPrintingEnabled()
Check to see the current state of the pick mask printing flag.
|
boolean |
isShortNamesEnabled()
Check to see the current state of the alternate indent printing flag.
|
boolean |
isTransformMatrixPrintingEnabled()
Check to see the current state of the transform matrix printing flag.
|
void |
observedNode(SceneGraphObject parent,
SceneGraphObject child,
boolean shared,
int depth)
Notification of a scene graph object that has been traversed in the
scene.
|
void |
printShortNames(boolean state)
Set the flag for printing out just the class name rather than the
fully-qualified class name.
|
public ScenePrinter()
public void observedNode(SceneGraphObject parent, SceneGraphObject child, boolean shared, int depth)
observedNode in interface SceneGraphTraversalObserverparent - The parent node of this nodechild - The child node that is being observedshared - true if the object reference has already been traversed
and this is beyond the first referencedepth - The depth of traversal from the top of the tree. Starts at 0 for top.public void dumpGraph(SceneGraphObject root)
root - The root of the scene graph to print frompublic void enableBoundsPrinting(boolean state)
state - true to enable printing out of bounding box informationpublic boolean isBoundsPrintingEnabled()
public void enableHashCodePrinting(boolean state)
state - true to enable printing out of bounding box informationpublic boolean isHashCodePrintingEnabled()
public void enablePickMaskPrinting(boolean state)
state - true to enable printing out of the pick maskpublic boolean isPickMaskPrintingEnabled()
public void enableChildCountPrinting(boolean state)
state - true to enable printing out the number of childrenpublic boolean isChildCountPrintingEnabled()
public void enableDashPrinting(boolean state)
state - true to enable printing dashes rather than spacespublic boolean isDashPrintingEnabled()
public void printShortNames(boolean state)
state - true to enable printing dashes rather than spacespublic boolean isShortNamesEnabled()
public void enableTransformMatrixPrinting(boolean state)
state - true to enable printing out of matrix informationpublic boolean isTransformMatrixPrintingEnabled()
Copyright © 2001 - 2015 j3d.org