PlyFormat

Inheritance: java.lang.Object, com.aspose.threed.FileFormat

public class PlyFormat extends FileFormat

Le format PLY. Exemple: Le code suivant montre comment décoder un maillage à partir d’un fichier PLY :

//Generate a test file for decoding
             FileFormat.PLY.encode(new Sphere(), "sphere.ply");
             //Decode the file
             var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")

Champs

ChampDescription
AMFFormat de fichier de fabrication additive
ASEFormat d’exportation de scène ASCII de 3D Studio Max.
ASPOSE3D_WEBFormat Web Aspose.3D.
BLENDERFormat de fichier 3D de Blender
COLLADAFormat de fichier Collada
DISCREET3DSFormat de fichier de 3D Studio
DRACOMaillage Google Draco
DXFAutoCAD DXF
FBX6100ASCIIFormat de fichier FBX ASCII, avec la version 6.1.0
FBX6100_BINARYFormat de fichier FBX binaire, avec la version 6.1.0
FBX7200ASCIIFormat de fichier FBX ASCII, avec la version 7.2.0
FBX7200_BINARYFormat de fichier FBX binaire, avec la version 7.2.0
FBX7300ASCIIFormat de fichier FBX ASCII, avec la version 7.3.0
FBX7300_BINARYFormat de fichier FBX binaire, avec la version 7.3.0
FBX7400ASCIIFormat de fichier FBX ASCII, avec la version 7.4.0
FBX7400_BINARYFormat de fichier FBX binaire, avec la version 7.4.0
FBX7500ASCIIFormat de fichier FBX ASCII, version 7.5.0
FBX7500_BINARYFormat de fichier FBX binaire, version 7.5.0
FBX7600ASCIIFormat de fichier FBX ASCII, version 7.6.0
FBX7600_BINARYFormat de fichier FBX binaire, version 7.6.0
FBX7700ASCIIFormat de fichier FBX ASCII, version 7.7.0
FBX7700_BINARYFormat de fichier FBX binaire, version 7.7.0
GLTFglTF du groupe Khronos
GLTF2glTF du groupe Khronos version 2.0
GLTF2_BINARYglTF du groupe Khronos version 2.0
GLTF_BINARYglTF du groupe Khronos au format binaire
HTML5Fichier HTML5
IFCModèle de données ISO 16739-1 Industry Foundation Classes.
MAYAASCIIAutodesk Maya au format ASCII
MAYA_BINARYAutodesk Maya au format binaire
MICROSOFT3MFFormat de fabrication 3D Microsoft
PCDFichier de données de nuage de points PCL en mode ASCII
PCD_BINARYFichier de données de nuage de points PCL en mode binaire
PDFFormat de document portable d’Adobe
PLYFormat de fichier Polygon ou Format de triangle Stanford
RVM_BINARYModèle du système de gestion de conception d’usine AVEVA au format binaire
RVM_TEXTModèle du système de gestion de conception d’usine AVEVA au format texte
SIEMENSJT8Fichier JT Siemens version 8
SIEMENSJT9Fichier JT Siemens version 9
STLASCIIFormat de fichier STL ASCII
STL_BINARYFormat de fichier STL binaire
UNIVERSAL3DFormat de fichier Universal3D
USDDescription de scène universelle
USDADescription de scène universelle au format ASCII.
USDZDescription de scène universelle compressée
VRMLLe langage de modélisation de réalité virtuelle
WAVEFRONTOBJFormat de fichier Obj de Wavefront
XYZFichier de nuage de points Xyz
X_BINARYFichier X DirectX au format binaire
X_TEXTFichier X DirectX au format binaire
ZIPArchive Zip contenant d’autres formats de fichiers 3D.

Méthodes

