Aspose.3D for Java 19.7 Note di rilascio
Miglioramenti e modifiche
Chiave | Riassunto | Categoria |
---|---|---|
THREEDNET-449 | Problema con i valori di trasformazione nei nodi | Caratteristica |
THREEDNET-526 | Aggiungi supporto per l’esportazione di punti cloud nel Google Draco | Miglioramento |
THREEDNET-524 | Aggiungi il supporto per l’importazione di punti cloud nel Google Draco | Miglioramento |
THREEDNET-523 | Aggiungi supporto point cloud nel formato PLY | Miglioramento |
Pubblico API e modifiche incompatibili arretrate
Vedere l’elenco di eventuali modifiche apportate al pubblico API come membri aggiunti, rinominati, rimossi o deprecati, nonché qualsiasi modifica non retrocompatibile apportata allo Aspose.3D for Java. Se hai dubbi su eventuali modifiche elencate, sollevalo sulForum di supporto Aspose.3D.
Aggiunta nuova classe com.aspose.threed.PointCloud
Questa classe eredita da Aspose.ThreeD. Entità. Geometria direttamente e utilizzata per rappresentare un insieme di punti.
Aggiunti nuovi metodi decodificati a class com.aspose.threed.DracoFormat
/**
* Decode the point cloud or mesh from specified file name
* @param fileName The file name contains the drc file
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance depends on the file content
*/
public Geometry decode(String fileName)
throws ImportException;
/**
* Decode the point cloud or mesh from memory data
* @param data The raw drc bytes
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance depends on the content
*/
public Geometry decode(byte[]data)
throws ImportException;
Codice di esempio per decodificare direttamente una mesh da un file draco senza creare una scena
PointCloud pointCloud = (PointCloud)FileFormat.DRACO.decode("pointCloud.drc");
Aggiunti nuovi metodi codificano per class com.aspose.threed.DracoFormat
/**
* Encode the entity to specified stream
* @param entity The entity to be encoded
* @param stream The stream that encoded data will be written to
* @param options Extra options for encoding the point cloud
*/
public void encode(Entity entity, Stream stream, DracoSaveOptions options)
throws IOException;
/**
* Encode the entity to specified stream
* @param entity The entity to be encoded
* @param stream The stream that encoded data will be written to
*/
public void encode(Entity entity, Stream stream)
throws IOException;
/**
* Encode the entity to specified file
* @param entity The entity to be encoded
* @param fileName The file name to be written
*/
public void encode(Entity entity, String fileName)
throws IOException;
/**
* Encode the entity to Draco raw data
* @param entity The entity to be encoded
* @param options Extra options for encoding the point cloud
* @return The encoded draco data represented in bytes
*/
public byte[]encode(Entity entity, DracoSaveOptions options);
/**
* Encode the entity to Draco raw data
* @param entity The entity to be encoded
* @return The encoded draco data represented in bytes
*/
public byte[]encode(Entity entity);
Codice di esempio per codificare direttamente una mesh sfera in file draco senza costruire una scena
FileFormat.DRACO.encode(new Sphere(), "sphere.drc");
Aggiunto nuovo getter/setter getPointCloud/setPointCloud a class com.aspose.threed.DracoSaveOptions
/**
* Export the scene as point cloud, default value is false.
*/
public boolean getPointCloud();
/**
* Export the scene as point cloud, default value is false.
* @param value New value
*/
public void setPointCloud(boolean value);
Codice di esempio per codificare una mesh a sfera in file draco come nuvola di punti
DracoSaveOptions opt = new DracoSaveOptions();
opt.setPointCloud(true);
FileFormat.DRACO.encode(new Sphere(), "sphere.drc", opt);
Aggiunti nuovi metodi codificano per class com.aspose.threed.PlyFormat
/**
* Encode the entity and save the result into the stream.
* @param entity The entity to encode
* @param stream The stream to write to, this method will not close this stream
* @param opt Save options
*/
public void encode(Entity entity, Stream stream, PlySaveOptions opt)
throws IOException;
/**
* Encode the entity and save the result into the stream.
* @param entity The entity to encode
* @param stream The stream to write to, this method will not close this stream
*/
public void encode(Entity entity, Stream stream)
throws IOException;
/**
* Encode the entity and save the result into an external file.
* @param entity The entity to encode
* @param fileName The file to write to
* @param opt Save options
*/
public void encode(Entity entity, String fileName, PlySaveOptions opt)
throws IOException;
/**
* Encode the entity and save the result into an external file.
* @param entity The entity to encode
* @param fileName The file to write to
*/
public void encode(Entity entity, String fileName)
throws IOException;
Codice di esempio per codificare una mesh per inserire direttamente il file senza creare una scena.
FileFormat.PLY.encode(new Sphere(), "sphere.ply");
Aggiunti nuovi metodi decodificano a class com.aspose.threed.PlyFormat
/**
* Decode a point cloud or mesh from the specified stream.
* @param fileName The input stream
* @param opt The load option of PLY format
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance
*/
public Geometry decode(String fileName, PlyLoadOptions opt)
throws IOException;
/**
* Decode a point cloud or mesh from the specified stream.
* @param fileName The input stream
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance
*/
public Geometry decode(String fileName)
throws IOException;
/**
* Decode a point cloud or mesh from the specified stream.
* @param stream The input stream
* @param opt The load option of PLY format
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance
*/
public Geometry decode(Stream stream, PlyLoadOptions opt)
throws IOException;
/**
* Decode a point cloud or mesh from the specified stream.
* @param stream The input stream
* @return A {@link com.aspose.threed.Mesh} or {@link com.aspose.threed.PointCloud} instance
*/
public Geometry decode(Stream stream)
throws IOException;
Codice di esempio per decodificare una nuvola mesh/point da un file ply:
Geometry geom = FileFormat.PLY.decode("sphere.ply");
Aggiunti getter/setter getPointCloud e setPointCloud a class com.aspose.threed.PlySaveOptions
/**
* Export the scene as point cloud, the default value is false.
*/
public boolean getPointCloud();
/**
* Export the scene as point cloud, the default value is false.
* @param value New value
*/
public void setPointCloud(boolean value);
Codice di esempio per forzare l’esportazione di una scena come nuvola di punti
PlySaveOptions opt = new PlySaveOptions();
opt.setPointCloud(true);
FileFormat.PLY.encode(new Sphere(), "sphere.ply", opt);