HalfEdgeMesh.VertexHandle[] GetFaceVertices( FaceHandle hFace )

book_4_sparkGenerated
code_blocksInput

Description

The GetFaceVertices method retrieves all vertex handles associated with a specified face in a polygon mesh. This method is useful for accessing the vertices that define a particular face, allowing for operations such as vertex manipulation or analysis.

Usage

To use the GetFaceVertices method, you need to have a HalfEdgeMesh.FaceHandle that represents the face whose vertices you want to retrieve. Pass this handle as a parameter to the method, and it will return an array of HalfEdgeMesh.VertexHandle objects, each representing a vertex of the face.

Example

// Assume 'polygonMesh' is an instance of Sandbox.PolygonMesh
// and 'faceHandle' is a valid HalfEdgeMesh.FaceHandle

HalfEdgeMesh.VertexHandle[] vertexHandles = polygonMesh.GetFaceVertices(faceHandle);

// Iterate through the vertex handles
foreach (var vertexHandle in vertexHandles)
{
    // Perform operations with each vertex handle
    Vector3 vertexPosition = polygonMesh.GetVertexPosition(vertexHandle);
    // Example: Print the vertex position
    // Console.WriteLine(vertexPosition);
}