Class SurfaceNormals
Defined in File SurfaceNormals.h
Class Documentation
-
class SurfaceNormals
A class for computing surface normals.
This class provides a set of static functions for computing surface normal information, either
per vertex: compute_vertex_normal()
per face: compute_face_normal()
per corner: compute_corner_normal()
Public Static Functions
-
static void compute_vertex_normals(SurfaceMesh &mesh, bool force_recompute = false)
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”.
-
static void compute_vertex_normals(SurfaceMesh &mesh, const Point &flip_point, bool force_recompute = false)
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”. Normals are flipped to point to
flip_point
-
static void compute_face_normals(SurfaceMesh &mesh, bool force_recompute = false)
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”.
-
static inline Normal compute_vertex_normal(const SurfaceMesh &mesh, Vertex v)
Compute the normal vector of vertex
v.
-
static Normal compute_vertex_normal(const SurfaceMesh &mesh, const VertexConstProperty<Point> &vpoint, Vertex v)
-
static inline Normal compute_vertex_normal(const SurfaceMesh &mesh, const VertexConstProperty<Point> &vpoint, Vertex v, const Point &flip_point)
Compute the normal vector of vertex
v, flipped to point toflip_point.
-
static inline Normal compute_face_normal(const SurfaceMesh &mesh, Face f)
Compute the normal vector of face
f.Normal is computed as (normalized) sum of per-corner cross products of the two incident edges. This corresponds to the normalized vector area in alexa_2011_laplace
-
static Normal compute_face_normal(const SurfaceMesh &mesh, const VertexConstProperty<Point> &vpoint, Face f)
-
static inline 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.Averages incident corner normals if they are within crease_angle of the face normal.
crease_angleis in radians, not degrees.
-
static Normal compute_corner_normal(const SurfaceMesh &mesh, const VertexConstProperty<Point> &vpoint, Halfedge h, Scalar crease_angle)