GitHub link
Polygon Mesh Processing Library
algorithms

Geometry processing algorithms. More...

Classes

struct  VertexCurvature
 discrete curvature information for a vertex. used for vertex_curvature() More...
 
class  Heap< HeapEntry, HeapInterface >
 A class implementing a heap. More...
 
class  NormalCone
 A class implementing a normal cone. More...
 
class  Quadric
 This class stores a quadric as a symmetric 4x4 matrix. More...
 
class  SurfaceCurvature
 Compute per-vertex curvature (min,max,mean,Gaussian). More...
 
class  SurfaceFactory
 Factory class to generate different types of basic shapes. More...
 
class  SurfaceFairing
 A class for implicitly fairing a surface mesh. More...
 
class  SurfaceFeatures
 Detect and mark feature edges based on boundary or dihedral angle. More...
 
class  SurfaceGeodesic
 Compute geodesic distance from a set of seed vertices. More...
 
class  SurfaceHoleFilling
 Close simple holes. More...
 
class  SurfaceNormals
 A class for computing surface normals. More...
 
class  SurfaceParameterization
 A class for surface parameterization. More...
 
class  SurfaceRemeshing
 A class for uniform and adaptive surface remeshing. More...
 
class  SurfaceSimplification
 Surface mesh simplification based on approximation error and fairness criteria. More...
 
class  SurfaceSmoothing
 A class for Laplacian smoothing. More...
 
class  SurfaceSubdivision
 A class providing surface subdivision algorithms. More...
 
class  SurfaceTriangulation
 Triangulate polygons to get a pure triangle mesh. More...
 
class  TriangleKdTree
 A k-d tree for triangles. More...
 

Functions

Scalar clamp_cot (const Scalar v)
 clamp cotangent values as if angles are in [3, 177] More...
 
Scalar clamp_cos (const Scalar v)
 clamp cosine values as if angles are in [3, 177] More...
 
Scalar angle (const Point &v0, const Point &v1)
 compute angle between two (un-normalized) vectors More...
 
Scalar sin (const Point &v0, const Point &v1)
 compute sine of angle between two (un-normalized) vectors More...
 
Scalar cos (const Point &v0, const Point &v1)
 compute cosine of angle between two (un-normalized) vectors More...
 
Scalar cotan (const Point &v0, const Point &v1)
 compute cotangent of angle between two (un-normalized) vectors More...
 
Scalar triangle_area (const Point &p0, const Point &p1, const Point &p2)
 compute area of a triangle given by three points More...
 
Scalar triangle_area (const SurfaceMesh &mesh, Face f)
 compute area of triangle f More...
 
Scalar surface_area (const SurfaceMesh &mesh)
 Compute the surface area of mesh. More...
 
Scalar volume (const SurfaceMesh &mesh)
 Compute the volume of a mesh. More...
 
Point centroid (const SurfaceMesh &mesh, Face f)
 barycenter/centroid of a face More...
 
Point centroid (const SurfaceMesh &mesh)
 barycenter/centroid of mesh, computed as area-weighted mean of vertices. More...
 
void dual (SurfaceMesh &mesh)
 Compute dual of a mesh. More...
 
double cotan_weight (const SurfaceMesh &mesh, Edge e)
 compute the cotangent weight for edge e More...
 
double voronoi_area (const SurfaceMesh &mesh, Vertex v)
 compute (mixed) Voronoi area of vertex v More...
 
double voronoi_area_barycentric (const SurfaceMesh &mesh, Vertex v)
 compute barycentric Voronoi area of vertex v More...
 
Point laplace (const SurfaceMesh &mesh, Vertex v)
 compute Laplace vector for vertex v (normalized by Voronoi area) More...
 
Scalar angle_sum (const SurfaceMesh &mesh, Vertex v)
 compute the sum of angles around vertex v (used for Gaussian curvature) More...
 
VertexCurvature vertex_curvature (const SurfaceMesh &mesh, Vertex v)
 compute min, max, mean, and Gaussian curvature for vertex v. More...
 
