Crear polígono en malla
Contents
[
Hide
]
Esta característica es compatible con la versión 19,8 o superior.
Crear polígono en malla
Aspose.3D for .NET permite crear un polígono en una malla. Para usar la funcionalidad, el API ofrece el método CreatePolygon
de la clase Mesh
. Usando el método CreatePolygon puede crear un polígono Triánguloo Cuádruple optimizado sin asignar memoria adicional. El siguiente fragmento de código muestra cómo utilizar esta funcionalidad.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// For complete examples and data files, please go to https://github.com/aspose-3d/Aspose.3D-for-.NET | |
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. | |
//Or You can create a polygon using 4 vertices(quad) | |
//mesh.CreatePolygon(0, 1, 2, 3); |