Class J3MRootOutputCapsule

java.lang.Object
com.jme3.material.plugin.export.material.J3MOutputCapsule
com.jme3.material.plugin.export.material.J3MRootOutputCapsule
All Implemented Interfaces:
com.jme3.export.OutputCapsule

public class J3MRootOutputCapsule extends J3MOutputCapsule
The `J3MRootOutputCapsule` class extends `J3MOutputCapsule` and serves as the root output capsule for exporting jME materials (`.j3m` files).
Author:
tsr
  • Constructor Details

    • J3MRootOutputCapsule

      public J3MRootOutputCapsule(J3MExporter exporter)
      Constructs a new `J3MRootOutputCapsule`.
      Parameters:
      exporter - The `J3MExporter` instance used for exporting savable objects.
  • Method Details

    • clear

      public void clear()
      Clears all data within this capsule and its superclass. Resets material properties to their default or null values and clears the map of savable capsules.
      Overrides:
      clear in class J3MOutputCapsule
    • getCapsule

      public com.jme3.export.OutputCapsule getCapsule(com.jme3.export.Savable object)
      Retrieves an `OutputCapsule` for a given `Savable` object. If a capsule for the object does not exist, a new `J3MRenderStateOutputCapsule` is created and associated with the object.
      Parameters:
      object - The `Savable` object for which to retrieve or create a capsule.
      Returns:
      The `OutputCapsule` associated with the given savable object.
    • writeToStream

      public void writeToStream(Writer out) throws IOException
      Overrides:
      writeToStream in class J3MOutputCapsule
      Throws:
      IOException
    • write

      public void write(String value, String name, String defVal) throws IOException
      Specified by:
      write in interface com.jme3.export.OutputCapsule
      Overrides:
      write in class J3MOutputCapsule
      Throws:
      IOException
    • write

      public void write(boolean value, String name, boolean defVal) throws IOException
      Specified by:
      write in interface com.jme3.export.OutputCapsule
      Overrides:
      write in class J3MOutputCapsule
      Throws:
      IOException
    • write

      public void write(com.jme3.export.Savable object, String name, com.jme3.export.Savable defVal) throws IOException
      Specified by:
      write in interface com.jme3.export.OutputCapsule
      Overrides:
      write in class J3MOutputCapsule
      Throws:
      IOException