public class GltfModelWriter
extends java.lang.Object
GltfModel. The model can be written as
a default glTF, consisting of a JSON file and the files that are
referred to via URIs, or as a binary file, or an embedded file where
all external references are replaced by data URIs.| Constructor and Description |
|---|
GltfModelWriter()
Default constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
write(GltfModel gltfModel,
java.io.File file)
Write the given
GltfModel to the given file. |
void |
write(GltfModel gltfModel,
java.lang.String fileName)
Write the given
GltfModel to a file with the given name. |
void |
writeBinary(GltfModel gltfModel,
java.io.File file)
Write the given
GltfModel as a binary glTF asset to the
given file |
void |
writeBinary(GltfModel gltfModel,
java.io.OutputStream outputStream)
Write the given
GltfModel as a binary glTF asset to the
given output stream. |
void |
writeEmbedded(GltfModel gltfModel,
java.io.File file)
Write the given
GltfModel as an embedded glTF asset to the
given file |
void |
writeEmbedded(GltfModel gltfModel,
java.io.OutputStream outputStream)
Write the given
GltfModel as an embedded glTF asset to the
given output stream. |
public void write(GltfModel gltfModel, java.lang.String fileName) throws java.io.IOException
GltfModel to a file with the given name.
External references of buffers or images that are given via the
respective URI string will be resolved against the parent directory
of the file, and the corresponding data will be written into the
corresponding files.gltfModel - The GltfModelfileName - The file namejava.io.IOException - If an IO error occurspublic void write(GltfModel gltfModel, java.io.File file) throws java.io.IOException
GltfModel to the given file. External
references of buffers or images that are given via the respective
URI string will be resolved against the parent directory of the
given file, and the corresponding data will be written into the
corresponding files.gltfModel - The GltfModelfile - The filejava.io.IOException - If an IO error occurspublic void writeBinary(GltfModel gltfModel, java.io.File file) throws java.io.IOException
GltfModel as a binary glTF asset to the
given filegltfModel - The GltfModelfile - The filejava.io.IOException - If an IO error occurspublic void writeBinary(GltfModel gltfModel, java.io.OutputStream outputStream) throws java.io.IOException
GltfModel as a binary glTF asset to the
given output stream. The caller is responsible for closing the
given stream.gltfModel - The GltfModeloutputStream - The output streamjava.io.IOException - If an IO error occurspublic void writeEmbedded(GltfModel gltfModel, java.io.File file) throws java.io.IOException
GltfModel as an embedded glTF asset to the
given filegltfModel - The GltfModelfile - The filejava.io.IOException - If an IO error occurspublic void writeEmbedded(GltfModel gltfModel, java.io.OutputStream outputStream) throws java.io.IOException
GltfModel as an embedded glTF asset to the
given output stream. The caller is responsible for closing the
given stream.gltfModel - The GltfModeloutputStream - The output streamjava.io.IOException - If an IO error occursCopyright © 2022. All Rights Reserved.