HalfEdgeMesh.VertexHandle[] AddVertices( Vector3[] positions )

book_4_sparkGenerated
code_blocksInput

Description

The AddVertices method allows you to add multiple vertices to the topology of a PolygonMesh. This method takes an array of Vector3 positions and returns an array of HalfEdgeMesh.VertexHandle objects, which represent the handles to the newly added vertices.

Usage

To use the AddVertices method, you need to have an instance of PolygonMesh. You can then call this method by passing an array of Vector3 positions that you want to add to the mesh. The method will return an array of VertexHandle objects corresponding to each position added.

Example

// Create a new PolygonMesh instance
PolygonMesh mesh = new PolygonMesh();

// Define an array of Vector3 positions
Vector3[] positions = new Vector3[]
{
    new Vector3(0, 0, 0),
    new Vector3(1, 0, 0),
    new Vector3(0, 1, 0)
};

// Add vertices to the mesh
HalfEdgeMesh.VertexHandle[] vertexHandles = mesh.AddVertices(positions);

// vertexHandles now contains handles to the newly added vertices