GltfSaveOptions

Inheritance: java.lang.Object, com.aspose.threed.IOConfig, com.aspose.threed.SaveOptions

public class GltfSaveOptions extends SaveOptions

Save options for glTF format.

Constructors

ConstructorDescription
GltfSaveOptions(FileContentType contentType)Constructor of GltfSaveOptions
GltfSaveOptions(FileFormat format)Constructor of GltfSaveOptions

Methods

MethodDescription
equals(Object arg0)
getApplyUnitScale()Apply AssetInfo.getUnitScaleFactor to the mesh.
getBufferFile()The file name of the external buffer file used to store binary data.
getClass()
getDracoCompression()Gets whether to enable draco compression
getEmbedAssets()Embed all external assets as base64 into single file in ASCII mode, default value is false.
getEncoding()Gets the default encoding for text-based files.
getExportTextures()Try to copy textures used in scene to output directory.
getExternalDracoEncoder()Use external draco encoder to accelerate the draco compression speed.
getFallbackNormal()When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation.
getFileFormat()Gets the file format that specified in current Save/Load option.
getFileName()The file name of the exporting/importing scene.
getFileSystem()Allow user to handle how to manage the external dependencies during load/save.
getFileSystemFactory()Gets the factory class for FileSystem.
getFlipTexCoordV()Flip texture coordinate v(t) component, default value is true.
getImageFormat()Standard glTF only supports PNG/JPG as its texture format, this option will guide how Aspose.3D convert the non-standard images to supported format during the exporting.
getLookupPaths()Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.
getMaterialConverter()Custom converter to convert the geometry’s material to PBR material If this is unassigned, glTF 2.0 exporter will automatically convert the standard material to PBR material.
getPrettyPrint()The JSON content of GLTF file is indented for human reading, default value is false
getSaveExtras()Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file.
getUseCommonMaterials()Serialize materials using KHR common material extensions, default value is false.
hashCode()
notify()
notifyAll()
setApplyUnitScale(boolean value)Apply AssetInfo.getUnitScaleFactor to the mesh.
setBufferFile(String value)The file name of the external buffer file used to store binary data.
setDracoCompression(boolean value)Sets whether to enable draco compression
setEmbedAssets(boolean value)Embed all external assets as base64 into single file in ASCII mode, default value is false.
setEncoding(Charset value)Sets the default encoding for text-based files.
setExportTextures(boolean value)Try to copy textures used in scene to output directory.
setExternalDracoEncoder(String value)Use external draco encoder to accelerate the draco compression speed.
setFallbackNormal(Vector3 value)When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation.
setFileName(String value)The file name of the exporting/importing scene.
setFileSystem(FileSystem value)Allow user to handle how to manage the external dependencies during load/save.
setFileSystemFactory(FileSystemFactory value)Sets the factory class for FileSystem.
setFlipTexCoordV(boolean value)Flip texture coordinate v(t) component, default value is true.
setImageFormat(GltfEmbeddedImageFormat value)Standard glTF only supports PNG/JPG as its texture format, this option will guide how Aspose.3D convert the non-standard images to supported format during the exporting.
setLookupPaths(ArrayList value)Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.
setMaterialConverter(MaterialConverter value)Custom converter to convert the geometry’s material to PBR material If this is unassigned, glTF 2.0 exporter will automatically convert the standard material to PBR material.
setPrettyPrint(boolean value)The JSON content of GLTF file is indented for human reading, default value is false
setSaveExtras(boolean value)Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file.
setUseCommonMaterials(boolean value)Serialize materials using KHR common material extensions, default value is false.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

GltfSaveOptions(FileContentType contentType)

public GltfSaveOptions(FileContentType contentType)

Constructor of GltfSaveOptions

Parameters:

ParameterTypeDescription
contentTypeFileContentType

GltfSaveOptions(FileFormat format)

public GltfSaveOptions(FileFormat format)

Constructor of GltfSaveOptions

Parameters:

