PolygonBuilder class
PolygonBuilder class
A helper class to build polygon for Mesh
The PolygonBuilder type exposes the following members:
Constructors
Constructor | Description |
---|---|
init | Initializes a new instance of the PolygonBuilder class. |
Methods
Method | Description |
---|---|
begin | Begins to add a new polygon |
add_vertex | Adds a vertex index to the polygon |
end | Finishes the polygon creation |
Example
from aspose.threed.entities import Mesh, PolygonBuilder
mesh = Mesh()
builder = PolygonBuilder(mesh)
builder.begin()
builder.add_vertex(0)
builder.add_vertex(1)
builder.add_vertex(2)
builder.end()
Equals to :
from aspose.threed.entities import Mesh
mesh = Mesh()
indices = [0, 1, 2]
mesh.create_polygon(indices)
If all indices are ready to use, Mesh.create_polygon
is preferred, otherwise PolygonBuilder
would be a better choice.
See Also
- module
aspose.threed.entities
- class
Mesh
- class
PolygonBuilder