catch (Exception e) { scene = null; System.err.println(e);
catch (Exception e) { scene = null; System.err.println(e); } if( scene == null ) System.exit(1); //retrieve the Shape3D object from the scene BranchGroup branchGroup = scene.getSceneGroup(); shape = (Shape3D) branchGroup.getChild(0); //create an Appearance and Material Appearance app = new Appearance(); Color3f objColor = new Color3f(1.0f, 0.7f, 0.8f); Color3f black = new Color3f(0.0f, 0.0f, 0.0f); app.setMaterial(new Material(objColor, black, objColor, black, 80.0f)); //assign the appearance to the Shape shape.setAppearance( app ); //connect the scenegraph objTrans2.addChild( scene.getSceneGroup() ); objTrans1.addChild( objTrans2 ); objRoot.addChild( objTrans1 ); return objRoot; } 15.3.4 Third-party object loaders There are a wide variety of object loaders available for use with Java 3D. The list of available loaders is maintained by Bill Day at http://www.j3d.org. Data file loaders available for most of the common 3D data file formats are listed in table 15.1. Table 15.1 Data file loaders Loader Author File Format(s) Last Updated Milkshape3D Loader Gregory Pierce Milkshape3D 30 Aug 2001 Milkshape3D Loader Kevin Duling Milkshape3D 28 Aug 2001 AC3D Loader Ryan Wilhm/j3d.org AC3D 28 Aug 2001 NCSA Portfolio NCSA 3DS (3D-Studio) PDB (Protein Data Bank) DEM (Digital Elevation Map) IOB (Imagine) COB (Caligari trueSpace) OBJ (Wavefront) DXF (Drawing Interchange File) AutoCAD VRML 97 15 Sept 2000 264
Note: If you are looking for good and high quality web space to host and run your application check Lunarwebhost JSP Web Hosting services