pmp-library  1.0

A class for computing surface normals. More...

#include <pmp/algorithms/SurfaceNormals.h>

Static Public Member Functions

static void compute_vertex_normals (SurfaceMesh &mesh)
 Compute vertex normals for the whole mesh. More...
 
static void compute_face_normals (SurfaceMesh &mesh)
 Compute face normals for the whole mesh. More...
 
static Normal compute_vertex_normal (const SurfaceMesh &mesh, Vertex v)
 Compute the normal vector of vertex v.
 
static Normal compute_face_normal (const SurfaceMesh &mesh, Face f)
 Compute the normal vector of face f.
 
static Normal compute_corner_normal (const SurfaceMesh &mesh, Halfedge h, Scalar crease_angle)
 Compute the normal vector of the polygon corner specified by the target vertex of halfedge h. More...
 

Detailed Description

A class for computing surface normals.

This class provides a set of static functions for computing surface normal information, either

The convenience functions compute_vertex_normals() and compute_face_normals() compute the normals for the whole mesh and add a corresponding vertex or face property.

Member Function Documentation

Normal compute_corner_normal ( const SurfaceMesh mesh,
Halfedge  h,
Scalar  crease_angle 
)
static

Compute the normal vector of the polygon corner specified by the target vertex of halfedge h.

Averages incident corner normals if they are within crease_angle of the face normal. crease_angle is in radians, not degrees.

void compute_face_normals ( SurfaceMesh mesh)
static

Compute face normals for the whole mesh.

Calls compute_face_normal() for each face and adds a new face property of type Normal named "f:normal".

void compute_vertex_normals ( SurfaceMesh mesh)
static

Compute vertex normals for the whole mesh.

Calls compute_vertex_normal() for each vertex and adds a new vertex property of type Normal named "v:normal".