Sdílet prostřednictvím


MeshHelper.CalculateNormals Method

Note

This method is available only when developing for Windows.

Computes new normals for the specified mesh.

Syntax

'Declaration
Public Shared Sub CalculateNormals ( _
         mesh As MeshContent, _
         overwriteExistingNormals As Boolean _
)
public static void CalculateNormals (
         MeshContent mesh,
         bool overwriteExistingNormals
)
public:
static void CalculateNormals(
         MeshContent mesh,
         bool overwriteExistingNormals
)

Parameters

  • mesh
    Type: MeshContent
    Mesh containing the normals being computed.
  • overwriteExistingNormals
    Type: Boolean
    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.

Requirements

Namespace: Microsoft.Xna.Framework.Content.Pipeline.Graphics

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

See Also

Reference

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

Platforms

Windows 7, Windows Vista, Windows XP