# NewtonMeshCalculateVertexNormals

## Contents

## NewtonMeshCalculateVertexNormals

void NewtonMeshCalculateVertexNormals (const NewtonMesh* mesh, dFloat angleInRadians);

## Usage

Generates normal vectors for the vertices in the mesh primitive.

## Parameters

- const NewtonMesh* mesh - is the pointer to the mesh primitive.
- dFloat angleInRadians - this is a threshold value that specifies when a vertex belonging to multiple face has to have more separate normals.

## Return

- Nothing.

## Description

Generates normal vectors for the vertices in the mesh primitive.

If a vertex belongs to more than one triangle (which is usually true for closed geometries), Newton will check how big is the angle between the surface normals of these faces. If this angle is smaller than the given threshold value in radians then the vertex will have one common normal vector which will be calculated as the average of the surface normals of the faces that the vertex belongs to. If this angle is larger than the threshold value, the vertex will have separate normal vectors for each face. This possibly means duplication of vertex data.

## Remarks

- Added in Newton 2.0