book_4_sparkGenerated
code_blocksInput

Description

The GetEdgeSmoothing method retrieves the smoothing mode of a specified edge in a polygon mesh. This method is useful for determining how smooth or sharp an edge should appear in the mesh, which can affect the visual appearance of the model when rendered.

Usage

To use the GetEdgeSmoothing method, you need to have a HalfEdgeMesh.HalfEdgeHandle that represents the edge whose smoothing mode you want to retrieve. Call this method on an instance of PolygonMesh and pass the edge handle as a parameter.

Example

// Assume 'polygonMesh' is an instance of PolygonMesh
// and 'edgeHandle' is a valid HalfEdgeMesh.HalfEdgeHandle

Sandbox.PolygonMesh.EdgeSmoothMode smoothingMode = polygonMesh.GetEdgeSmoothing(edgeHandle);

// Use the smoothingMode as needed, for example:
if (smoothingMode == Sandbox.PolygonMesh.EdgeSmoothMode.Smooth)
{
    // Handle smooth edge case
}
else if (smoothingMode == Sandbox.PolygonMesh.EdgeSmoothMode.Sharp)
{
    // Handle sharp edge case
}