- #1
the other guy
- 19
- 0
im starting a project from an Ebook that seems to be missing a line or two or something. Can someone suggest what should be here? I added the ending parsing since it was one of the more obvious missing things.
import com.sun.j3d.loaders.*;
import com.glyphein.j3d.loaders.milkshape.MS3DLoader;
import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
import javax.media.j3d.BranchGroup;
import com.sun.j3d.loaders.objectfile.ObjectFile;
import com.sun.j3d.loaders.ParsingErrorException;
import com.sun.j3d.loaders.IncorrectFormatException;
import com.sun.j3d.loaders.Scene;
import java.applet.Applet;
import java.io.*;
class bob extends Applet {
// Loader loader = new MS3DLoader(MS3DLoader.LOAD_ALL);
private String filename = null;
public BranchGroup createSceneGraph() {
// Create the root of the branch graph
BranchGroup objRoot = new BranchGroup();
Loader raptor = new MS3DLoader(MS3DLoader.LOAD_ALL);
Scene s = null;
try {
s = raptor.load("Ships/raptor.MS3D");
}
catch (FileNotFoundException e) {
System.err.println(e);
System.exit(1);
}
catch (ParsingErrorException e) {
System.err.println(e);
System.exit(1);
}
catch (IncorrectFormatException e) {
System.err.println(e);
System.exit(1);
}
objRoot.addChild(s.getSceneGroup());
}
}
import com.sun.j3d.loaders.*;
import com.glyphein.j3d.loaders.milkshape.MS3DLoader;
import com.sun.j3d.utils.geometry.*;
import com.sun.j3d.utils.universe.*;
import javax.media.j3d.*;
import javax.vecmath.*;
import javax.media.j3d.BranchGroup;
import com.sun.j3d.loaders.objectfile.ObjectFile;
import com.sun.j3d.loaders.ParsingErrorException;
import com.sun.j3d.loaders.IncorrectFormatException;
import com.sun.j3d.loaders.Scene;
import java.applet.Applet;
import java.io.*;
class bob extends Applet {
// Loader loader = new MS3DLoader(MS3DLoader.LOAD_ALL);
private String filename = null;
public BranchGroup createSceneGraph() {
// Create the root of the branch graph
BranchGroup objRoot = new BranchGroup();
Loader raptor = new MS3DLoader(MS3DLoader.LOAD_ALL);
Scene s = null;
try {
s = raptor.load("Ships/raptor.MS3D");
}
catch (FileNotFoundException e) {
System.err.println(e);
System.exit(1);
}
catch (ParsingErrorException e) {
System.err.println(e);
System.exit(1);
}
catch (IncorrectFormatException e) {
System.err.println(e);
System.exit(1);
}
objRoot.addChild(s.getSceneGroup());
}
}