Crea poligono in mesh
Contents
[
Hide
]
Questa funzione è supportata dalla versione 19.8 o maggiore.
Crea poligono in mesh
Aspose.3D for .NET consente di creare un poligono in una mesh. Per utilizzare la funzionalità, API offre il metodo CreatePolygon
della classe Mesh
. Utilizzando il metodo CreatePolygon è possibile creare un poligono ottimizzato Triangoloo Quad senza allocare memoria extra. Il seguente frammento di codice mostra come utilizzare questa funzionalità.
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); |