Mesh.Optimize
Mesh.Optimize method
Optimize the mesh’s memory usage by eliminating duplicated control points
public Mesh Optimize(bool vertexElements)
Parameter | Type | Description |
---|---|---|
vertexElements | Boolean | Optimize duplicated vertex element data |
Return Value
New mesh instance with compact memory usage
Examples
The following code shows how to eliminate duplicated control points from an unoptimized mesh:
//Sphere.ToMesh generates 117 control points
var mesh = (new Sphere()).ToMesh();
//After optimized, there're only 86 control points, polygon indices are also remapped.
var optimized = mesh.Optimize(true);
See Also
- class Mesh
- namespace Aspose.ThreeD.Entities
- assembly Aspose.3D