Package com.aspose.threed
Class GltfSaveOptions
- java.lang.Object
-
- com.aspose.threed.IOConfig
-
- com.aspose.threed.SaveOptions
-
- com.aspose.threed.GltfSaveOptions
-
public class GltfSaveOptions extends SaveOptions
Save options for glTF format.
-
-
Constructor Summary
Constructors Constructor Description GltfSaveOptions(FileContentType contentType)
Constructor ofGltfSaveOptions
GltfSaveOptions(FileFormat format)
Constructor ofGltfSaveOptions
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getBufferFile()
The file name of the external buffer file used to store binary data.boolean
getDracoCompression()
Gets whether to enable draco compressionboolean
getEmbedAssets()
Embed all external assets as base64 into single file in ASCII mode, default value is false.java.lang.String
getExternalDracoEncoder()
Use external draco encoder to accelerate the draco compression speed.Vector3
getFallbackNormal()
When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation.boolean
getFlipTexCoordV()
Flip texture coordinate v(t) component, default value is true.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.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.boolean
getPrettyPrint()
The JSON content of GLTF file is indented for human reading, default value is falseboolean
getSaveExtras()
Save scene object's dynamic properties into 'extra' fields in the generated glTF file.boolean
getUseCommonMaterials()
Serialize materials using KHR common material extensions, default value is false.void
setBufferFile(java.lang.String value)
The file name of the external buffer file used to store binary data.void
setDracoCompression(boolean value)
Sets whether to enable draco compressionvoid
setEmbedAssets(boolean value)
Embed all external assets as base64 into single file in ASCII mode, default value is false.void
setExternalDracoEncoder(java.lang.String value)
Use external draco encoder to accelerate the draco compression speed.void
setFallbackNormal(Vector3 value)
When GLTF2 exporter detected an invalid normal, this will be used instead of its original value to bypass the validation.void
setFlipTexCoordV(boolean value)
Flip texture coordinate v(t) component, default value is true.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.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.void
setPrettyPrint(boolean value)
The JSON content of GLTF file is indented for human reading, default value is falsevoid
setSaveExtras(boolean value)
Save scene object's dynamic properties into 'extra' fields in the generated glTF file.void
setUseCommonMaterials(boolean value)
Serialize materials using KHR common material extensions, default value is false.-
Methods inherited from class com.aspose.threed.IOConfig
getEncoding, getFileFormat, getFileName, getFileSystem, getFileSystemFactory, getLookupPaths, lookupForFile, setEncoding, setFileName, setFileSystem, setFileSystemFactory, setLookupPaths
-
-
-
-
Constructor Detail
-
GltfSaveOptions
public GltfSaveOptions(FileContentType contentType)
Constructor ofGltfSaveOptions
- Parameters:
contentType
-
-
GltfSaveOptions
public GltfSaveOptions(FileFormat format)
Constructor ofGltfSaveOptions
- Parameters:
format
-
-
-
Method Detail
-
getPrettyPrint
public boolean getPrettyPrint()
The JSON content of GLTF file is indented for human reading, default value is false
-
setPrettyPrint
public void setPrettyPrint(boolean value)
The JSON content of GLTF file is indented for human reading, default value is false- Parameters:
value
- New value
-
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)
-
setFallbackNormal
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:
value
- New value
-
getEmbedAssets
public boolean getEmbedAssets()
Embed all external assets as base64 into single file in ASCII mode, default value is false.
-
setEmbedAssets
public void setEmbedAssets(boolean value)
Embed all external assets as base64 into single file in ASCII mode, default value is false.- Parameters:
value
- New value
-
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 isGltfEmbeddedImageFormat.PNG
-
setImageFormat
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 isGltfEmbeddedImageFormat.PNG
- Parameters:
value
- New value
-
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.
-
setMaterialConverter
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:
value
- New value
-
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 ifgetExportShaders()
-
setUseCommonMaterials
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 ifgetExportShaders()
- Parameters:
value
- New value
-
getExternalDracoEncoder
public java.lang.String getExternalDracoEncoder()
Use external draco encoder to accelerate the draco compression speed.
-
setExternalDracoEncoder
public void setExternalDracoEncoder(java.lang.String value)
Use external draco encoder to accelerate the draco compression speed.- Parameters:
value
- New value
-
getFlipTexCoordV
public boolean getFlipTexCoordV()
Flip texture coordinate v(t) component, default value is true.
-
setFlipTexCoordV
public void setFlipTexCoordV(boolean value)
Flip texture coordinate v(t) component, default value is true.- Parameters:
value
- New value
-
getBufferFile
public java.lang.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.
-
setBufferFile
public void setBufferFile(java.lang.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:
value
- New value
-
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.
-
setSaveExtras
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:
value
- New value
-
getDracoCompression
public boolean getDracoCompression()
Gets whether to enable draco compression
-
setDracoCompression
public void setDracoCompression(boolean value)
Sets whether to enable draco compression- Parameters:
value
- New value
-
-