public class PlyFormat extends FileFormat
//Generate a test file for decoding
FileFormat.PLY.encode(new Sphere(), "sphere.ply");
//Decode the file
var mesh = (Mesh)FileFormat.PLY.decode("sphere.ply")
AMF, ASE, ASPOSE3D_WEB, BLENDER, COLLADA, DISCREET3DS, DRACO, DXF, FBX6100_BINARY, FBX6100ASCII, FBX7200_BINARY, FBX7200ASCII, FBX7300_BINARY, FBX7300ASCII, FBX7400_BINARY, FBX7400ASCII, FBX7500_BINARY, FBX7500ASCII, FBX7600_BINARY, FBX7600ASCII, FBX7700_BINARY, FBX7700ASCII, GLTF, GLTF_BINARY, GLTF2, GLTF2_BINARY, HTML5, IFC, MAYA_BINARY, MAYAASCII, MICROSOFT3MF, PCD, PCD_BINARY, PDF, PLY, RVM_BINARY, RVM_TEXT, SIEMENSJT8, SIEMENSJT9, STL_BINARY, STLASCII, UNIVERSAL3D, USD, USDA, USDZ, VRML, WAVEFRONTOBJ, X_BINARY, X_TEXT, XYZ, ZIP| Modifier and Type | Method and Description |
|---|---|
Geometry |
decode(Stream stream)
Decode a point cloud or mesh from the specified stream.
|
Geometry |
decode(Stream stream,
PlyLoadOptions opt)
Decode a point cloud or mesh from the specified stream.
|
Geometry |
decode(java.lang.String fileName)
Decode a point cloud or mesh from the specified stream.
|
Geometry |
decode(java.lang.String fileName,
PlyLoadOptions opt)
Decode a point cloud or mesh from the specified stream.
|
void |
encode(Entity entity,
Stream stream)
Encode the entity and save the result into the stream.
|
void |
encode(Entity entity,
Stream stream,
PlySaveOptions opt)
Encode the entity and save the result into the stream.
|
void |
encode(Entity entity,
java.lang.String fileName)
Encode the entity and save the result into an external file.
|
void |
encode(Entity entity,
java.lang.String fileName,
PlySaveOptions opt)
Encode the entity and save the result into an external file.
|
createLoadOptions, createSaveOptions, detect, detect, getCanExport, getCanImport, getContentType, getExtension, getExtensions, getFileFormatType, getFormatByExtension, getFormats, getVersion, toStringpublic void encode(Entity entity, Stream stream) throws java.io.IOException
entity - The entity to encodestream - The stream to write to, this method will not close this stream
Example:
The following code shows how to encode a mesh into PLY file:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into PLY format
FileFormat.PLY.encode(mesh, "sphere.ply");
java.io.IOExceptionpublic void encode(Entity entity, Stream stream, PlySaveOptions opt) throws java.io.IOException
entity - The entity to encodestream - The stream to write to, this method will not close this streamopt - Save options
Example:
The following code shows how to encode a mesh into PLY file:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into PLY format
FileFormat.PLY.encode(mesh, "sphere.ply");
java.io.IOExceptionpublic void encode(Entity entity, java.lang.String fileName) throws java.io.IOException
entity - The entity to encodefileName - The file to write to
Example:
The following code shows how to encode a mesh into PLY file:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into PLY format
FileFormat.PLY.encode(mesh, "sphere.ply");
java.io.IOExceptionpublic void encode(Entity entity, java.lang.String fileName, PlySaveOptions opt) throws java.io.IOException
entity - The entity to encodefileName - The file to write toopt - Save options
Example:
The following code shows how to encode a mesh into PLY file:
Mesh mesh = (new Sphere()).toMesh();
//encode mesh into PLY format
FileFormat.PLY.encode(mesh, "sphere.ply");
java.io.IOExceptionpublic Geometry decode(java.lang.String fileName) throws java.io.IOException
fileName - The input streamMesh 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")
java.io.IOExceptionpublic Geometry decode(java.lang.String fileName, PlyLoadOptions opt) throws java.io.IOException
fileName - The input streamopt - The load option of PLY formatMesh 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")
java.io.IOExceptionpublic Geometry decode(Stream stream) throws java.io.IOException
stream - The input streamMesh 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")
java.io.IOExceptionpublic Geometry decode(Stream stream, PlyLoadOptions opt) throws java.io.IOException
stream - The input streamopt - The load option of PLY formatMesh 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")
java.io.IOException