Class GltfWriter

java.lang.Object
com.gaia3d.converter.jgltf.GltfWriter
Direct Known Subclasses:
BatchedModelGltfWriter, InstancedModelGltfWriter, PointCloudGltfWriter

public class GltfWriter extends Object
GltfWriter is a class that writes the glTF file. It contains the method to write the glTF file from the GaiaScene object. The glTF file is written in the glTF 2.0 format.
  • Constructor Details

    • GltfWriter

      public GltfWriter()
  • Method Details

    • writeGltf

      public void writeGltf(GaiaScene gaiaScene, File outputPath)
      Write the glTF file from the GaiaScene object.
      Parameters:
      gaiaScene - The GaiaScene object to be written.
      outputPath - The output path of the glTF file.
    • writeGltf

      public void writeGltf(GaiaScene gaiaScene, String outputPath)
      Write the glTF file from the GaiaScene object.
      Parameters:
      gaiaScene - The GaiaScene object to be written.
      outputPath - The output path of the glTF file.
    • writeGlb

      public void writeGlb(GaiaScene gaiaScene, File outputPath)
      Write the glTF file from the GaiaScene object.
      Parameters:
      gaiaScene - The GaiaScene object to be written.
      outputPath - The output path of the glTF file.
    • writeGlb

      public void writeGlb(GaiaScene gaiaScene, OutputStream outputStream)
      Write the glTF file from the GaiaScene object.
      Parameters:
      gaiaScene - The GaiaScene object to be written.
      outputStream - The output stream of the glTF file.
    • writeGlb

      public void writeGlb(GaiaScene gaiaScene, String outputPath)
      Write the glTF file from the GaiaScene object.
      Parameters:
      gaiaScene - The GaiaScene object to be written.
      outputPath - The output path of the glTF file.