Blender
V2.93
source
blender
blenkernel
BKE_mesh_fair.h
Go to the documentation of this file.
1
/*
2
* This program is free software; you can redistribute it and/or
3
* modify it under the terms of the GNU General Public License
4
* as published by the Free Software Foundation; either version 2
5
* of the License, or (at your option) any later version.
6
*
7
* This program is distributed in the hope that it will be useful,
8
* but WITHOUT ANY WARRANTY; without even the implied warranty of
9
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10
* GNU General Public License for more details.
11
*
12
* You should have received a copy of the GNU General Public License
13
* along with this program; if not, write to the Free Software Foundation,
14
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15
*
16
* Mesh Fairing algorithm designed by Brett Fedack, used in the addon "Mesh Fairing":
17
* https://github.com/fedackb/mesh-fairing.
18
*/
19
20
#pragma once
21
26
#include "
BLI_utildefines.h
"
27
28
#ifdef __cplusplus
29
extern
"C"
{
30
#endif
31
32
/* Mesh Fairing. */
33
/* Creates a smooth as possible geometry patch in a defined area. Different values of depth allow
34
* to minimize changes in the vertex positions or tangency in the affected area. */
35
36
typedef
enum
eMeshFairingDepth
{
37
MESH_FAIRING_DEPTH_POSITION
= 1,
38
MESH_FAIRING_DEPTH_TANGENCY
= 2,
39
}
eMeshFairingDepth
;
40
41
/* affect_vertices is used to define the fairing area. Indexed by vertex index, set to true when
42
* the vertex should be modified by fairing. */
43
void
BKE_bmesh_prefair_and_fair_vertices
(
struct
BMesh
*
bm
,
44
bool
*affect_vertices,
45
const
eMeshFairingDepth
depth);
46
47
/* This function can optionally use the MVert coordinates of deform_mverts to read and write the
48
* fairing result. When NULL, the function will use mesh->mverts directly. */
49
void
BKE_mesh_prefair_and_fair_vertices
(
struct
Mesh
*
mesh
,
50
struct
MVert
*deform_mverts,
51
bool
*affect_vertices,
52
const
eMeshFairingDepth
depth);
53
54
#ifdef __cplusplus
55
}
56
#endif
BKE_mesh_prefair_and_fair_vertices
void BKE_mesh_prefair_and_fair_vertices(struct Mesh *mesh, struct MVert *deform_mverts, bool *affect_vertices, const eMeshFairingDepth depth)
Definition:
mesh_fair.cc:486
eMeshFairingDepth
eMeshFairingDepth
Definition:
BKE_mesh_fair.h:36
MESH_FAIRING_DEPTH_POSITION
@ MESH_FAIRING_DEPTH_POSITION
Definition:
BKE_mesh_fair.h:37
MESH_FAIRING_DEPTH_TANGENCY
@ MESH_FAIRING_DEPTH_TANGENCY
Definition:
BKE_mesh_fair.h:38
BKE_bmesh_prefair_and_fair_vertices
void BKE_bmesh_prefair_and_fair_vertices(struct BMesh *bm, bool *affect_vertices, const eMeshFairingDepth depth)
Definition:
mesh_fair.cc:496
BLI_utildefines.h
bm
ATTR_WARN_UNUSED_RESULT BMesh * bm
Definition:
bmesh_iterators_inline.h:165
mesh
Mesh mesh
Definition:
deg_eval_copy_on_write.cc:119
BMesh
Definition:
bmesh_class.h:296
MVert
Definition:
DNA_meshdata_types.h:42
Mesh
Definition:
DNA_mesh_types.h:132
Generated on Tue Jan 31 2023 14:37:24 for Blender by
doxygen
1.9.1