Class J3MExporter

java.lang.Object
com.jme3.material.plugin.export.material.J3MExporter
All Implemented Interfaces:
JmeExporter

public class J3MExporter extends Object implements JmeExporter
Saves a Material to a j3m file with proper formatting. usage is :
     J3MExporter exporter = new J3MExporter();
     exporter.save(material, myFile);
     //or
     exporter.save(material, myOutputStream);
 
  • Constructor Details

    • J3MExporter

      public J3MExporter()
      Create a J3MExporter
  • Method Details

    • save

      public void save(Savable object, OutputStream f) throws IOException
      Description copied from interface: JmeExporter
      Export the Savable to an OutputStream.
      Specified by:
      save in interface JmeExporter
      Parameters:
      object - The savable to export
      f - The output stream
      Throws:
      IOException - If an io exception occurs during export
    • save

      public void save(Savable object, File f, boolean createDirectories) throws IOException
      Description copied from interface: JmeExporter
      Export the Savable to a file. If the path to the file doesn't exist, the parent directories can be created if the createDirectories flag is true. If the path does not exist and createDirectories is false, then an exception is thrown.
      Specified by:
      save in interface JmeExporter
      Parameters:
      object - The savable to export
      f - The file to export to
      createDirectories - flag to indicate if the directories should be created
      Throws:
      IOException - If an io exception occurs during export
    • getCapsule

      public OutputCapsule getCapsule(Savable object)
      Description copied from interface: JmeExporter
      Returns the OutputCapsule for the given savable object.
      Specified by:
      getCapsule in interface JmeExporter
      Parameters:
      object - The object to retrieve an output capsule for.
      Returns:
      the OutputCapsule for the given savable object.