Scalar dist_point_line_segment (const Point &p, const Point &v0, const Point &v1, Point &nearest_point)
 Compute the distance of a point p to a line segment given by points (v0,v1). More...
 
Scalar dist_point_triangle (const Point &p, const Point &v0, const Point &v1, const Point &v2, Point &nearest_point)
 Compute the distance of a point p to the triangle given by points (v0, v1, v2). More...
 

Detailed Description

Geometry processing algorithms.

Function Documentation

◆ angle()

Scalar pmp::angle ( const Point v0,
const Point v1 
)
inline

compute angle between two (un-normalized) vectors

◆ angle_sum()

Scalar angle_sum ( const SurfaceMesh mesh,
Vertex  v 
)

compute the sum of angles around vertex v (used for Gaussian curvature)

◆ centroid() [1/2]

Point centroid ( const SurfaceMesh mesh)

barycenter/centroid of mesh, computed as area-weighted mean of vertices.

assumes triangular faces.

◆ centroid() [2/2]

Point centroid ( const SurfaceMesh mesh,
Face  f 
)

barycenter/centroid of a face

◆ clamp_cos()

Scalar pmp::clamp_cos ( const Scalar  v)
inline

clamp cosine values as if angles are in [3, 177]

◆ clamp_cot()

Scalar pmp::clamp_cot ( const Scalar  v)
inline

clamp cotangent values as if angles are in [3, 177]

◆ cos()

Scalar pmp::cos ( const Point v0,
const Point v1 
)
inline

compute cosine of angle between two (un-normalized) vectors

◆ cotan()

Scalar pmp::cotan ( const Point v0,
const Point v1 
)
inline

compute cotangent of angle between two (un-normalized) vectors

◆ cotan_weight()

double cotan_weight ( const SurfaceMesh mesh,
Edge  e 
)

compute the cotangent weight for edge e

◆ dist_point_line_segment()

Scalar dist_point_line_segment ( const Point p,
const Point v0,
const Point v1,
Point nearest_point 
)

Compute the distance of a point p to a line segment given by points (v0,v1).

◆ dist_point_triangle()

Scalar dist_point_triangle ( const Point p,
const Point v0,
const Point v1,
const Point v2,
Point nearest_point 
)

Compute the distance of a point p to the triangle given by points (v0, v1, v2).

◆ dual()

void dual ( SurfaceMesh mesh)

Compute dual of a mesh.

Warning
Changes the mesh in place. All properties are cleared.

◆ laplace()

Point laplace ( const SurfaceMesh mesh,
Vertex  v 
)

compute Laplace vector for vertex v (normalized by Voronoi area)

◆ sin()

Scalar pmp::sin ( const Point v0,
const Point v1 
)
inline

compute sine of angle between two (un-normalized) vectors

◆ surface_area()

Scalar surface_area ( const SurfaceMesh mesh)

Compute the surface area of mesh.

Precondition
Input mesh needs to be a pure triangle mesh.

◆ triangle_area() [1/2]

Scalar triangle_area ( const Point p0,
const Point p1,
const Point p2 
)

compute area of a triangle given by three points

◆ triangle_area() [2/2]

Scalar triangle_area ( const SurfaceMesh mesh,
Face  f 
)

compute area of triangle f

◆ vertex_curvature()

VertexCurvature vertex_curvature ( const SurfaceMesh mesh,
Vertex  v 
)

compute min, max, mean, and Gaussian curvature for vertex v.

this will not give reliable values for boundary vertices.

◆ volume()

Scalar volume ( const SurfaceMesh mesh)

Compute the volume of a mesh.

See [21] for details.

Precondition
Input mesh needs to be a pure triangle mesh.
Exceptions
InvalidInputExceptionif the input precondition is violated.

◆ voronoi_area()

double voronoi_area ( const SurfaceMesh mesh,
Vertex  v 
)

compute (mixed) Voronoi area of vertex v

◆ voronoi_area_barycentric()

double voronoi_area_barycentric ( const SurfaceMesh mesh,
Vertex  v 
)

compute barycentric Voronoi area of vertex v