Package com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe

Examples of com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe.SimpleUniverseState


/*     */   {
/* 427 */     if (universe == null) {
/* 428 */       out.writeUTF("null");
/* 429 */     } else if ((universe instanceof SimpleUniverse)) {
/* 430 */       out.writeUTF(universe.getClass().getName());
/* 431 */       SimpleUniverseState state = new SimpleUniverseState(universe, this);
/* 432 */       state.writeObject(out);
/*     */
/* 434 */       if (writeUniverseContent) {
/* 435 */         state.detachAllGraphs();
/* 436 */         int[] graphs = state.getAllGraphIDs();
/* 437 */         for (int i = 0; i < graphs.length; i++) {
/* 438 */           SymbolTableData symbol = this.symbolTable.getBranchGraphRoot(graphs[i]);
/* 439 */           System.out.println("Writing " + graphs[i] + "  " + symbol.j3dNode);
/* 440 */           writeBranchGraph((BranchGroup)symbol.j3dNode, null);
/*     */         }
/*     */
/* 443 */         state.attachAllGraphs();
/*     */       }
/*     */     } else {
/* 446 */       throw new UnsupportedUniverseException("Current Implementation only support SimpleUniverse/ConfiguredUniverse.");
/*     */     }
/*     */   }
View Full Code Here


/*     */
/* 461 */     if (universeClass.equals("null"))
/* 462 */       return null;
/* 463 */     if ((universeClass.equals("com.sun.j3d.utils.universe.SimpleUniverse")) || (universeClass.equals("com.sun.j3d.utils.universe.ConfiguredUniverse")))
/*     */     {
/* 465 */       SimpleUniverseState state = new SimpleUniverseState(this);
/* 466 */       state.readObject(in, canvas);
/*     */
/* 468 */       if (attachBranchGraphs) {
/* 469 */         int[] graphs = state.getAllGraphIDs();
/* 470 */         readBranchGraphs(graphs);
/*     */
/* 472 */         state.buildGraph();
/*     */       }
/*     */
/* 475 */       return state.getNode();
/*     */     }
/* 477 */     throw new IOException("Unrecognized universe class " + universeClass);
/*     */   }
View Full Code Here

TOP

Related Classes of com.sun.j3d.utils.scenegraph.io.state.com.sun.j3d.utils.universe.SimpleUniverseState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.