Description
The SetVertexPosition
method is used to set the position of a specific vertex in a PolygonMesh
. This method allows you to update the position of a vertex identified by its handle, hVertex
, to a new position specified by the position
parameter.
Usage
To use the SetVertexPosition
method, you need to have a PolygonMesh
instance and a valid VertexHandle
that identifies the vertex you want to move. You also need to specify the new position as a Vector3
object.
Example usage:
PolygonMesh mesh = new PolygonMesh();
HalfEdgeMesh.VertexHandle vertexHandle = mesh.AddVertex(new Vector3(0, 0, 0));
Vector3 newPosition = new Vector3(1, 1, 1);
mesh.SetVertexPosition(vertexHandle, newPosition);
Example
PolygonMesh mesh = new PolygonMesh();
HalfEdgeMesh.VertexHandle vertexHandle = mesh.AddVertex(new Vector3(0, 0, 0));
Vector3 newPosition = new Vector3(1, 1, 1);
mesh.SetVertexPosition(vertexHandle, newPosition);