Description
The SmoothingAngle
property of the MeshComponent
class specifies the angle threshold used to determine whether adjacent polygons should be smoothed together. This property is useful for controlling the appearance of the mesh's surface, particularly in terms of shading and lighting. A lower smoothing angle results in sharper edges, while a higher angle allows for smoother transitions between polygons.
Usage
To use the SmoothingAngle
property, you can get or set its value on an instance of MeshComponent
. Adjusting this value will affect how the mesh is rendered, particularly in terms of how light interacts with the surface.
Example usage:
MeshComponent meshComponent = new MeshComponent();
meshComponent.SmoothingAngle = 45.0f; // Set the smoothing angle to 45 degrees
float currentAngle = meshComponent.SmoothingAngle; // Retrieve the current smoothing angle
Example
MeshComponent meshComponent = new MeshComponent();
meshComponent.SmoothingAngle = 45.0f; // Set the smoothing angle to 45 degrees
float currentAngle = meshComponent.SmoothingAngle; // Retrieve the current smoothing angle