Adds a new vertex to the PolygonMesh
at the specified position.
Adds a new vertex to the PolygonMesh
at the specified position.
To add a vertex to a PolygonMesh
, call the AddVertex
method with a Vector3
representing the position where the vertex should be added. The method returns a HalfEdgeMesh.VertexHandle
which can be used to reference the newly added vertex in subsequent operations.
// Create a new PolygonMesh instance PolygonMesh mesh = new PolygonMesh(); // Define the position for the new vertex Vector3 position = new Vector3(1.0f, 2.0f, 3.0f); // Add the vertex to the mesh HalfEdgeMesh.VertexHandle vertexHandle = mesh.AddVertex(position); // Use the vertex handle for further operations // For example, adding a face using this vertex