Package com.jmex.model.converters

Examples of com.jmex.model.converters.FormatConverter.convert()


    }
    FormatConverter converter = new ObjToJme();
    converter.setProperty("mtllib", url); //tell the converter where to find mtl files
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
   
    converter.convert(url.openStream(), outStream);
   
    URL newFile = new URL(url.toString().replaceAll(".obj", ".jme"));
   
    FileOutputStream fileStream = new FileOutputStream(newFile.toString());
    outStream.writeTo(fileStream);
View Full Code Here


    converter.setProperty("mtllib", name); //tell converter where to find the mtl file
   
    ByteArrayOutputStream outStream = new ByteArrayOutputStream();
   
    try {
      converter.convert(name.openStream(), outStream);
     
      //now that it's converted, load the model
      model = (Spatial)BinaryImporter.getInstance().load(new ByteArrayInputStream(outStream.toByteArray()));
    } catch (IOException e) {
      System.err.println("Error while converting or loading the model");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.