514 |
s042372 |
1 |
/* ----------------------------------------------------------------------- *
|
572 |
jab |
2 |
* This file is part of GEL, http://www.imm.dtu.dk/GEL
|
|
|
3 |
* Copyright (C) the authors and DTU Informatics
|
|
|
4 |
* For license and list of authors, see ../../doc/intro.pdf
|
514 |
s042372 |
5 |
* ----------------------------------------------------------------------- */
|
|
|
6 |
|
578 |
jab |
7 |
/**
|
|
|
8 |
* @file curvature.h
|
|
|
9 |
* @brief Compute various curvature measures from meshes.
|
|
|
10 |
*/
|
|
|
11 |
|
514 |
s042372 |
12 |
#ifndef __MESHEDIT_CURVATURE_H__
|
|
|
13 |
#define __MESHEDIT_CURVATURE_H__
|
|
|
14 |
|
|
|
15 |
#include <vector>
|
586 |
jab |
16 |
#include "Manifold.h"
|
514 |
s042372 |
17 |
|
|
|
18 |
namespace CGLA
|
|
|
19 |
{
|
|
|
20 |
class Vec3d;
|
646 |
janba |
21 |
class Vec2d;
|
514 |
s042372 |
22 |
class Mat2x2d;
|
|
|
23 |
class Mat3x3d;
|
|
|
24 |
class Ma4x4d;
|
|
|
25 |
}
|
|
|
26 |
|
|
|
27 |
namespace HMesh
|
|
|
28 |
{
|
518 |
s042372 |
29 |
class Manifold;
|
|
|
30 |
template<typename ITEM>
|
|
|
31 |
class VertexAttributeVector;
|
|
|
32 |
|
662 |
janba |
33 |
double mixed_area(const Manifold& m,
|
514 |
s042372 |
34 |
VertexID v);
|
|
|
35 |
|
|
|
36 |
double barycentric_area(const Manifold& m,
|
|
|
37 |
VertexID v);
|
|
|
38 |
|
|
|
39 |
void unnormalized_mean_curvature_normal(const Manifold& m,
|
|
|
40 |
VertexID v,
|
|
|
41 |
CGLA::Vec3d& curv_normal,
|
|
|
42 |
double& w_sum);
|
|
|
43 |
|
|
|
44 |
CGLA::Vec3d mean_curvature_normal( const Manifold& m,
|
|
|
45 |
VertexID v);
|
|
|
46 |
|
|
|
47 |
double sum_curvatures( const Manifold& m,
|
|
|
48 |
VertexAttributeVector<double>& curvature);
|
|
|
49 |
|
|
|
50 |
|
|
|
51 |
double gaussian_curvature_angle_defect( const Manifold& m,
|
|
|
52 |
VertexID v);
|
|
|
53 |
|
|
|
54 |
CGLA::Mat3x3d curvature_tensor( const Manifold& m,
|
|
|
55 |
HalfEdgeID h);
|
|
|
56 |
|
|
|
57 |
CGLA::Mat3x3d curvature_tensor_from_edge( const Manifold& m,
|
|
|
58 |
HalfEdgeID h);
|
|
|
59 |
|
|
|
60 |
|
|
|
61 |
void curvature_tensor_paraboloid( const Manifold& m,
|
|
|
62 |
VertexID v,
|
|
|
63 |
CGLA::Mat2x2d& curv_tensor,
|
|
|
64 |
CGLA::Mat3x3d& frame);
|
|
|
65 |
|
|
|
66 |
void curvature_tensors_from_edges( const Manifold& m,
|
|
|
67 |
VertexAttributeVector<CGLA::Mat3x3d>& curvature_tensors);
|
|
|
68 |
|
|
|
69 |
void smooth_curvature_tensors( const Manifold& m,
|
|
|
70 |
VertexAttributeVector<CGLA::Mat3x3d>& curvature_tensors);
|
|
|
71 |
|
|
|
72 |
void gaussian_curvature_angle_defects( const Manifold& m,
|
|
|
73 |
VertexAttributeVector<double>& curvature,
|
|
|
74 |
int smooth_steps=0);
|
|
|
75 |
|
|
|
76 |
void mean_curvatures( const Manifold& m,
|
|
|
77 |
VertexAttributeVector<double>& curvature,
|
|
|
78 |
int smooth_steps=0);
|
|
|
79 |
|
|
|
80 |
|
|
|
81 |
void curvature_paraboloids( const Manifold& m,
|
|
|
82 |
VertexAttributeVector<CGLA::Vec3d>& min_curv_direction,
|
|
|
83 |
VertexAttributeVector<CGLA::Vec3d>& max_curv_direction,
|
646 |
janba |
84 |
VertexAttributeVector<CGLA::Vec2d>& curvature);
|
514 |
s042372 |
85 |
|
|
|
86 |
|
|
|
87 |
void curvature_from_tensors(const Manifold& m,
|
|
|
88 |
const VertexAttributeVector<CGLA::Mat3x3d>& curvature_tensors,
|
|
|
89 |
VertexAttributeVector<CGLA::Vec3d>& min_curv_direction,
|
|
|
90 |
VertexAttributeVector<CGLA::Vec3d>& max_curv_direction,
|
646 |
janba |
91 |
VertexAttributeVector<CGLA::Vec2d>& curvature);
|
514 |
s042372 |
92 |
|
|
|
93 |
|
|
|
94 |
}
|
|
|
95 |
|
|
|
96 |
#endif
|