MéthodeDescription
createLoadOptions()Créer des options de chargement par défaut pour ce format de fichier
createSaveOptions()Créer des options d’enregistrement par défaut pour ce format de fichier
decode(Stream stream)Décode un nuage de points ou un maillage depuis le flux spécifié.
decode(Stream stream, PlyLoadOptions opt)Décode un nuage de points ou un maillage depuis le flux spécifié.
decode(String fileName)Décode un nuage de points ou un maillage depuis le flux spécifié.
decode(String fileName, PlyLoadOptions opt)Décode un nuage de points ou un maillage depuis le flux spécifié.
detect(Stream stream, String fileName)Détecter le format de fichier à partir du flux de données, le nom de fichier est facultatif pour deviner les types qui n’ont pas d’en-tête magique.
detect(String fileName)Détecter le format de fichier à partir du nom de fichier, le fichier doit être lisible afin qu’Aspose.3D puisse détecter le format de fichier via l’en-tête du fichier.
encode(Entity entity, Stream stream)Encode l’entité et enregistre le résultat dans le flux.
encode(Entity entity, Stream stream, PlySaveOptions opt)Encode l’entité et enregistre le résultat dans le flux.
encode(Entity entity, String fileName)Encode l’entité et enregistre le résultat dans un fichier externe.
encode(Entity entity, String fileName, PlySaveOptions opt)Encode l’entité et enregistre le résultat dans un fichier externe.
equals(Object arg0)
getCanExport()Obtient si Aspose.3D prend en charge l’exportation de la scène vers le format de fichier actuel.
getCanImport()Obtient si Aspose.3D prend en charge l’importation de la scène depuis le format de fichier actuel.
getClass()
getContentType()Obtient le type de contenu du format de fichier
getExtension()Obtient le nom d’extension de ce type.
getExtensions()Obtient les noms d’extension de ce type.
getFileFormatType()Obtient le type de format de fichier
getFormatByExtension(String extensionName)Obtient le format de fichier préféré à partir du nom d’extension. Le nom d’extension doit commencer par un point (’.’).
getFormats()Accès à tous les formats pris en charge
getVersion()Obtient la version du format de fichier
hashCode()
notify()
notifyAll()
toString()Formats en chaîne
wait()
wait(long arg0)
wait(long arg0, int arg1)

AMF

public static final FileFormat AMF

Format de fichier de fabrication additive

ASE

public static final FileFormat ASE

Format d’exportation de scène ASCII de 3D Studio Max.

ASPOSE3D_WEB

public static final FileFormat ASPOSE3D_WEB

Format Web Aspose.3D.

BLENDER

public static final FileFormat BLENDER

Format de fichier 3D de Blender

COLLADA

public static final FileFormat COLLADA

Format de fichier Collada

DISCREET3DS

public static final FileFormat DISCREET3DS

Format de fichier de 3D Studio

DRACO

public static final DracoFormat DRACO

Maillage Google Draco

DXF

public static final FileFormat DXF

AutoCAD DXF

FBX6100ASCII

public static final FileFormat FBX6100ASCII

Format de fichier FBX ASCII, avec la version 6.1.0

FBX6100_BINARY

public static final FileFormat FBX6100_BINARY

Format de fichier FBX binaire, avec la version 6.1.0

FBX7200ASCII

public static final FileFormat FBX7200ASCII

Format de fichier FBX ASCII, avec la version 7.2.0

FBX7200_BINARY

public static final FileFormat FBX7200_BINARY

Format de fichier FBX binaire, avec la version 7.2.0

FBX7300ASCII

public static final FileFormat FBX7300ASCII

Format de fichier FBX ASCII, avec la version 7.3.0

FBX7300_BINARY

public static final FileFormat FBX7300_BINARY

Format de fichier FBX binaire, avec la version 7.3.0

FBX7400ASCII

public static final FileFormat FBX7400ASCII

Format de fichier FBX ASCII, avec la version 7.4.0

FBX7400_BINARY

public static final FileFormat FBX7400_BINARY

Format de fichier FBX binaire, avec la version 7.4.0

FBX7500ASCII

public static final FileFormat FBX7500ASCII

Format de fichier FBX ASCII, version 7.5.0

FBX7500_BINARY

public static final FileFormat FBX7500_BINARY

Format de fichier FBX binaire, version 7.5.0

FBX7600ASCII

public static final FileFormat FBX7600ASCII

Format de fichier FBX ASCII, version 7.6.0

FBX7600_BINARY

public static final FileFormat FBX7600_BINARY

Format de fichier FBX binaire, version 7.6.0

FBX7700ASCII

public static final FileFormat FBX7700ASCII

