PlyFormat
Inheritance: java.lang.Object, com.aspose.threed.FileFormat
public class PlyFormat extends FileFormat
PLY‑formatet. Example: Följande kod visar hur man avkodar ett mesh från en PLY‑fil:
//Generate a test file for decoding
FileFormat.PLY.encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")
Fält
| Fält | Beskrivning |
|---|---|
| AMF | Additiv tillverkningsfilformat |
| ASE | 3D Studio Maxs ASCII‑scenexportformat. |
| ASPOSE3D_WEB | Aspose.3D Web-format. |
| BLENDER | Blenders 3D‑filformat |
| COLLADA | Collada‑filformat |
| DISCREET3DS | 3D Studios filformat |
| DRACO | Google Draco Mesh |
| DXF | AutoCAD DXF |
| FBX6100ASCII | ASCII FBX‑filformat, med version 6.1.0 |
| FBX6100_BINARY | Binärt FBX‑filformat, med version 6.1.0 |
| FBX7200ASCII | ASCII FBX‑filformat, med version 7.2.0 |
| FBX7200_BINARY | Binärt FBX‑filformat, med version 7.2.0 |
| FBX7300ASCII | ASCII FBX‑filformat, med version 7.3.0 |
| FBX7300_BINARY | Binärt FBX‑filformat, med version 7.3.0 |
| FBX7400ASCII | ASCII FBX‑filformat, med version 7.4.0 |
| FBX7400_BINARY | Binärt FBX‑filformat, med version 7.4.0 |
| FBX7500ASCII | ASCII FBX-filformat, med version 7.5.0 |
| FBX7500_BINARY | Binärt FBX-filformat, med version 7.5.0 |
| FBX7600ASCII | ASCII FBX-filformat, med version 7.6.0 |
| FBX7600_BINARY | Binärt FBX-filformat, med version 7.6.0 |
| FBX7700ASCII | ASCII FBX-filformat, med version 7.7.0 |
| FBX7700_BINARY | Binärt FBX-filformat, med version 7.7.0 |
| GLTF | Khronos Groups glTF |
| GLTF2 | Khronos Groups glTF version 2.0 |
| GLTF2_BINARY | Khronos Groups glTF version 2.0 |
| GLTF_BINARY | Khronos Groups glTF i binärt format |
| HTML5 | HTML5-fil |
| IFC | ISO 16739-1 Industry Foundation Classes datamodell. |
| MAYAASCII | Autodesk Maya i ASCII-format |
| MAYA_BINARY | Autodesk Maya i binärt format |
| MICROSOFT3MF | Microsoft 3D Manufacturing Format |
| PCD | PCL Point Cloud Data-fil i ASCII-läge |
| PCD_BINARY | PCL Point Cloud Data-fil i binärt läge |
| Adobes Portable Document Format | |
| PLY | Polygon File Format eller Stanford Triangle Format |
| RVM_BINARY | AVEVA Plant Design Management System-modell i binärt format |
| RVM_TEXT | AVEVA Plant Design Management System-modell i textformat |
| SIEMENSJT8 | Siemens JT-fil version 8 |
| SIEMENSJT9 | Siemens JT-fil version 9 |
| STLASCII | ASCII STL-filformat |
| STL_BINARY | Binärt STL-filformat |
| UNIVERSAL3D | Universal3D-filformat |
| USD | Universell scenbeskrivning |
| USDA | Universell scenbeskrivning i ASCII-format. |
| USDZ | Komprimerad universell scenbeskrivning |
| VRML | Det Virtual Reality Modeling Language |
| WAVEFRONTOBJ | Wavefronts Obj-filformat |
| XYZ | Xyz-punktmolnfil |
| X_BINARY | DirectX X File i binärt format |
| X_TEXT | DirectX X File i binärt format |
| ZIP | Zip-arkiv som innehåller andra 3D-filformat. |
Metoder
| Metod | Beskrivning |
|---|---|
| createLoadOptions() | Skapa standardläsalternativ för detta filformat |
| createSaveOptions() | Skapa standardsparalternativ för detta filformat |
| decode(Stream stream) | Avkoda ett punktmoln eller mesh från den angivna strömmen. |
| decode(Stream stream, PlyLoadOptions opt) | Avkoda ett punktmoln eller mesh från den angivna strömmen. |
| decode(String fileName) | Avkoda ett punktmoln eller mesh från den angivna strömmen. |
| decode(String fileName, PlyLoadOptions opt) | Avkoda ett punktmoln eller mesh från den angivna strömmen. |
| detect(Stream stream, String fileName) | Detektera filformatet från datastream, filnamn är valfritt för att gissa typer som saknar magisk header. |
| detect(String fileName) | Detektera filformatet från filnamn, filen måste vara läsbar så att Aspose.3D kan detektera filformatet via filhuvud. |
| encode(Entity entity, Stream stream) | Koda enheten och spara resultatet i strömmen. |
| encode(Entity entity, Stream stream, PlySaveOptions opt) | Koda enheten och spara resultatet i strömmen. |
| encode(Entity entity, String fileName) | Koda enheten och spara resultatet i en extern fil. |
| encode(Entity entity, String fileName, PlySaveOptions opt) | Koda enheten och spara resultatet i en extern fil. |
| equals(Object arg0) | |
| getCanExport() | Hämtar om Aspose.3D stöder export av scen till aktuellt filformat. |
| getCanImport() | Hämtar om Aspose.3D stöder import av scen från aktuellt filformat. |
| getClass() | |
| getContentType() | Hämtar filformatets innehållstyp |
| getExtension() | Hämtar filtilläggets namn för denna typ. |
| getExtensions() | Hämtar filtilläggets namn för den här typen. |
| getFileFormatType() | Hämtar filformatstyp |
| getFormatByExtension(String extensionName) | Hämtar det föredragna filformatet från filtilläggets namn. Filtilläggets namn bör börja med en punkt (’.’). |
| getFormats() | Tillgång till alla stödjade format |
| getVersion() | Hämtar filformatversion |
| hashCode() | |
| notify() | |
| notifyAll() | |
| toString() | Format till sträng |
| wait() | |
| wait(long arg0) | |
| wait(long arg0, int arg1) |
AMF
public static final FileFormat AMF
Additiv tillverkningsfilformat
ASE
public static final FileFormat ASE
3D Studio Maxs ASCII‑scenexportformat.
ASPOSE3D_WEB
public static final FileFormat ASPOSE3D_WEB
Aspose.3D Web-format.
BLENDER
public static final FileFormat BLENDER
Blenders 3D‑filformat
COLLADA
public static final FileFormat COLLADA
Collada‑filformat
DISCREET3DS
public static final FileFormat DISCREET3DS
3D Studios filformat
DRACO
public static final DracoFormat DRACO
Google Draco Mesh
DXF
public static final FileFormat DXF
AutoCAD DXF
FBX6100ASCII
public static final FileFormat FBX6100ASCII
ASCII FBX‑filformat, med version 6.1.0
FBX6100_BINARY
public static final FileFormat FBX6100_BINARY
Binärt FBX‑filformat, med version 6.1.0
FBX7200ASCII
public static final FileFormat FBX7200ASCII
ASCII FBX‑filformat, med version 7.2.0
FBX7200_BINARY
public static final FileFormat FBX7200_BINARY
Binärt FBX‑filformat, med version 7.2.0
FBX7300ASCII
public static final FileFormat FBX7300ASCII
ASCII FBX‑filformat, med version 7.3.0
FBX7300_BINARY
public static final FileFormat FBX7300_BINARY
Binärt FBX‑filformat, med version 7.3.0
FBX7400ASCII
public static final FileFormat FBX7400ASCII
ASCII FBX‑filformat, med version 7.4.0
FBX7400_BINARY
public static final FileFormat FBX7400_BINARY
Binärt FBX‑filformat, med version 7.4.0
FBX7500ASCII
public static final FileFormat FBX7500ASCII
ASCII FBX-filformat, med version 7.5.0
FBX7500_BINARY
public static final FileFormat FBX7500_BINARY
Binärt FBX-filformat, med version 7.5.0
FBX7600ASCII
public static final FileFormat FBX7600ASCII
ASCII FBX-filformat, med version 7.6.0
FBX7600_BINARY
public static final FileFormat FBX7600_BINARY
Binärt FBX-filformat, med version 7.6.0
FBX7700ASCII
public static final FileFormat FBX7700ASCII
ASCII FBX-filformat, med version 7.7.0
FBX7700_BINARY
public static final FileFormat FBX7700_BINARY
Binärt FBX-filformat, med version 7.7.0
GLTF
public static final FileFormat GLTF
Khronos Groups glTF
GLTF2
public static final FileFormat GLTF2
Khronos Groups glTF version 2.0
GLTF2_BINARY
public static final FileFormat GLTF2_BINARY
Khronos Groups glTF version 2.0
GLTF_BINARY
public static final FileFormat GLTF_BINARY
Khronos Groups glTF i binärt format
HTML5
public static final FileFormat HTML5
HTML5-fil
IFC
public static final FileFormat IFC
ISO 16739-1 Industry Foundation Classes datamodell.
MAYAASCII
public static final FileFormat MAYAASCII
Autodesk Maya i ASCII-format
MAYA_BINARY
public static final FileFormat MAYA_BINARY
Autodesk Maya i binärt format
MICROSOFT3MF
public static final Microsoft3MFFormat MICROSOFT3MF
Microsoft 3D Manufacturing Format
PCD
public static final FileFormat PCD
PCL Point Cloud Data-fil i ASCII-läge
PCD_BINARY
public static final FileFormat PCD_BINARY
PCL Point Cloud Data-fil i binärt läge
public static final PdfFormat PDF
Adobes Portable Document Format
PLY
public static final PlyFormat PLY
Polygon File Format eller Stanford Triangle Format
RVM_BINARY
public static final RvmFormat RVM_BINARY
AVEVA Plant Design Management System-modell i binärt format
RVM_TEXT
public static final RvmFormat RVM_TEXT
AVEVA Plant Design Management System-modell i textformat
SIEMENSJT8
public static final FileFormat SIEMENSJT8
Siemens JT-fil version 8
SIEMENSJT9
public static final FileFormat SIEMENSJT9
Siemens JT-fil version 9
STLASCII
public static final FileFormat STLASCII
ASCII STL-filformat
STL_BINARY
public static final FileFormat STL_BINARY
Binärt STL-filformat
UNIVERSAL3D
public static final FileFormat UNIVERSAL3D
Universal3D-filformat
USD
public static final FileFormat USD
Universell scenbeskrivning
USDA
public static final FileFormat USDA
Universell scenbeskrivning i ASCII-format.
USDZ
public static final FileFormat USDZ
Komprimerad universell scenbeskrivning
VRML
public static final FileFormat VRML
Det Virtual Reality Modeling Language
WAVEFRONTOBJ
public static final FileFormat WAVEFRONTOBJ
Wavefronts Obj-filformat
XYZ
public static final FileFormat XYZ
Xyz-punktmolnfil
X_BINARY
public static final FileFormat X_BINARY
DirectX X File i binärt format
X_TEXT
public static final FileFormat X_TEXT
DirectX X File i binärt format
ZIP
public static final FileFormat ZIP
Zip-arkiv som innehåller andra 3D-filformat.
createLoadOptions()
public LoadOptions createLoadOptions()
Skapa standardläsalternativ för detta filformat
Returns: LoadOptions - A default load option for current format
createSaveOptions()
public SaveOptions createSaveOptions()
Skapa standardsparalternativ för detta filformat
Returns: SaveOptions - A default save option for current format
decode(Stream stream)
public Geometry decode(Stream stream)
Avkoda ett punktmoln eller mesh från den angivna strömmen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| stream | Stream | Inmatningsströmmen |
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)
Avkoda ett punktmoln eller mesh från den angivna strömmen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| stream | Stream | Inmatningsströmmen |
| opt | PlyLoadOptions | Laddningsalternativet för PLY-formatet |
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)
Avkoda ett punktmoln eller mesh från den angivna strömmen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fileName | java.lang.String | Inmatningsströmmen |
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)
Avkoda ett punktmoln eller mesh från den angivna strömmen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fileName | java.lang.String | Inmatningsströmmen |
| opt | PlyLoadOptions | Laddningsalternativet för PLY-formatet |
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)
Detektera filformatet från datastream, filnamn är valfritt för att gissa typer som saknar magisk header.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| stream | Stream | Ström som innehåller data att detektera |
| fileName | java.lang.String | Ursprungligt filnamn för data, används som ledtråd. |
Returns: FileFormat - The FileFormat instance of the detected type or null if failed.
detect(String fileName)
public static FileFormat detect(String fileName)
Detektera filformatet från filnamn, filen måste vara läsbar så att Aspose.3D kan detektera filformatet via filhuvud.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| fileName | java.lang.String | Sökväg till filen för att detektera filformat. |
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)
Koda enheten och spara resultatet i strömmen.
Parameters:
| Parameter | Typ | Beskrivning |
|---|---|---|
| entity | Entity | Entiteten som ska kodas |
| stream | Stream |
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)
Koda enheten och spara resultatet i strömmen.
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | Entiteten som ska kodas |
| stream | [Stream](../../com.aspose.threed/stream) | Strömmen att skriva till, den här metoden kommer inte att stänga denna ström |
| | opt | [PlySaveOptions](../../com.aspose.threed/plysaveoptions) | Spara alternativ **Exempel:** Följande kod visar hur man kodar ett mesh till en PLY-fil: |
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)
Koda enheten och spara resultatet i en extern fil.
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | Entiteten som ska kodas |
| | fileName | java.lang.String | Filen att skriva till **Exempel:** Följande kod visar hur man kodar ett mesh till en PLY-fil: |
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)
Koda enheten och spara resultatet i en extern fil.
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| entity | [Entity](../../com.aspose.threed/entity) | Entiteten som ska kodas |
| fileName | java.lang.String | Filen att skriva till |
| | opt | [PlySaveOptions](../../com.aspose.threed/plysaveoptions) | Spara alternativ **Exempel:** Följande kod visar hur man kodar ett mesh till en PLY-fil: |
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:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| arg0 | java.lang.Object | |
**Returns:**
boolean
### getCanExport() {#getCanExport--}
public boolean getCanExport()
Hämtar om Aspose.3D stöder export av scen till aktuellt filformat.
**Returns:**
boolean - om Aspose.3D stödjer export av scen till aktuellt filformat. **Example:** Följande kod visar hur man kontrollerar om export till angivet format stöds.
var outputFormat = “.glb”; var format = FileFormat.getFormatByExtension(outputFormat); if (format.getCanExport()) System.out.printf(“Can export to %s”, outputFormat);
### getCanImport() {#getCanImport--}
public boolean getCanImport()
Hämtar om Aspose.3D stöder import av scen från aktuellt filformat.
**Returns:**
boolean - om Aspose.3D stödjer import av scen från aktuellt filformat. **Example:** Följande kod visar hur man kontrollerar om import från angivet format stöds.
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()
Hämtar filformatets innehållstyp
**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()
Hämtar filtilläggets namn för denna typ.
**Returns:**
java.lang.String - filnamnstillägget för denna typ. **Example:**
var format = FileFormat.MAYA_BINARY; System.out.printf(“Extension of %s is %s”, format, format.getExtension());
### getExtensions() {#getExtensions--}
public String[] getExtensions()
Hämtar filtilläggets namn för den här typen.
**Returns:**
java.lang.String[] - filnamnstilläggen för denna typ.
### getFileFormatType() {#getFileFormatType--}
public FileFormatType getFileFormatType()
Hämtar filformatstyp
**Returns:**
[FileFormatType](../../com.aspose.threed/fileformattype) - file format type
### getFormatByExtension(String extensionName) {#getFormatByExtension-java.lang.String-}
public static FileFormat getFormatByExtension(String extensionName)
Hämtar det föredragna filformatet från filtilläggets namn. Filtilläggets namn bör börja med en punkt ('.').
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| extensionName | java.lang.String | Filnamnstillägget börjar med '.' för att sökas. |
**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
Tillgång till alla stödjade format
**Returns:**
java.util.List<com.aspose.threed.FileFormat> - Åtkomst till alla stödjade format
### getVersion() {#getVersion--}
public Version getVersion()
Hämtar filformatversion
**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()
Format till sträng
**Returns:**
java.lang.String - Objektsträng
### wait() {#wait--}
public final void wait()
### wait(long arg0) {#wait-long-}
public final void wait(long arg0)
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| arg0 | long | |
### wait(long arg0, int arg1) {#wait-long-int-}
public final void wait(long arg0, int arg1)
**Parameters:**
| Parameter | Typ | Beskrivning |
| --- | --- | --- |
| arg0 | long | |
| arg1 | int | |