ParameterTypeDescription
formatFileFormat

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getApplyUnitScale()

public boolean getApplyUnitScale()

Apply AssetInfo.getUnitScaleFactor to the mesh. Default value is false.

Returns: boolean

getBufferFile()

public String getBufferFile()

The file name of the external buffer file used to store binary data. If this file is not specified, Aspose.3D will generate a name for you. This is ignored when export glTF in binary mode.

Returns: java.lang.String

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getDracoCompression()

public boolean getDracoCompression()

Gets whether to enable draco compression

Returns: boolean

getEmbedAssets()

public boolean getEmbedAssets()

Embed all external assets as base64 into single file in ASCII mode, default value is false.

Returns: boolean

getEncoding()

public Charset getEncoding()

Gets the default encoding for text-based files. Default value is null which means the importer/exporter will decide which encoding to use.

Returns: java.nio.charset.Charset

getExportTextures()

public boolean getExportTextures()

Try to copy textures used in scene to output directory.

Returns: boolean

getExternalDracoEncoder()

public String getExternalDracoEncoder()

Use external draco encoder to accelerate the draco compression speed. Remarks: Aspose.3D will create new sub process to encode the mesh to the draco format, use it at your own risk.

Returns: java.lang.String

getFallbackNormal()

public Vector3 getFallbackNormal()

When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation. Default value is (0, 1, 0)

Returns: Vector3

getFileFormat()

public FileFormat getFileFormat()

Gets the file format that specified in current Save/Load option.

Returns: FileFormat

getFileName()

public String getFileName()

The file name of the exporting/importing scene. This is optional, but useful when serialize external assets like OBJ’s material.

Returns: java.lang.String

getFileSystem()

public FileSystem getFileSystem()

Allow user to handle how to manage the external dependencies during load/save.

Returns: FileSystem

getFileSystemFactory()

public static FileSystemFactory getFileSystemFactory()

Gets the factory class for FileSystem. The default factory will create LocalFileSystem which is not suitable for server environment.

Returns: FileSystemFactory

getFlipTexCoordV()

public boolean getFlipTexCoordV()

Flip texture coordinate v(t) component, default value is true.

Returns: boolean

getImageFormat()

public GltfEmbeddedImageFormat getImageFormat()

Standard glTF only supports PNG/JPG as its texture format, this option will guide how Aspose.3D convert the non-standard images to supported format during the exporting. Default value is GltfEmbeddedImageFormat.PNG

Returns: GltfEmbeddedImageFormat

getLookupPaths()

public ArrayList<String> getLookupPaths()

Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.

Returns: java.util.ArrayList<java.lang.String>

getMaterialConverter()

public MaterialConverter getMaterialConverter()

Custom converter to convert the geometry’s material to PBR material If this is unassigned, glTF 2.0 exporter will automatically convert the standard material to PBR material. Default value is null This property is used when exporting a scene to a glTF 2.0 file.

Returns: MaterialConverter

getPrettyPrint()

public boolean getPrettyPrint()

The JSON content of GLTF file is indented for human reading, default value is false

Returns: boolean

getSaveExtras()

public boolean getSaveExtras()

Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file. This is useful to provide application-specific data. Default value is false.

Returns: boolean

getUseCommonMaterials()

public boolean getUseCommonMaterials()

Serialize materials using KHR common material extensions, default value is false. Set this to false will cause Aspose.3D export a set of vertex/fragment shader if getExportShaders

Returns: boolean

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setApplyUnitScale(boolean value)

public void setApplyUnitScale(boolean value)

Apply AssetInfo.getUnitScaleFactor to the mesh. Default value is false.

Parameters:

ParameterTypeDescription
valuebooleanNew value

setBufferFile(String value)

public void setBufferFile(String value)

The file name of the external buffer file used to store binary data. If this file is not specified, Aspose.3D will generate a name for you. This is ignored when export glTF in binary mode.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew value

setDracoCompression(boolean value)

