GltfSaveOptions

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

NameTypeAccessDescription
prettyPrintbooleanReadThe JSON content of GLTF file is indented for human reading, default value is false.
fallbackNormalVector3ReadWhen GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation.
embedAssetsbooleanReadEmbed all external assets as base64 into single file in ASCII mode, default value is false.
imageFormatGltfEmbeddedImageFormatReadStandard 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.
materialConverterMaterialConverterReadCustom converter to convert the geometry’s material to PBR material.
useCommonMaterialsbooleanReadSerialize materials using KHR common material extensions, default value is false.
externalDracoEncoderStringReadUse external draco encoder to accelerate the draco compression speed.
flipTexCoordVbooleanReadFlip texture coordinate v(t) component, default value is true.
bufferFileStringReadThe file name of the external buffer file used to store binary data.
saveExtrasbooleanReadSave scene object’s dynamic properties into ’extra’ fields in the generated glTF file.
applyUnitScalebooleanReadApply AssetInfo.getUnitScaleFactor() to the mesh.
dracoCompressionbooleanReadGets or sets whether to enable draco compression.
exportTexturesbooleanReadTry to copy textures used in scene to output directory.
fileFormatFileFormatReadGets the file format.
fileSystemFactoryFileSystemFactoryReadGets the factory class for FileSystem.
encodingjava.nio.charset.CharsetReadGets the default encoding for text-based files.
fileSystemFileSystemReadAllow user to handle how to manage the external dependencies during load/save.
lookupPathsjava.util.ArrayList<String>ReadSome files like OBJ depends on external file, the lookup paths will allows Aspose.3D to look for external file to load.
fileNameStringReadThe file name of the exporting/importing scene.

Methods

SignatureDescription
GltfSaveOptions(contentType: FileContentType)Constructor of GltfSaveOptions.
GltfSaveOptions(format: FileFormat)Constructor of GltfSaveOptions.
getPrettyPrint()booleanThe 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()Vector3When 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()booleanEmbed 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()GltfEmbeddedImageFormatStandard 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()MaterialConverterCustom 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()booleanSerialize materials using KHR common material extensions, default value is false.
setUseCommonMaterials(value: boolean)Sets whether to serialize materials using KHR common material extensions.
getExternalDracoEncoder()StringUse external draco encoder to accelerate the draco compression speed.
setExternalDracoEncoder(value: String)Sets the external draco encoder path to accelerate compression.
getFlipTexCoordV()booleanFlip texture coordinate v(t) component, default value is true.
setFlipTexCoordV(value: boolean)Sets whether to flip texture coordinate v(t) component.
getBufferFile()StringThe 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()booleanSave 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()booleanApply AssetInfo.getUnitScaleFactor() to the mesh.
setApplyUnitScale(value: boolean)Sets whether to apply AssetInfo.getUnitScaleFactor() to the mesh.
getDracoCompression()booleanGets 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()booleanTry to copy textures used in scene to output directory.
setExportTextures(value: boolean)Try to copy textures used in scene to output directory.
getFileFormat()FileFormatReturns the file format.
getFileSystemFactory()FileSystemFactoryGets the factory class for FileSystem.
setFileSystemFactory(value: FileSystemFactory)Sets the factory class for FileSystem.
getEncoding()java.nio.charset.CharsetGets the default encoding for text-based files.
setEncoding(value: java.nio.charset.Charset)Sets the default encoding for text-based files.
getFileSystem()FileSystemAllow 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()StringThe file name of the exporting/importing scene.
setFileName(value: String)The file name of the exporting/importing scene.

See Also

 English