Format de fichier FBX ASCII, version 7.7.0

FBX7700_BINARY

public static final FileFormat FBX7700_BINARY

Format de fichier FBX binaire, version 7.7.0

GLTF

public static final FileFormat GLTF

glTF du groupe Khronos

GLTF2

public static final FileFormat GLTF2

glTF du groupe Khronos version 2.0

GLTF2_BINARY

public static final FileFormat GLTF2_BINARY

glTF du groupe Khronos version 2.0

GLTF_BINARY

public static final FileFormat GLTF_BINARY

glTF du groupe Khronos au format binaire

HTML5

public static final FileFormat HTML5

Fichier HTML5

IFC

public static final FileFormat IFC

Modèle de données ISO 16739-1 Industry Foundation Classes.

MAYAASCII

public static final FileFormat MAYAASCII

Autodesk Maya au format ASCII

MAYA_BINARY

public static final FileFormat MAYA_BINARY

Autodesk Maya au format binaire

MICROSOFT3MF

public static final Microsoft3MFFormat MICROSOFT3MF

Format de fabrication 3D Microsoft

PCD

public static final FileFormat PCD

Fichier de données de nuage de points PCL en mode ASCII

PCD_BINARY

public static final FileFormat PCD_BINARY

Fichier de données de nuage de points PCL en mode binaire

PDF

public static final PdfFormat PDF

Format de document portable d’Adobe

PLY

public static final PlyFormat PLY

Format de fichier Polygon ou Format de triangle Stanford

RVM_BINARY

public static final RvmFormat RVM_BINARY

Modèle du système de gestion de conception d’usine AVEVA au format binaire

RVM_TEXT

public static final RvmFormat RVM_TEXT

Modèle du système de gestion de conception d’usine AVEVA au format texte

SIEMENSJT8

public static final FileFormat SIEMENSJT8

Fichier JT Siemens version 8

SIEMENSJT9

public static final FileFormat SIEMENSJT9

Fichier JT Siemens version 9

STLASCII

public static final FileFormat STLASCII

Format de fichier STL ASCII

STL_BINARY

public static final FileFormat STL_BINARY

Format de fichier STL binaire

UNIVERSAL3D

public static final FileFormat UNIVERSAL3D

Format de fichier Universal3D

USD

public static final FileFormat USD

Description de scène universelle

USDA

public static final FileFormat USDA

Description de scène universelle au format ASCII.

USDZ

public static final FileFormat USDZ

Description de scène universelle compressée

VRML

public static final FileFormat VRML

Le langage de modélisation de réalité virtuelle

WAVEFRONTOBJ

public static final FileFormat WAVEFRONTOBJ

Format de fichier Obj de Wavefront

XYZ

public static final FileFormat XYZ

Fichier de nuage de points Xyz

X_BINARY

public static final FileFormat X_BINARY

Fichier X DirectX au format binaire

X_TEXT

public static final FileFormat X_TEXT

Fichier X DirectX au format binaire

ZIP

public static final FileFormat ZIP

Archive Zip contenant d’autres formats de fichiers 3D.

createLoadOptions()

public LoadOptions createLoadOptions()

Créer des options de chargement par défaut pour ce format de fichier

Returns: LoadOptions - A default load option for current format

createSaveOptions()

public SaveOptions createSaveOptions()

Créer des options d’enregistrement par défaut pour ce format de fichier

Returns: SaveOptions - A default save option for current format

decode(Stream stream)

public Geometry decode(Stream stream)

Décode un nuage de points ou un maillage depuis le flux spécifié.

Parameters:

ParamètreTypeDescription
streamStreamLe flux d’entrée

Returns: Geometry - A Mesh or PointCloud instance Example: The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
             FileFormat.PLY.encode(new Sphere(), "sphere.ply");
             //Decode the file
             var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")

decode(Stream stream, PlyLoadOptions opt)

public Geometry decode(Stream stream, PlyLoadOptions opt)

Décode un nuage de points ou un maillage depuis le flux spécifié.

Parameters:

ParamètreTypeDescription
streamStreamLe flux d’entrée
optPlyLoadOptionsL’option de chargement du format PLY

