Share via


MeshHelper.CalculateNormals Method

Computes new normals for the specified mesh.

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics
Assembly: Microsoft.Xna.Framework.Content.Pipeline (in microsoft.xna.framework.content.pipeline.dll)

Syntax

public static void CalculateNormals (
         MeshContent mesh,
         bool overwriteExistingNormals
)

Parameters

  • mesh
    Mesh containing the normals being computed.
  • overwriteExistingNormals
    true if existing normals are to be discarded; false otherwise. Existing normals are searched for as if they are a vertex data channel (of type Vector3 Structure) with the name VertexChannelNames.Normal.

Remarks

The new normals are stored in vertex data channels (of type Vector3 Structure) with the name VertexChannelNames.Normal.

See Also

Reference

MeshHelper Class
MeshHelper Members
Microsoft.Xna.Framework.Content.Pipeline.Graphics Namespace

Platforms

Windows XP SP2, Windows Vista