void SetSmoothingAngle( float smoothingAngle )

book_4_sparkGenerated
code_blocksInput

Description

The SetSmoothingAngle method of the PolygonMesh class is used to define the angle threshold for smoothing the edges of a polygon mesh. This method allows you to specify a smoothing angle, which determines how the normals are calculated for the mesh's edges. If the angle between two adjacent faces is less than the specified smoothing angle, the edge will be smoothed, resulting in a softer transition between the faces.

Usage

To use the SetSmoothingAngle method, you need to have an instance of the PolygonMesh class. Call the method with a single parameter, smoothingAngle, which is a float representing the angle in degrees. This angle will be used to determine which edges should be smoothed.

Example

// Create a new PolygonMesh instance
PolygonMesh mesh = new PolygonMesh();

// Set the smoothing angle to 30 degrees
mesh.SetSmoothingAngle(30.0f);