Returns: Geometry - A Mesh or PointCloud instance Example: The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
             FileFormat.PLY.encode(new Sphere(), "sphere.ply");
             //Decode the file
             var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")

decode(String fileName)

public Geometry decode(String fileName)

Décode un nuage de points ou un maillage depuis le flux spécifié.

Parameters:

ParamètreTypeDescription
fileNamejava.lang.StringLe flux d’entrée

Returns: Geometry - A Mesh or PointCloud instance Example: The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
             FileFormat.PLY.encode(new Sphere(), "sphere.ply");
             //Decode the file
             var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")

decode(String fileName, PlyLoadOptions opt)

public Geometry decode(String fileName, PlyLoadOptions opt)

Décode un nuage de points ou un maillage depuis le flux spécifié.

Parameters:

ParamètreTypeDescription
fileNamejava.lang.StringLe flux d’entrée
optPlyLoadOptionsL’option de chargement du format PLY

Returns: Geometry - A Mesh or PointCloud instance Example: The following code shows how to decode a mesh from a PLY file:

//Generate a test file for decoding
             FileFormat.PLY.encode(new Sphere(), "sphere.ply");
             //Decode the file
             var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")

detect(Stream stream, String fileName)

public static FileFormat detect(Stream stream, String fileName)

Détecter le format de fichier à partir du flux de données, le nom de fichier est facultatif pour deviner les types qui n’ont pas d’en-tête magique.

Parameters:

ParamètreTypeDescription
streamStreamFlux contenant les données à détecter
fileNamejava.lang.StringNom de fichier original des données, utilisé comme indice.

Returns: FileFormat - The FileFormat instance of the detected type or null if failed.

detect(String fileName)

public static FileFormat detect(String fileName)

Détecter le format de fichier à partir du nom de fichier, le fichier doit être lisible afin qu’Aspose.3D puisse détecter le format de fichier via l’en-tête du fichier.

Parameters:

ParamètreTypeDescription
fileNamejava.lang.StringChemin vers le fichier pour détecter le format de fichier.

Returns: FileFormat - The FileFormat instance of the detected type or null if failed.

encode(Entity entity, Stream stream)

public void encode(Entity entity, Stream stream)

Encode l’entité et enregistre le résultat dans le flux.

Parameters:

ParamètreTypeDescription
entityEntityL’entité à encoder
streamStream
Mesh mesh = (new Sphere()).toMesh();
             //encode mesh into PLY format
             FileFormat.PLY.encode(mesh, "sphere.ply");
