com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe
Class SimpleUniverseState

java.lang.Object
  extended by com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe.SimpleUniverseState

public class SimpleUniverseState
extends java.lang.Object


Field Summary
private  Controller control
           
private  java.util.ArrayList localeBGs
           
private  PlatformGeometryState platformGeom
           
private  int totalBGs
           
private  SimpleUniverse universe
           
private  ViewerAvatarState viewerAvatar
           
 
Constructor Summary
SimpleUniverseState(ConfiguredUniverse universe, Controller control)
          Creates new SimpleUniverseState for writing.
SimpleUniverseState(Controller control)
          Creates new SimpleUniverseState for reading.
SimpleUniverseState(SimpleUniverse universe, Controller control)
          Creates new SimpleUniverseState for writing.
 
Method Summary
 void attachAllGraphs()
          Reattach each BranchGraph to the Locale(s)
 void buildGraph()
          Called once IO is complete, attaches all the branchgroups to the locales
 void detachAllGraphs()
          Detach each BranchGraph from the Locale(s)
 int[] getAllGraphIDs()
          Return all the branchgraph id's for all Locales in the universe This call must be made after readObject()
 ConfiguredUniverse getNode()
          Return the 'node', ie the virtual universe.
private  HiResCoord readHiResCoord(java.io.DataInput in)
           
private  void readLocales(java.io.DataInput in)
           
 void readObject(java.io.DataInput in, Canvas3D canvas)
           
private  void writeHiResCoord(java.io.DataOutput out, HiResCoord hiRes)
           
private  void writeLocales(java.io.DataOutput out)
           
 void writeObject(java.io.DataOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

universe

private SimpleUniverse universe

control

private Controller control

localeBGs

private java.util.ArrayList localeBGs

totalBGs

private int totalBGs

platformGeom

private PlatformGeometryState platformGeom

viewerAvatar

private ViewerAvatarState viewerAvatar
Constructor Detail

SimpleUniverseState

public SimpleUniverseState(ConfiguredUniverse universe,
                           Controller control)
Creates new SimpleUniverseState for writing.


SimpleUniverseState

public SimpleUniverseState(SimpleUniverse universe,
                           Controller control)
Creates new SimpleUniverseState for writing.


SimpleUniverseState

public SimpleUniverseState(Controller control)
Creates new SimpleUniverseState for reading.

Method Detail

writeObject

public void writeObject(java.io.DataOutput out)
                 throws java.io.IOException
Throws:
java.io.IOException

readObject

public void readObject(java.io.DataInput in,
                       Canvas3D canvas)
                throws java.io.IOException
Throws:
java.io.IOException

writeLocales

private void writeLocales(java.io.DataOutput out)
                   throws java.io.IOException
Throws:
java.io.IOException

readLocales

private void readLocales(java.io.DataInput in)
                  throws java.io.IOException
Throws:
java.io.IOException

buildGraph

public void buildGraph()
Called once IO is complete, attaches all the branchgroups to the locales


getAllGraphIDs

public int[] getAllGraphIDs()
Return all the branchgraph id's for all Locales in the universe This call must be made after readObject()


detachAllGraphs

public void detachAllGraphs()
Detach each BranchGraph from the Locale(s)


attachAllGraphs

public void attachAllGraphs()
Reattach each BranchGraph to the Locale(s)


getNode

public ConfiguredUniverse getNode()
Return the 'node', ie the virtual universe. Returns null if currently writing a SimpleUniverse.


writeHiResCoord

private void writeHiResCoord(java.io.DataOutput out,
                             HiResCoord hiRes)
                      throws java.io.IOException
Throws:
java.io.IOException

readHiResCoord

private HiResCoord readHiResCoord(java.io.DataInput in)
                           throws java.io.IOException
Throws:
java.io.IOException


Copyright 1996-2008 Sun Microsystems, Inc. All Rights Reserved. Use is subject to license terms.