12#ifndef EASY3D_ALGO_SURFACE_MESH_GEOMETRY_H
13#define EASY3D_ALGO_SURFACE_MESH_GEOMETRY_H
16#include <easy3d/core/types.h>
17#include <easy3d/core/surface_mesh.h>
30 float triangle_area(
const SurfaceMesh *mesh, SurfaceMesh::Face f);
47 float volume(
const SurfaceMesh *mesh);
55 vec3 centroid(
const SurfaceMesh *mesh, SurfaceMesh::Face f);
70 void dual(SurfaceMesh *mesh);
78 double cotan_weight(
const SurfaceMesh *mesh, SurfaceMesh::Edge e);
86 double voronoi_area(
const SurfaceMesh *mesh, SurfaceMesh::Vertex v);
103 vec3 laplace(
const SurfaceMesh *mesh, SurfaceMesh::Vertex v);
112 double angle_sum(
const SurfaceMesh *mesh, SurfaceMesh::Vertex v);
119 struct VertexCurvature {
A halfedge data structure for polygonal meshes of 2-manifold.
Definition surface_mesh.h:51
Functions for basic geometric computations.
Definition surface_mesh_geometry.cpp:21
double voronoi_area_barycentric(const SurfaceMesh *mesh, SurfaceMesh::Vertex v)
Compute the barycentric Voronoi area of a vertex.
Definition surface_mesh_geometry.cpp:237
vec3 centroid(const SurfaceMesh *mesh, SurfaceMesh::Face f)
Compute the barycenter/centroid of a face.
Definition surface_mesh_geometry.cpp:72
VertexCurvature vertex_curvature(const SurfaceMesh *mesh, SurfaceMesh::Vertex v)
Compute min, max, mean, and Gaussian curvature for a vertex.
Definition surface_mesh_geometry.cpp:313
double voronoi_area(const SurfaceMesh *mesh, SurfaceMesh::Vertex v)
Compute the (mixed) Voronoi area of a vertex.
Definition surface_mesh_geometry.cpp:169
float volume(const SurfaceMesh *mesh)
Compute the volume of a mesh.
Definition surface_mesh_geometry.cpp:46
void dual(SurfaceMesh *mesh)
Compute the dual of a mesh.
Definition surface_mesh_geometry.cpp:100
float triangle_area(const SurfaceMesh *mesh, SurfaceMesh::Face f)
Compute the area of a triangle face in a mesh.
Definition surface_mesh_geometry.cpp:23
vec3 laplace(const SurfaceMesh *mesh, SurfaceMesh::Vertex v)
Compute the Laplace vector for a vertex.
Definition surface_mesh_geometry.cpp:267
float surface_area(const SurfaceMesh *mesh)
Compute the surface area of the mesh.
Definition surface_mesh_geometry.cpp:36
double angle_sum(const SurfaceMesh *mesh, SurfaceMesh::Vertex v)
Compute the sum of angles around a vertex.
Definition surface_mesh_geometry.cpp:288
double cotan_weight(const SurfaceMesh *mesh, SurfaceMesh::Edge e)
Compute the cotangent weight for an edge.
Definition surface_mesh_geometry.cpp:128
Definition collider.cpp:182
Vec< 3, float > vec3
A 3D point/vector of float type.
Definition types.h:44
This type represents a vertex (internally it is basically an index).
Definition surface_mesh.h:135
Discrete curvature information for a vertex.
Definition surface_mesh_geometry.h:119
float max
Maximum curvature.
Definition surface_mesh_geometry.h:124
float mean
Mean curvature.
Definition surface_mesh_geometry.h:122
float min
Minimum curvature.
Definition surface_mesh_geometry.h:125
float gauss
Gaussian curvature.
Definition surface_mesh_geometry.h:123