``` |

### encode(Entity entity, Stream stream, PlySaveOptions opt) {#encode-com.aspose.threed.Entity-com.aspose.threed.Stream-com.aspose.threed.PlySaveOptions-}

public void encode(Entity entity, Stream stream, PlySaveOptions opt)



Encode l'entité et enregistre le résultat dans le flux.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | L'entité à encoder |
| stream | [Stream](../../com.aspose.threed/stream) | Le flux d'écriture, cette méthode ne fermera pas ce flux |
|  | opt | [PlySaveOptions](../../com.aspose.threed/plysaveoptions) | Options d'enregistrement **Exemple:** Le code suivant montre comment encoder un maillage dans un fichier PLY : |

Mesh mesh = (new Sphere()).toMesh(); //encode mesh into PLY format FileFormat.PLY.encode(mesh, “sphere.ply”);


### encode(Entity entity, String fileName) {#encode-com.aspose.threed.Entity-java.lang.String-}

public void encode(Entity entity, String fileName)



Encode l'entité et enregistre le résultat dans un fichier externe.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | L'entité à encoder |
|  | fileName | java.lang.String | Le fichier d'écriture **Exemple:** Le code suivant montre comment encoder un maillage dans un fichier PLY : |

Mesh mesh = (new Sphere()).toMesh(); //encode mesh into PLY format FileFormat.PLY.encode(mesh, “sphere.ply”);


### encode(Entity entity, String fileName, PlySaveOptions opt) {#encode-com.aspose.threed.Entity-java.lang.String-com.aspose.threed.PlySaveOptions-}

public void encode(Entity entity, String fileName, PlySaveOptions opt)



Encode l'entité et enregistre le résultat dans un fichier externe.

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | L'entité à encoder |
| fileName | java.lang.String | Le fichier d'écriture |
|  | opt | [PlySaveOptions](../../com.aspose.threed/plysaveoptions) | Options d'enregistrement **Exemple:** Le code suivant montre comment encoder un maillage dans un fichier PLY : |

Mesh mesh = (new Sphere()).toMesh(); //encode mesh into PLY format FileFormat.PLY.encode(mesh, “sphere.ply”);


### equals(Object arg0) {#equals-java.lang.Object-}

public boolean equals(Object arg0)





**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| arg0 | java.lang.Object |  |

**Returns:**
boolean
### getCanExport() {#getCanExport--}

public boolean getCanExport()



Obtient si Aspose.3D prend en charge l'exportation de la scène vers le format de fichier actuel.

**Returns:**
booléen - indique si Aspose.3D prend en charge l'exportation de la scène vers le format de fichier actuel. **Exemple:** Le code suivant montre comment vérifier si l'exportation vers le format spécifié est prise en charge.

var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); if (format.getCanExport()) System.out.printf(“Can export to %s”, outputFormat);

### getCanImport() {#getCanImport--}

public boolean getCanImport()



Obtient si Aspose.3D prend en charge l'importation de la scène depuis le format de fichier actuel.

**Returns:**
booléen - indique si Aspose.3D prend en charge l'importation de la scène depuis le format de fichier actuel. **Exemple:** Le code suivant montre comment vérifier si l'importation depuis le format spécifié est prise en charge.

var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); if (format.getCanImport()) System.out.printf(“Can import from %s”, outputFormat);

### getClass() {#getClass--}

public final native Class getClass()





**Returns:**
java.lang.Class<?>
### getContentType() {#getContentType--}

public FileContentType getContentType()



Obtient le type de contenu du format de fichier

**Returns:**
[FileContentType](../../com.aspose.threed/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() {#getExtension--}

public String getExtension()



Obtient le nom d'extension de ce type.

**Returns:**
java.lang.String - le nom d'extension de ce type. **Exemple:**

var format = FileFormat.MAYA_BINARY; System.out.printf(“Extension of %s is %s”, format, format.getExtension());

### getExtensions() {#getExtensions--}

public String[] getExtensions()



Obtient les noms d'extension de ce type.

**Returns:**
java.lang.String[] - les noms d'extension de ce type.
### getFileFormatType() {#getFileFormatType--}

public FileFormatType getFileFormatType()



Obtient le type de format de fichier

**Returns:**
[FileFormatType](../../com.aspose.threed/fileformattype) - file format type
### getFormatByExtension(String extensionName) {#getFormatByExtension-java.lang.String-}

public static FileFormat getFormatByExtension(String extensionName)



Obtient le format de fichier préféré à partir du nom d'extension. Le nom d'extension doit commencer par un point ('.').

**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| extensionName | java.lang.String | Le nom d'extension commence par '.' pour la requête. |

**Returns:**
[FileFormat](../../com.aspose.threed/fileformat) - Instance of [FileFormat](../../com.aspose.threed/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() {#getFormats--}

public static List getFormats()



Accès à tous les formats pris en charge

**Returns:**
java.util.List<com.aspose.threed.FileFormat> - Accès à tous les formats pris en charge
### getVersion() {#getVersion--}

public Version getVersion()



Obtient la version du format de fichier

**Returns:**
[Version](../../com.aspose.threed/version) - file format version
### hashCode() {#hashCode--}

public native int hashCode()





**Returns:**
int
### notify() {#notify--}

public final native void notify()





### notifyAll() {#notifyAll--}

public final native void notifyAll()





### toString() {#toString--}

public String toString()



Formats en chaîne

**Returns:**
java.lang.String - Chaîne d'objet
### wait() {#wait--}

public final void wait()





### wait(long arg0) {#wait-long-}

public final void wait(long arg0)





**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| arg0 | long |  |

### wait(long arg0, int arg1) {#wait-long-int-}

public final void wait(long arg0, int arg1)





**Parameters:**
| Paramètre | Type | Description |
| --- | --- | --- |
| arg0 | long |  |
| arg1 | int |  |