GltfSaveOptions
Overview
GltfSaveOptions is a class in Aspose.3D FOSS for Java.
Inherits from: SaveOptions.
Save options for glTF format.
This class provides 42 methods for working with GltfSaveOptions objects in Java programs.
Available methods include: GltfSaveOptions, SaveOptions, getApplyUnitScale, getBufferFile, getDracoCompression, getEmbedAssets, getEncoding, getExportTextures, getExternalDracoEncoder, getFallbackNormal, getFileFormat, getFileName, and 27 additional methods.
All public members are accessible to any Java application after installing the Aspose.3D FOSS for Java package.
Properties: applyUnitScale, bufferFile, dracoCompression, embedAssets, encoding, exportTextures, and 13 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
prettyPrint | boolean | Read | The JSON content of GLTF file is indented for human reading, default value is false. |
fallbackNormal | Vector3 | Read | When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation. |
embedAssets | boolean | Read | Embed all external assets as base64 into single file in ASCII mode, default value is false. |
imageFormat | GltfEmbeddedImageFormat | Read | 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. | |||
materialConverter | MaterialConverter | Read | Custom converter to convert the geometry’s material to PBR material. |
useCommonMaterials | boolean | Read | Serialize materials using KHR common material extensions, default value is false. |
externalDracoEncoder | String | Read | Use external draco encoder to accelerate the draco compression speed. |
flipTexCoordV | boolean | Read | Flip texture coordinate v(t) component, default value is true. |
bufferFile | String | Read | The file name of the external buffer file used to store binary data. |
saveExtras | boolean | Read | Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file. |
applyUnitScale | boolean | Read | Apply AssetInfo.getUnitScaleFactor() to the mesh. |
dracoCompression | boolean | Read | Gets or sets whether to enable draco compression. |
exportTextures | boolean | Read | Try to copy textures used in scene to output directory. |
fileFormat | FileFormat | Read | Gets the file format. |
fileSystemFactory | FileSystemFactory | Read | Gets the factory class for FileSystem. |
encoding | java.nio.charset.Charset | Read | Gets the default encoding for text-based files. |
fileSystem | FileSystem | Read | Allow user to handle how to manage the external dependencies during load/save. |
lookupPaths | java.util.ArrayList<String> | Read | Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. |
fileName | String | Read | The file name of the exporting/importing scene. |
Methods
| Signature | Description |
|---|---|
GltfSaveOptions(contentType: FileContentType) | Constructor of GltfSaveOptions. |
GltfSaveOptions(format: FileFormat) | Constructor of GltfSaveOptions. |
getPrettyPrint() → boolean | The JSON content of GLTF file is indented for human reading, default value is false. |
setPrettyPrint(value: boolean) | Sets whether the JSON content of GLTF file should be indented for human reading. |
getFallbackNormal() → Vector3 | When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation. |
setFallbackNormal(value: Vector3) | Sets the fallback normal vector when GLTF2 exporter detects an invalid normal. |
getEmbedAssets() → boolean | Embed all external assets as base64 into single file in ASCII mode, default value is false. |
setEmbedAssets(value: boolean) | Sets whether to embed all external assets as base64 into single file. |
getImageFormat() → GltfEmbeddedImageFormat | 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. | |
setImageFormat(value: GltfEmbeddedImageFormat) | Sets the image format for texture conversion during export. |
getMaterialConverter() → MaterialConverter | Custom converter to convert the geometry’s material to PBR material. |
setMaterialConverter(value: MaterialConverter) | Sets the material converter to convert geometry’s material to PBR material. |
getUseCommonMaterials() → boolean | Serialize materials using KHR common material extensions, default value is false. |
setUseCommonMaterials(value: boolean) | Sets whether to serialize materials using KHR common material extensions. |
getExternalDracoEncoder() → String | Use external draco encoder to accelerate the draco compression speed. |
setExternalDracoEncoder(value: String) | Sets the external draco encoder path to accelerate compression. |
getFlipTexCoordV() → boolean | Flip texture coordinate v(t) component, default value is true. |
setFlipTexCoordV(value: boolean) | Sets whether to flip texture coordinate v(t) component. |
getBufferFile() → String | The file name of the external buffer file used to store binary data. |
setBufferFile(value: String) | Sets the file name of the external buffer file. |
getSaveExtras() → boolean | Save scene object’s dynamic properties into ’extra’ fields in the generated glTF file. |
setSaveExtras(value: boolean) | Sets whether to save scene object’s dynamic properties into ’extra’ fields. |
getApplyUnitScale() → boolean | Apply AssetInfo.getUnitScaleFactor() to the mesh. |
setApplyUnitScale(value: boolean) | Sets whether to apply AssetInfo.getUnitScaleFactor() to the mesh. |
getDracoCompression() → boolean | Gets or sets whether to enable draco compression. |
setDracoCompression(value: boolean) | Sets whether to enable draco compression. |
SaveOptions() | Initializes a new instance of the SaveOptions class. |
SaveOptions(format: FileFormat) | Initializes a new instance of the SaveOptions class with a file format. |
SaveOptions(contentType: FileContentType) | Initializes a new instance of the SaveOptions class with a file content type. |
getExportTextures() → boolean | Try to copy textures used in scene to output directory. |
setExportTextures(value: boolean) | Try to copy textures used in scene to output directory. |
getFileFormat() → FileFormat | Returns the file format. |
getFileSystemFactory() → FileSystemFactory | Gets the factory class for FileSystem. |
setFileSystemFactory(value: FileSystemFactory) | Sets the factory class for FileSystem. |
getEncoding() → java.nio.charset.Charset | Gets the default encoding for text-based files. |
setEncoding(value: java.nio.charset.Charset) | Sets the default encoding for text-based files. |
getFileSystem() → FileSystem | Allow user to handle how to manage the external dependencies during load/save. |
setFileSystem(value: FileSystem) | Allow user to handle how to manage the external dependencies during load/save. |
getLookupPaths() → java.util.ArrayList<String> | Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. |
setLookupPaths(value: java.util.ArrayList<String>) | Some files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load. |
getFileName() → String | The file name of the exporting/importing scene. |
setFileName(value: String) | The file name of the exporting/importing scene. |