# Function gamer::getNormal(const SurfaceMesh&, SurfaceMesh::SimplexID<1>)¶

## Function Documentation¶

Vector gamer::getNormal(const SurfaceMesh &mesh, SurfaceMesh::SimplexID<1> vertexID)

Gets the normal of a vertex.

The vertex normal is defined as the mean of incident triangle normals as follows, $$\mathbf{n} = \frac{1}{N} \sum_{i=0}^{N, \textrm{incident triangle}}n_t$$. where $$\mathbf{n}$$ is the vertex normal, $$N$$ is the number of incident faces, and $$n_i$$ is the normal of incident triangle $$i$$.

Return

Returns the Vector normal to the vertex.

Parameters
• [in] mesh: SurfaceMesh of interest.

• [in] vertexID: SimplexID of the vertex to get the normal of.