12#ifndef EASY3D_ALGO_SURFACE_MESH_CURVATURE_H
13#define EASY3D_ALGO_SURFACE_MESH_CURVATURE_H
15#include <easy3d/core/surface_mesh.h>
46 void analyze(
unsigned int post_smoothing_steps = 0);
54 void analyze_tensor(
unsigned int post_smoothing_steps = 0,
bool two_ring_neighborhood =
false);
80 return 0.5f * (min_curvature_[v] + max_curvature_[v]);
89 return min_curvature_[v] * max_curvature_[v];
112 return std::max(fabs(min_curvature_[v]), fabs(max_curvature_[v]));
117 void smooth_curvatures(
unsigned int iterations);
Vertex property of type T.
Definition surface_mesh.h:255
void compute_gauss_curvature()
Definition surface_mesh_curvature.cpp:323
void compute_max_abs_curvature()
Computes the maximum absolute curvature.
Definition surface_mesh_curvature.cpp:331
float min_curvature(SurfaceMesh::Vertex v) const
Returns the minimum (signed) curvature of a given vertex.
Definition surface_mesh_curvature.h:97
SurfaceMeshCurvature(SurfaceMesh *mesh)
Constructor that initializes the curvature analysis with a given mesh.
Definition surface_mesh_curvature.cpp:19
void compute_mean_curvature()
Definition surface_mesh_curvature.cpp:313
float max_abs_curvature(SurfaceMesh::Vertex v) const
Returns the maximum absolute curvature of a given vertex.
Definition surface_mesh_curvature.h:111
float max_curvature(SurfaceMesh::Vertex v) const
Returns the maximum (signed) curvature of a given vertex.
Definition surface_mesh_curvature.h:104
float gauss_curvature(SurfaceMesh::Vertex v) const
Returns the Gaussian curvature of a given vertex.
Definition surface_mesh_curvature.h:88
void analyze(unsigned int post_smoothing_steps=0)
Computes principle curvature information for each vertex.
Definition surface_mesh_curvature.cpp:30
~SurfaceMeshCurvature()
Destructor.
float mean_curvature(SurfaceMesh::Vertex v) const
Returns the mean curvature of a given vertex.
Definition surface_mesh_curvature.h:79
void analyze_tensor(unsigned int post_smoothing_steps=0, bool two_ring_neighborhood=false)
Computes principle curvature information for each vertex using tensor analysis.
Definition surface_mesh_curvature.cpp:122
A halfedge data structure for polygonal meshes of 2-manifold.
Definition surface_mesh.h:51
Definition collider.cpp:182
This type represents a vertex (internally it is basically an index).
Definition surface_mesh.h:135