book_4_sparkGenerated
code_blocksInput

Description

The SetEdgeSmoothing method is used to set the smoothing mode of a specific edge in a polygon mesh. This method allows you to define how smooth or sharp an edge should appear, which can affect the visual appearance of the mesh when rendered.

Usage

To use the SetEdgeSmoothing method, you need to provide a handle to the edge you want to modify and the desired smoothing mode. The edge handle is of type HalfEdgeMesh.HalfEdgeHandle, and the smoothing mode is specified using the Sandbox.PolygonMesh.EdgeSmoothMode enumeration.

Example

// Example of using SetEdgeSmoothing

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

// Set the edge to be smooth
polygonMesh.SetEdgeSmoothing(edgeHandle, PolygonMesh.EdgeSmoothMode.Smooth);

// Set the edge to be sharp
polygonMesh.SetEdgeSmoothing(edgeHandle, PolygonMesh.EdgeSmoothMode.Sharp);