DracoFormat
Inheritance: java.lang.Object, com.aspose.threed.FileFormat
public class DracoFormat extends FileFormat
Formato Google Draco Esempio: Il codice seguente mostra come codificare e decodificare una Mesh da/a un array di byte:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into Draco format
byte[] draco = FileFormat.DRACO.encode(mesh);
//decode mesh from Draco format
Mesh decodedMesh = (Mesh)FileFormat.DRACO.decode(draco);
Campi
| Campo | Descrizione |
|---|---|
| AMF | Formato file per la produzione additiva |
| ASE | Formato ASCII di esportazione scena di 3D Studio Max. |
| ASPOSE3D_WEB | Formato Web Aspose.3D. |
| BLENDER | Formato 3D di Blender |
| COLLADA | Formato file Collada |
| DISCREET3DS | Formato file di 3D Studio |
| DRACO | Google Draco Mesh |
| DXF | AutoCAD DXF |
| FBX6100ASCII | Formato file FBX ASCII, con versione 6.1.0 |
| FBX6100_BINARY | Formato file FBX binario, con versione 6.1.0 |
| FBX7200ASCII | Formato file FBX ASCII, con versione 7.2.0 |
| FBX7200_BINARY | Formato file FBX binario, con versione 7.2.0 |
| FBX7300ASCII | Formato file FBX ASCII, con versione 7.3.0 |
| FBX7300_BINARY | Formato file FBX binario, con versione 7.3.0 |
| FBX7400ASCII | Formato file FBX ASCII, con versione 7.4.0 |
| FBX7400_BINARY | Formato file FBX binario, con versione 7.4.0 |
| FBX7500ASCII | Formato file FBX ASCII, con versione 7.5.0 |
| FBX7500_BINARY | Formato file FBX binario, con versione 7.5.0 |
| FBX7600ASCII | Formato file FBX ASCII, con versione 7.6.0 |
| FBX7600_BINARY | Formato file FBX binario, con versione 7.6.0 |
| FBX7700ASCII | Formato file FBX ASCII, con versione 7.7.0 |
| FBX7700_BINARY | Formato file FBX binario, con versione 7.7.0 |
| GLTF | glTF del Khronos Group |
| GLTF2 | glTF del Khronos Group versione 2.0 |
| GLTF2_BINARY | glTF del Khronos Group versione 2.0 |
| GLTF_BINARY | glTF del Khronos Group in formato binario |
| HTML5 | File HTML5 |
| IFC | Modello di dati ISO 16739-1 Industry Foundation Classes. |
| MAYAASCII | Autodesk Maya in formato ASCII |
| MAYA_BINARY | Autodesk Maya in formato binario |
| MICROSOFT3MF | Microsoft 3D Manufacturing Format |
| PCD | File PCL Point Cloud Data in modalità ASCII |
| PCD_BINARY | File PCL Point Cloud Data in modalità binario |
| Formato Portable Document di Adobe | |
| PLY | Polygon File Format o Stanford Triangle Format |
| RVM_BINARY | Modello AVEVA Plant Design Management System in formato binario |
| RVM_TEXT | Modello AVEVA Plant Design Management System in formato testo |
| SIEMENSJT8 | File JT Siemens versione 8 |
| SIEMENSJT9 | File JT Siemens versione 9 |
| STLASCII | Formato file STL ASCII |
| STL_BINARY | Formato file STL binario |
| UNIVERSAL3D | Formato file Universal3D |
| USD | Descrizione Universale della Scena |
| USDA | Descrizione Universale della Scena in formato ASCII. |
| USDZ | Descrizione Universale della Scena compressa |
| VRML | Il Linguaggio di Modellazione per la Realtà Virtuale |
| WAVEFRONTOBJ | Formato file Obj di Wavefront |
| XYZ | File nuvola di punti Xyz |
| X_BINARY | File X DirectX in formato binario |
| X_TEXT | File X DirectX in formato binario |
| ZIP | Archivio Zip che contiene altri formati di file 3d. |
Metodi
| Metodo | Descrizione |
|---|---|
| createLoadOptions() | Crea opzioni di caricamento predefinite per questo formato file |
| createSaveOptions() | Crea opzioni di salvataggio predefinite per questo formato file |
| decode(byte[] data) | Decodifica la nuvola di punti o la mesh dai dati in memoria |
| decode(String fileName) | Decodifica la nuvola di punti o la mesh dal nome file specificato |
| detect(Stream stream, String fileName) | Rileva il formato file dallo stream di dati, il nome del file è opzionale per indovinare i tipi che non hanno intestazione magica. |
| detect(String fileName) | Rileva il formato file dal nome del file, il file deve essere leggibile affinché Aspose.3D possa rilevare il formato file tramite l’intestazione del file. |
| encode(Entity entity) | Codifica l’entità in dati grezzi Draco |
| encode(Entity entity, DracoSaveOptions options) | Codifica l’entità in dati grezzi Draco |
| encode(Entity entity, Stream stream) | Codifica l’entità nello stream specificato |
| encode(Entity entity, Stream stream, DracoSaveOptions options) | Codifica l’entità nello stream specificato |
| encode(Entity entity, String fileName) | Codifica l’entità nel file specificato |
| encode(Entity entity, String fileName, DracoSaveOptions options) | Codifica l’entità nel file specificato |
| equals(Object arg0) | |
| getCanExport() | Restituisce se Aspose.3D supporta l’esportazione della scena al formato file corrente. |
| getCanImport() | Restituisce se Aspose.3D supporta l’importazione della scena dal formato file corrente. |
| getClass() | |
| getContentType() | Restituisce il tipo di contenuto del formato file |
| getExtension() | Restituisce il nome dell’estensione di questo tipo. |
| getExtensions() | Restituisce i nomi delle estensioni di questo tipo. |
| getFileFormatType() | Restituisce il tipo di formato file |
| getFormatByExtension(String extensionName) | Restituisce il formato file preferito dal nome dell’estensione del file. Il nome dell’estensione dovrebbe iniziare con un punto (’.’). |
| getFormats() | Accesso a tutti i formati supportati |
| getVersion() | Restituisce la versione del formato file |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | Formati in stringa |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
AMF
public static final FileFormat AMF
Formato file per la produzione additiva
ASE
public static final FileFormat ASE
Formato ASCII di esportazione scena di 3D Studio Max.
ASPOSE3D_WEB
public static final FileFormat ASPOSE3D_WEB
Formato Web Aspose.3D.
BLENDER
public static final FileFormat BLENDER
Formato 3D di Blender
COLLADA
public static final FileFormat COLLADA
Formato file Collada
DISCREET3DS
public static final FileFormat DISCREET3DS
Formato file di 3D Studio
DRACO
public static final DracoFormat DRACO
Google Draco Mesh
DXF
public static final FileFormat DXF
AutoCAD DXF
FBX6100ASCII
public static final FileFormat FBX6100ASCII
Formato file FBX ASCII, con versione 6.1.0
FBX6100_BINARY
public static final FileFormat FBX6100_BINARY
Formato file FBX binario, con versione 6.1.0
FBX7200ASCII
public static final FileFormat FBX7200ASCII
Formato file FBX ASCII, con versione 7.2.0
FBX7200_BINARY
public static final FileFormat FBX7200_BINARY
Formato file FBX binario, con versione 7.2.0
FBX7300ASCII
public static final FileFormat FBX7300ASCII
Formato file FBX ASCII, con versione 7.3.0
FBX7300_BINARY
public static final FileFormat FBX7300_BINARY
Formato file FBX binario, con versione 7.3.0
FBX7400ASCII
public static final FileFormat FBX7400ASCII
Formato file FBX ASCII, con versione 7.4.0
FBX7400_BINARY
public static final FileFormat FBX7400_BINARY
Formato file FBX binario, con versione 7.4.0
FBX7500ASCII
public static final FileFormat FBX7500ASCII
Formato file FBX ASCII, con versione 7.5.0
FBX7500_BINARY
public static final FileFormat FBX7500_BINARY
Formato file FBX binario, con versione 7.5.0
FBX7600ASCII
public static final FileFormat FBX7600ASCII
Formato file FBX ASCII, con versione 7.6.0
FBX7600_BINARY
public static final FileFormat FBX7600_BINARY
Formato file FBX binario, con versione 7.6.0
FBX7700ASCII
public static final FileFormat FBX7700ASCII
Formato file FBX ASCII, con versione 7.7.0
FBX7700_BINARY
public static final FileFormat FBX7700_BINARY
Formato file FBX binario, con versione 7.7.0
GLTF
public static final FileFormat GLTF
glTF del Khronos Group
GLTF2
public static final FileFormat GLTF2
glTF del Khronos Group versione 2.0
GLTF2_BINARY
public static final FileFormat GLTF2_BINARY
glTF del Khronos Group versione 2.0
GLTF_BINARY
public static final FileFormat GLTF_BINARY
glTF del Khronos Group in formato binario
HTML5
public static final FileFormat HTML5
File HTML5
IFC
public static final FileFormat IFC
Modello di dati ISO 16739-1 Industry Foundation Classes.
MAYAASCII
public static final FileFormat MAYAASCII
Autodesk Maya in formato ASCII
MAYA_BINARY
public static final FileFormat MAYA_BINARY
Autodesk Maya in formato binario
MICROSOFT3MF
public static final Microsoft3MFFormat MICROSOFT3MF
Microsoft 3D Manufacturing Format
PCD
public static final FileFormat PCD
File PCL Point Cloud Data in modalità ASCII
PCD_BINARY
public static final FileFormat PCD_BINARY
File PCL Point Cloud Data in modalità binario
public static final PdfFormat PDF
Formato Portable Document di Adobe
PLY
public static final PlyFormat PLY
Polygon File Format o Stanford Triangle Format
RVM_BINARY
public static final RvmFormat RVM_BINARY
Modello AVEVA Plant Design Management System in formato binario
RVM_TEXT
public static final RvmFormat RVM_TEXT
Modello AVEVA Plant Design Management System in formato testo
SIEMENSJT8
public static final FileFormat SIEMENSJT8
File JT Siemens versione 8
SIEMENSJT9
public static final FileFormat SIEMENSJT9
File JT Siemens versione 9
STLASCII
public static final FileFormat STLASCII
Formato file STL ASCII
STL_BINARY
public static final FileFormat STL_BINARY
Formato file STL binario
UNIVERSAL3D
public static final FileFormat UNIVERSAL3D
Formato file Universal3D
USD
public static final FileFormat USD
Descrizione Universale della Scena
USDA
public static final FileFormat USDA
Descrizione Universale della Scena in formato ASCII.
USDZ
public static final FileFormat USDZ
Descrizione Universale della Scena compressa
VRML
public static final FileFormat VRML
Il Linguaggio di Modellazione per la Realtà Virtuale
WAVEFRONTOBJ
public static final FileFormat WAVEFRONTOBJ
Formato file Obj di Wavefront
XYZ
public static final FileFormat XYZ
File nuvola di punti Xyz
X_BINARY
public static final FileFormat X_BINARY
File X DirectX in formato binario
X_TEXT
public static final FileFormat X_TEXT
File X DirectX in formato binario
ZIP
public static final FileFormat ZIP
Archivio Zip che contiene altri formati di file 3d.
createLoadOptions()
public LoadOptions createLoadOptions()
Crea opzioni di caricamento predefinite per questo formato file
Returns: LoadOptions - A default load option for current format
createSaveOptions()
public SaveOptions createSaveOptions()
Crea opzioni di salvataggio predefinite per questo formato file
Returns: SaveOptions - A default save option for current format
decode(byte[] data)
public Geometry decode(byte[] data)
Decodifica la nuvola di punti o la mesh dai dati in memoria
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| dati | byte[] | I byte grezzi drc |
Returns: Geometry - A Mesh or PointCloud instance depends on the content
decode(String fileName)
public Geometry decode(String fileName)
Decodifica la nuvola di punti o la mesh dal nome file specificato
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| fileName | java.lang.String | Il nome file contiene il file drc |
Returns: Geometry - A Mesh or PointCloud instance depends on the file content
detect(Stream stream, String fileName)
public static FileFormat detect(Stream stream, String fileName)
Rileva il formato file dallo stream di dati, il nome del file è opzionale per indovinare i tipi che non hanno intestazione magica.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| stream | Stream | Stream contenente dati da rilevare |
| fileName | java.lang.String | Nome file originale dei dati, usato come suggerimento. |
Returns: FileFormat - The FileFormat instance of the detected type or null if failed.
detect(String fileName)
public static FileFormat detect(String fileName)
Rileva il formato file dal nome del file, il file deve essere leggibile affinché Aspose.3D possa rilevare il formato file tramite l’intestazione del file.
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| fileName | java.lang.String | Percorso al file per rilevare il formato file. |
Returns: FileFormat - The FileFormat instance of the detected type or null if failed.
encode(Entity entity)
public byte[] encode(Entity entity)
Codifica l’entità in dati grezzi Draco
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
Returns: byte[] - I dati draco codificati rappresentati in byte Esempio: Il codice seguente mostra come codificare e decodificare una Mesh da/in un array di byte:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into Draco format
byte[] draco = FileFormat.DRACO.encode(mesh);
//decode mesh from Draco format
Mesh decodedMesh = (Mesh)FileFormat.DRACO.decode(draco);
encode(Entity entity, DracoSaveOptions options)
public byte[] encode(Entity entity, DracoSaveOptions options)
Codifica l’entità in dati grezzi Draco
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
| options | DracoSaveOptions | Opzioni extra per la codifica della nuvola di punti |
Returns: byte[] - I dati draco codificati rappresentati in byte Esempio: Il codice seguente mostra come codificare e decodificare una Mesh da/in un array di byte:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into Draco format
byte[] draco = FileFormat.DRACO.encode(mesh);
//decode mesh from Draco format
Mesh decodedMesh = (Mesh)FileFormat.DRACO.decode(draco);
encode(Entity entity, Stream stream)
public void encode(Entity entity, Stream stream)
Codifica l’entità nello stream specificato
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
| stream | Stream | Lo stream su cui verranno scritti i dati codificati |
encode(Entity entity, Stream stream, DracoSaveOptions options)
public void encode(Entity entity, Stream stream, DracoSaveOptions options)
Codifica l’entità nello stream specificato
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
| stream | Stream | Lo stream su cui verranno scritti i dati codificati |
| options | DracoSaveOptions | Opzioni extra per la codifica della nuvola di punti |
encode(Entity entity, String fileName)
public void encode(Entity entity, String fileName)
Codifica l’entità nel file specificato
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
| fileName | java.lang.String | Il nome file da scrivere |
encode(Entity entity, String fileName, DracoSaveOptions options)
public void encode(Entity entity, String fileName, DracoSaveOptions options)
Codifica l’entità nel file specificato
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| entity | Entity | L’entità da codificare |
| fileName | java.lang.String | Il nome file da scrivere |
| options | DracoSaveOptions | Opzioni extra per la codifica della nuvola di punti |
equals(Object arg0)
public boolean equals(Object arg0)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | java.lang.Object |
Returns: boolean
getCanExport()
public boolean getCanExport()
Restituisce se Aspose.3D supporta l’esportazione della scena al formato file corrente.
Returns: boolean - se Aspose.3D supporta l’esportazione della scena nel formato file corrente. Esempio: Il codice seguente mostra come verificare se l’esportazione nel formato specificato è supportata.
var outputFormat = ".glb";
var format = FileFormat.getFormatByExtension(outputFormat);
if (format.getCanExport())
System.out.printf("Can export to %s", outputFormat);
getCanImport()
public boolean getCanImport()
Restituisce se Aspose.3D supporta l’importazione della scena dal formato file corrente.
Returns: boolean - se Aspose.3D supporta l’importazione della scena dal formato file corrente. Esempio: Il codice seguente mostra come verificare se l’importazione dal formato specificato è supportata.
var outputFormat = ".glb";
var format = FileFormat.getFormatByExtension(outputFormat);
if (format.getCanImport())
System.out.printf("Can import from %s", outputFormat);
getClass()
public final native Class<?> getClass()
Returns: java.lang.Class
getContentType()
public FileContentType getContentType()
Restituisce il tipo di contenuto del formato file
Returns: FileContentType - file format content type Example:
var format = FileFormat.MAYA_BINARY;
if (format.getContentType() == FileContentType.BINARY)
System.out.printf("%s is binary format", format);
else
System.out.printf("%s is text-based format", format);
getExtension()
public String getExtension()
Restituisce il nome dell’estensione di questo tipo.
Returns: java.lang.String - il nome dell’estensione di questo tipo. Esempio:
var format = FileFormat.MAYA_BINARY;
System.out.printf("Extension of %s is %s", format, format.getExtension());
getExtensions()
public String[] getExtensions()
Restituisce i nomi delle estensioni di questo tipo.
Returns: java.lang.String[] - i nomi delle estensioni di questo tipo.
getFileFormatType()
public FileFormatType getFileFormatType()
Restituisce il tipo di formato file
Returns: FileFormatType - file format type
getFormatByExtension(String extensionName)
public static FileFormat getFormatByExtension(String extensionName)
Restituisce il formato file preferito dal nome dell’estensione del file. Il nome dell’estensione dovrebbe iniziare con un punto (’.’).
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| extensionName | java.lang.String | Il nome dell’estensione inizia con ‘.’ per la query. |
Returns: FileFormat - Instance of FileFormat, otherwise null returned. Example: The following code shows how to save scene to memory using specified format
Scene scene = new Scene(new Box());
var outputFormat = ".glb";
var format = FileFormat.getFormatByExtension(outputFormat);
var output = new ByteArrayOutputStream();
scene.save(output);
getFormats()
public static List<FileFormat> getFormats()
Accesso a tutti i formati supportati
Returns: java.util.List<com.aspose.threed.FileFormat> - Accesso a tutti i formati supportati
getVersion()
public Version getVersion()
Restituisce la versione del formato file
Returns: Version - file format version
hashCode()
public native int hashCode()
Returns: int
notify()
public final native void notify()
notifyAll()
public final native void notifyAll()
toString()
public String toString()
Formati in stringa
Returns: java.lang.String - Stringa dell’oggetto
wait()
public final void wait()
wait(long arg0)
public final void wait(long arg0)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
| Parametro | Tipo | Descrizione |
|---|---|---|
| arg0 | long | |
| arg1 | int |