create_polygon method
Contents
[
Hide
]create_polygon
Creates a new polygon with all vertices defined in indices
.
To create polygon vertex by vertex, please use PolygonBuilder
.
def create_polygon(self, indices):
...
Parameter | Type | Description |
---|---|---|
indices | list | Array of the polygon indices, each index points to a control point that forms the polygon. |
Example
indices = [0, 1, 2]
mesh.create_polygon(indices)
create_polygon
Creates a new polygon with all vertices defined in indices
.
To create polygon vertex by vertex, please use PolygonBuilder
.
def create_polygon(self, indices, offset, length):
...
Parameter | Type | Description |
---|---|---|
indices | list | Array of the polygon indices, each index points to a control point that forms the polygon. |
offset | int | The offset of the first polygon index |
length | int | The length of the indices |
Example
indices = [0, 1, 2]
mesh.create_polygon(indices)
create_polygon
Create a polygon with 3 vertices(triangle)
def create_polygon(self, v1, v2, v3):
...
Parameter | Type | Description |
---|---|---|
v1 | int | Index of the first vertex |
v2 | int | Index of the second vertex |
v3 | int | Index of the third vertex |
create_polygon
Create a polygon with 4 vertices(quad)
def create_polygon(self, v1, v2, v3, v4):
...
Parameter | Type | Description |
---|---|---|
v1 | int | Index of the first vertex |
v2 | int | Index of the second vertex |
v3 | int | Index of the third vertex |
v4 | int | Index of the fourth vertex |
See Also
- module
aspose.threed.entities
- class
Mesh
- class
PolygonBuilder