public void setDracoCompression(boolean value)

Sets whether to enable draco compression

Parameters:

ParameterTypeDescription
valuebooleanNew value

setEmbedAssets(boolean value)

public void setEmbedAssets(boolean value)

Embed all external assets as base64 into single file in ASCII mode, default value is false.

Parameters:

ParameterTypeDescription
valuebooleanNew value

setEncoding(Charset value)

public void setEncoding(Charset value)

Sets the default encoding for text-based files. Default value is null which means the importer/exporter will decide which encoding to use.

Parameters:

ParameterTypeDescription
valuejava.nio.charset.CharsetNew value

setExportTextures(boolean value)

public void setExportTextures(boolean value)

Try to copy textures used in scene to output directory.

Parameters:

ParameterTypeDescription
valuebooleanNew value

setExternalDracoEncoder(String value)

public void setExternalDracoEncoder(String value)

Use external draco encoder to accelerate the draco compression speed.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew value Remarks: Aspose.3D will create new sub process to encode the mesh to the draco format, use it at your own risk.

setFallbackNormal(Vector3 value)

public void setFallbackNormal(Vector3 value)

When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation. Default value is (0, 1, 0)

Parameters:

ParameterTypeDescription
valueVector3New value

setFileName(String value)

public void setFileName(String value)

The file name of the exporting/importing scene. This is optional, but useful when serialize external assets like OBJ’s material.

Parameters:

ParameterTypeDescription
valuejava.lang.StringNew value

setFileSystem(FileSystem value)

public void setFileSystem(FileSystem value)

Allow user to handle how to manage the external dependencies during load/save.

Parameters:

ParameterTypeDescription
valueFileSystemNew value

setFileSystemFactory(FileSystemFactory value)

public static void setFileSystemFactory(FileSystemFactory value)

Sets the factory class for FileSystem. The default factory will create LocalFileSystem which is not suitable for server environment.

Parameters:

ParameterTypeDescription
valueFileSystemFactoryNew value

setFlipTexCoordV(boolean value)

public void setFlipTexCoordV(boolean value)

Flip texture coordinate v(t) component, default value is true.

Parameters:

ParameterTypeDescription
valuebooleanNew value

setImageFormat(GltfEmbeddedImageFormat value)

public void setImageFormat(GltfEmbeddedImageFormat value)

Standard glTF only supports PNG/JPG as its texture format, this option will guide how Aspose.3D convert the non-standard images to supported format during the exporting. Default value is GltfEmbeddedImageFormat.PNG

Parameters:

ParameterTypeDescription
valueGltfEmbeddedImageFormatNew value

setLookupPaths(ArrayList value)

public void setLookupPaths(ArrayList<String> value)

Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.

Parameters:

ParameterTypeDescription
valuejava.util.ArrayList<java.lang.String>New value

setMaterialConverter(MaterialConverter value)

public void setMaterialConverter(MaterialConverter value)

Custom converter to convert the geometry’s material to PBR material If this is unassigned, glTF 2.0 exporter will automatically convert the standard material to PBR material. Default value is null This property is used when exporting a scene to a glTF 2.0 file.

Parameters:

ParameterTypeDescription
valueMaterialConverterNew value

setPrettyPrint(boolean value)

public void setPrettyPrint(boolean value)

The JSON content of GLTF file is indented for human reading, default value is false

Parameters:

ParameterTypeDescription
valuebooleanNew value

setSaveExtras(boolean value)

public void setSaveExtras(boolean value)

Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file. This is useful to provide application-specific data. Default value is false.

Parameters:

ParameterTypeDescription
valuebooleanNew value

setUseCommonMaterials(boolean value)

public void setUseCommonMaterials(boolean value)

Serialize materials using KHR common material extensions, default value is false. Set this to false will cause Aspose.3D export a set of vertex/fragment shader if getExportShaders

Parameters:

ParameterTypeDescription
valuebooleanNew value

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int