Hi,
I have problem with 3ds to jme convertion. I used this example:
http://www.jmonkeyengine.com/wiki/doku.php?id=model_loading&s[]=3ds&s[]=model
And netbeans can't find class JmeBinaryReader. I have jme 1.0 from cvs.
here is my code:
package testjme;
import com.jme.app.SimpleGame;
import com.jme.math.Vector3f;
import com.jme.scene.shape.Box;
import com.jme.scene.Node;
import com.jmex.model.converters.MaxToJme;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.net.URL;
/**
*
* @author Michal
*/
public class Main extends SimpleGame{
public static void main(String[] args) {
Main app = new Main(); // Create Object
// Signal to show properties dialog
app.setDialogBehaviour(SimpleGame.ALWAYS_SHOW_PROPS_DIALOG);
app.start(); // Start the program
}
protected void simpleInitGame() {
MaxToJme maxtojme = new MaxToJme();
Node node = null; //Where to dump mesh.
ByteArrayOutputStream bytearrayoutputstream = new ByteArrayOutputStream(); //For loading the raw file
URL url = Main.class.getClassLoader().getResource("Model.3ds"); // File Path for the model
maxtojme.convert(url.openStream(), bytearrayoutputstream); // Converts the file into a jme usable file
JmeBinaryReader jmebinaryreader = new JmeBinaryReader(); // Used to convert the jme usable file to a TriMesh
node = jmebinaryreader.loadBinaryFormat(new ByteArrayInputStream(bytearrayoutputstream.toByteArray()));
//converts file into a TriMesh
rootNode.attachChild(node); // Put it in the scene graph
}
}