|
Hi all:
I have been trying to load a VRML into my
scene. It loads and attaches but I can't see anything. Any
suggestions?
Loading code:
System.out.println("Loading terrain
map");
String URLname = "c:/GameDev/world.wrl"; try { Scene scene = modelLoader.load(URLname); if (scene != null) { BranchGroup bg = scene.getSceneGroup(); tg.addChild(bg); System.out.print(bg.toString()); } else { System.out.println("Scene failed to load."); } } catch (FileNotFoundException fnfe) { System.out.println(URLname + " URL not found."); System.out.println("Please try again."); } catch (Exception e) { System.out.println("Exception loading terrain : "+e.getMessage()); } tg.compile(); u.addBranchGraph(tg); Here is the header for the file:
Group { children [ NavigationInfo { type [ "EXAMINE", "ANY" ] } Transform { translation -31.50 0 -31.50 # Center heightfield on origin children [ Shape { appearance Appearance { material Material { diffuseColor 0.700 0.700 0.700 } } geometry ElevationGrid { xDimension 64 xSpacing 1.0000 zDimension 64 zSpacing 1.0000 solid FALSE creaseAngle 3 height [ 3.225 3.225 3.225 3.225 3.225 3.225 3.2 3.2 3.2 3.175 3.15 3.15 3.124 3.099 3.099 3.074 |
