| java.lang.Object com.sun.j3d.utils.scenegraph.io.SceneGraphFileReader
SceneGraphFileReader | public class SceneGraphFileReader extends java.lang.Object (Code) | | Read Java3D BranchGraphs and/or Universe from a file. Individual branchgraphs or an
entire Universe can be read and references (shared nodes and components)
between the graphs are handled correctly.
|
close | public void close() throws IOException(Code) | | Close the file and cleanup internal data structures
|
dereferenceBranchGraph | public void dereferenceBranchGraph(BranchGroup graph)(Code) | | Remove the IO system's reference to this branchgraph and all its nodes.
References to all loaded graphs are maintained by the IO system in
order to facilitate node and component sharing between the graphs.
This call removes the references to graph index
NOT CURRENTLY IMPLEMENTED
|
getBranchGraphCount | public int getBranchGraphCount()(Code) | | Return the number of BranchGraphs in the file
|
getBranchGraphPosition | public int getBranchGraphPosition(BranchGroup graph)(Code) | | Given a BranchGraph that has been loaded return the index of the
graph in the file. The the Branchgroup isn't found, -1 is returned.
|
getClassLoader | public ClassLoader getClassLoader()(Code) | | Get the ClassLoader used to load the scene graph objects and
deserialize user data
|
getNames | public String[] getNames()(Code) | | Return the names of all the named objects
|
readBranchGraph | public BranchGroup[] readBranchGraph(int index) throws IOException(Code) | | Read the BranchGraph at index in the file. If the graph
contains references to nodes in other BranchGraphs that have not already been
loaded, they will also be loaded and returned.
The requested graph will always be the first element in the array.
The file index of all the Graphs can be discovered using getBranchGraphPosition .
Parameters: index - The index of the Graph in the file. First graph is at index 0 See Also: SceneGraphFileReader.getBranchGraphPosition(BranchGroup graph) |
readBranchGraphUserData | public Object readBranchGraphUserData(int index) throws IOException(Code) | | Read the userdata for the branchgraph at 'index' in the file
Parameters: index - the index of the graph in the file |
readDescription | public String readDescription() throws IOException(Code) | | Get the Description of this file's contents
|
readUniverse | public ConfiguredUniverse readUniverse(boolean attachBranchGraphs) throws IOException(Code) | | Create and return a ConfiguredUniverse with the PlatformGeometry, ViewerAvatar,
and Locales saved in the file. The MultiTransformGroup between the ViewingPlatform
and the View is also restored. Universe configuration information is retrieved
via ConfiguredUniverse.getConfigURL() .
If the file does not contain universe information, null is returned.
Parameters: attachBranchGraphs - load and attach all the branchgraphsto the universe. See Also: ConfiguredUniverse.getConfigURL |
readUniverse | public ConfiguredUniverse readUniverse(boolean attachBranchGraphs, Canvas3D canvas) throws IOException(Code) | | Create and return a ConfiguredUniverse with the PlatformGeometry, ViewerAvatar,
and Locales saved in the file. The MultiTransformGroup between the ViewingPlatform
and the View is also restored.
If the file does not contain universe information, null is returned.
Parameters: attachBranchGraphs - load and attach all the branchgraphsto the universe. Parameters: canvas - The canvas to be associated with the Universe. |
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | | Set the ClassLoader used to load the scene graph objects and
deserialize user data
|
|
|