Function gamer::getNormal(const SurfaceMesh&, SurfaceMesh::SimplexID<1>)¶
Defined in File SurfaceMesh.h
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\).
- Parameters
mesh – [in] SurfaceMesh of interest.
vertexID – [in] SimplexID of the vertex to get the normal of.
- Returns
Returns the Vector normal to the vertex.