MeshHelper.CalculateNormals Method (Microsoft.Xna.Framework.Content.Pipeline.Graphics)
Generates vertex normals by accumulation of triangle face normals.
Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: MonoGame.Framework.Content.Pipeline (MonoGame.Framework.Content.Pipeline.dll 3.8.0.1082)
Assembly: MonoGame.Framework.Content.Pipeline (MonoGame.Framework.Content.Pipeline.dll 3.8.0.1082)
- C#
- VB
- F#
public static void CalculateNormals( GeometryContent geom, bool overwriteExistingNormals )
Syntax for VB is not yet implemented.
Syntax for F# is not yet implemented.
Parameters
- geom
-
Type: Microsoft.Xna.Framework.Content.Pipeline.Graphics.GeometryContent
The geometry which will recieve the normals.
- overwriteExistingNormals
-
Type: System.Boolean
Overwrite or skip over geometry with existing normals.
We use a "Mean Weighted Equally" method generate vertex normals from triangle
face normals. If normal cannot be calculated from the geometry we set it to zero.
Supported in:
Windows DirectX Desktop
Linux Desktop
Windows DirectX Desktop
Linux Desktop