浏览我们的产品

Aspose.3D for Java 19.8发行说明

改进和变更

钥匙摘要类别
THREEDNET-528在Wavefront OBJ中添加点云支持新功能
THREEDNET-531Aspose.3D的安全审查增强
THREEDNET-536 DRC到STL转换失败Bug
THREEDNET-537将PLY转换为GLB的问题Bug
THREEDNET-539大点云可能产生不正确的数据Bug

公共API和向后不兼容的更改

请参阅对公共API所做的任何更改的列表,如添加、重命名、删除或不推荐使用的成员,以及对Aspose.3D for Java所做的任何非向后兼容的更改。如果您对列出的任何更改有疑问,请在Aspose.3D支持论坛

在类com.aspose.threed.ObjSaveOptions中添加了新的getter/setter PointCloud

 /**

 * Gets the flag whether the exporter should export the scene as point cloud(without topological structure), default value is false

 */

public boolean getPointCloud();

/**

 * Sets the flag whether the exporter should export the scene as point cloud(without topological structure), default value is false

 * @param value New value

 */

public void setPointCloud(boolean value);

以obj格式生成球体点云的示例代码。

 Scene scene = new Scene(new Sphere());

ObjSaveOptions opt = new ObjSaveOptions();

opt.setPointCloud(true);

scene.save("sphere.obj", opt);

添加了新方法创建多边形com.aspose.threed.Mesh

 /**

 * Create a polygon with 4 vertices(quad)

 * @param v1 Index of the first vertex

 * @param v2 Index of the second vertex

 * @param v3 Index of the third vertex

 * @param v4 Index of the fourth vertex

 */

public void createPolygon(int v1, int v2, int v3, int v4);

/**

 * Create a polygon with 3 vertices(triangle)

 * @param v1 Index of the first vertex

 * @param v2 Index of the second vertex

 * @param v3 Index of the third vertex

 */

public void createPolygon(int v1, int v2, int v3);

示例代码。

 Mesh mesh = new Mesh();

mesh.createPolygon(new int[]{ 0, 1, 2 }); //The old CreatePolygon needs to create a temporary array for holding the face indices

mesh.createPolygon(0, 1, 2); //The new overloads doesn't need extra allocation, and it's optimized internally.

新增的方法创建多边形允许您创建三角形或四边形,而无需分配额外的内存,它在内部进行了高度优化。

删除了类com.aspose.threed.GLTFSaveOptions中的旧公共字段prettyPrint

已删除,并替换为具有相同名称的属性。

在类com.aspose.threed.GLTFSaveOptions中添加了新的吸气剂/设置器PrettyPrint

 /**

\* The JSON content of GLTF file is indented for human reading, default value is false

*/

public boolean getPrettyPrint();

/**

\* The JSON content of GLTF file is indented for human reading, default value is false

\* @param value New value

*/

public void setPrettyPrint(boolean value);

旧的prettyPrint是一个公共字段,它已经被属性替换为一致。

示例代码。

 Scene scene = new Scene(new Sphere());

GLTFSaveOptions opt = new GLTFSaveOptions(FileFormat.GLTF2);

//opt.prettyPrint = true; //Old code

opt.setPrettyPrint(true); //Use setter to change this configuration.

scene.save("sphere.gltf", opt);


 
 简体中文