Easy3D 2.5.3
surface_mesh_fairing.h
1/********************************************************************
2 * Copyright (C) 2020-2021 by Liangliang Nan <liangliang.nan@gmail.com>
3 * Copyright (C) 2011-2020 the Polygon Mesh Processing Library developers.
4 *
5 * The code in this file is adapted from the PMP (Polygon Mesh Processing
6 * Library) with modifications.
7 * https://github.com/pmp-library/pmp-library
8 * The original code was distributed under a MIT-style license, see
9 * https://github.com/pmp-library/pmp-library/blob/master/LICENSE.txt
10 ********************************************************************/
11
12#ifndef EASY3D_ALGO_SURFACE_MESH_FAIRING_H
13#define EASY3D_ALGO_SURFACE_MESH_FAIRING_H
14
15#include <easy3d/core/surface_mesh.h>
16#include <map>
17
18namespace easy3d {
19
27 public:
30
31 // destructor
33
35 void minimize_area() { fair(1); }
36
38 void minimize_curvature() { fair(2); }
39
41 void fair(unsigned int k = 2);
42
43 private:
44 void setup_matrix_row(SurfaceMesh::Vertex v, SurfaceMesh::VertexProperty<double> vweight,
46 unsigned int laplace_degree,
47 std::map<SurfaceMesh::Vertex, double> &row);
48
49 private:
50 SurfaceMesh *mesh_;
51
52 // property handles
59 };
60
61
62} // namespace easy3d
63
64#endif // EASY3D_ALGO_SURFACE_MESH_FAIRING_H
A class for implicitly fairing a surface mesh.See the following paper for more details:
Definition: surface_mesh_fairing.h:26
void minimize_curvature()
minimize surface curvature (class SurfaceFairing::fair(2))
Definition: surface_mesh_fairing.h:38
void fair(unsigned int k=2)
compute surface by solving k-harmonic equation
Definition: surface_mesh_fairing.cpp:52
void minimize_area()
minimize surface area (class SurfaceFairing::fair(1))
Definition: surface_mesh_fairing.h:35
SurfaceMeshFairing(SurfaceMesh *mesh)
Construct with mesh to be processed.
Definition: surface_mesh_fairing.cpp:30
A halfedge data structure for polygonal meshes of 2-manifold.
Definition: surface_mesh.h:52
Definition: collider.cpp:182
Definition: surface_mesh.h:104