| java.lang.Object com.sun.j3d.utils.scenegraph.io.retained.Controller
All known Subclasses: com.sun.j3d.utils.scenegraph.io.retained.RandomAccessFileControl, com.sun.j3d.utils.scenegraph.io.retained.StreamControl,
Controller | abstract public class Controller extends java.lang.Object (Code) | | Provides code to control the reading and writing of Java3D objects to and
from any Java IO mechanism.
|
Method Summary | |
public void | addNamedObject(String name, SceneGraphObject object) | abstract public void | close() | public SceneGraphObjectState | createState(SceneGraphObject obj) | public SceneGraphObjectState | createState(SceneGraphObject obj, SymbolTableData symbol) Given a scene graph object instantiate the correct State class
for that object. | public SceneGraphObjectState | createState(SymbolTableData symbol) | public ClassLoader | getClassLoader() Get the class loader used to load the Scene Graph Objects and
the serialized user data. | public int | getCurrentFileVersion() | abstract public long | getFilePointer() Get the current file 'pointer' location. | public int | getImageCompression() | public SceneGraphObject | getNamedObject(String name) | public String[] | getNames() | public Class | getNodeClassFromID(int classID) | public int | getNodeClassID(javax.media.j3d.SceneGraphObject node) | public int | getOutputFileVersion() | final public SymbolTable | getSymbolTable() | public Bounds | readBounds(DataInput in) | abstract protected void | readBranchGraphs(int[] graphs) Read the set of branchgraps. | public Color3f | readColor3f(DataInput in) | public Color4f | readColor4f(DataInput in) | public Matrix4d | readMatrix4d(DataInput in) | protected void | readNodeComponents(DataInput in) | public SceneGraphObjectState | readObject(DataInput in) | public Point3d | readPoint3d(DataInput in) | public Point3f | readPoint3f(DataInput in) | public Quat4f | readQuat4f(DataInput in) | public Object | readSerializedData(DataInput dataInput) | public int | readSharedGroup(DataInput in) | public Transform3D | readTransform3D(DataInput in) | public Tuple3d | readTuple3d(DataInput in, Tuple3d tuple) | public Tuple3f | readTuple3f(DataInput in, Tuple3f tuple) | public Tuple4d | readTuple4d(DataInput in, Tuple4d tuple) | public Tuple4f | readTuple4f(DataInput in, Tuple4f tuple) | public ConfiguredUniverse | readUniverse(DataInput in, boolean attachBranchGraphs, Canvas3D canvas) Read and create a new Universe matching the one used during save. | public Vector3f | readVector3f(DataInput in) | public Vector4d | readVector4d(DataInput in) | public Vector4f | readVector4f(DataInput in) | public void | reset() | public void | setClassLoader(ClassLoader classLoader) Set the class loader used to load the Scene Graph Objects and
the serialized user data. | public void | skipUserData(DataInput dataInput) | public boolean | useSuperClassIfNoChildClass() Indicates to SceneGraphObjectState that it should use the
Java3D core superclass for any tree nodes whose classes are
not in the classpath during a load. | public void | writeBounds(DataOutput out, Bounds bounds) | abstract public void | writeBranchGraph(BranchGroup bg, java.io.Serializable userData) | public void | writeColor3f(DataOutput out, Color3f color) | public void | writeColor4f(DataOutput out, Color4f vec) | public void | writeMatrix4d(DataOutput out, Matrix4d m) | protected void | writeNodeComponents(DataOutput out) Write all the unsaved NodeComponents and SharedGroups to DataOutput. | public void | writeObject(DataOutput out, SceneGraphObjectState obj) | public void | writePoint3d(DataOutput out, Point3d pt) | public void | writePoint3f(DataOutput out, Point3f pt) | public void | writeQuat4f(DataOutput out, Quat4f vec) | public void | writeSerializedData(DataOutput dataOutput, java.io.Serializable userData) | public void | writeSharedGroup(DataOutput out, SharedGroup sharedGroup, SymbolTableData symbol) | public void | writeTransform3D(DataOutput out, Transform3D tran) | public void | writeTuple3d(DataOutput out, Tuple3d tuple) | public void | writeTuple3f(DataOutput out, Tuple3f tuple) | public void | writeTuple4d(DataOutput out, Tuple4d tuple) | public void | writeTuple4f(DataOutput out, Tuple4f tuple) | public void | writeUniverse(DataOutput out, SimpleUniverse universe, boolean writeUniverseContent) Write out the Universe information. | public void | writeVector3f(DataOutput out, Vector3f vec) | public void | writeVector4d(DataOutput out, Vector4d vec) | public void | writeVector4f(DataOutput out, Vector4f vec) |
BG_DIR_PTR | final protected static long BG_DIR_PTR(Code) | | |
BRANCH_GRAPH_COUNT | final protected static long BRANCH_GRAPH_COUNT(Code) | | |
FILE_DESCRIPTION | final protected static long FILE_DESCRIPTION(Code) | | |
NAMES_OBJECTS_TABLE_PTR | final protected static long NAMES_OBJECTS_TABLE_PTR(Code) | | |
NODE_TYPES_PTR | final protected static long NODE_TYPES_PTR(Code) | | |
SYMBOL_TABLE_PTR | final protected static long SYMBOL_TABLE_PTR(Code) | | |
UNIVERSE_CONFIG_PTR | final protected static long UNIVERSE_CONFIG_PTR(Code) | | |
classLoader | protected ClassLoader classLoader(Code) | | When running the application within webstart this may not be the
correct ClassLoader. If Java 3D is not installed in the local vm and
is instead installed by webstart then this definitely is NOT the correct
classloader, in this case Thread.getCurrent().getClass().getClassLoader()
would probably be a good default. The user can also set their preferred
classloader by calling setClassLoader in SceneGraph[Stream|File]Reader.
|
currentFileVersion | protected int currentFileVersion(Code) | | The currentFileVersion being read
|
outputFileVersion | protected int outputFileVersion(Code) | | The File version which will be written
1 = Java3D 1.3 beta 1
2 = Java3D 1.3 FCS, 1) fix to allow skipping user data written via
SceneGraphIO interface
2) Add missing duplicateOnCloneTree flag
(bug 4690159)
3 = Java3D 1.5.1 1) Add support for SceneGraphObject Name field
4 = Java3D 1.5.2 issue 532, for saving Background Geometry
|
Controller | public Controller()(Code) | | Creates new Controller
|
createState | public SceneGraphObjectState createState(SceneGraphObject obj, SymbolTableData symbol)(Code) | | Given a scene graph object instantiate the correct State class
for that object. If the symbol already exists (is not null) then
increment the reference count, otherwise create a new symbol.
|
getClassLoader | public ClassLoader getClassLoader()(Code) | | Get the class loader used to load the Scene Graph Objects and
the serialized user data. The default is
ClassLoader.getSystemClassLoader()
|
getCurrentFileVersion | public int getCurrentFileVersion()(Code) | | Get the file version of the file we are reading
|
getFilePointer | abstract public long getFilePointer()(Code) | | Get the current file 'pointer' location.
|
getImageCompression | public int getImageCompression()(Code) | | Returns the imageCompression to be used
IMAGE_COMPRESSION_NONE, IMAGE_COMPRESSION_GZIP, IMAGE_COMPRESSION_JPEG
|
getNames | public String[] getNames()(Code) | | Get all the names of the named objects
|
getNodeClassFromID | public Class getNodeClassFromID(int classID)(Code) | | |
getOutputFileVersion | public int getOutputFileVersion()(Code) | | Get the file version that we should write
|
readBranchGraphs | abstract protected void readBranchGraphs(int[] graphs) throws IOException(Code) | | Read the set of branchgraps.
Used by readUniverse
RandomAccessFileControl will read the graphs in the array,
StreamControl will read all graphs in the stream
|
readNodeComponents | protected void readNodeComponents(DataInput in) throws IOException(Code) | | Read in all the node components in this block
|
readSharedGroup | public int readSharedGroup(DataInput in) throws IOException(Code) | | Read a Shared group and it's node components from the IO Stream
|
readUniverse | public ConfiguredUniverse readUniverse(DataInput in, boolean attachBranchGraphs, Canvas3D canvas) throws IOException(Code) | | Read and create a new Universe matching the one used during save.
Parameters: attachBranchGraphs - If true then all the branchGraph attached to the universe when it was saved will be loaded and reattached. |
reset | public void reset()(Code) | | Reset the controller, ready to load/save data to a new file
|
setClassLoader | public void setClassLoader(ClassLoader classLoader)(Code) | | Set the class loader used to load the Scene Graph Objects and
the serialized user data. The default is
ClassLoader.getSystemClassLoader()
|
useSuperClassIfNoChildClass | public boolean useSuperClassIfNoChildClass()(Code) | | Indicates to SceneGraphObjectState that it should use the
Java3D core superclass for any tree nodes whose classes are
not in the classpath during a load.
|
writeNodeComponents | protected void writeNodeComponents(DataOutput out) throws IOException(Code) | | Write all the unsaved NodeComponents and SharedGroups to DataOutput.
Mark all the NodeComponents as saved.
|
|
|