Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Genrich <daniel.genrich@gmx.net>2012-10-24 14:39:11 +0400
committerDaniel Genrich <daniel.genrich@gmx.net>2012-10-24 14:39:11 +0400
commit3ce334e188affdeec3c492408075558e65f8244f (patch)
tree9e851da8755544d56a9b9ff0b0e9fb19904dfe46 /source/blender/bmesh/intern
parentd739536103caada312a3681d106b9cc78af2d1fe (diff)
Merge GSoC project from branch: Laplacian Smooth (Operator & Modifier)
by Alexander Pinzon Fernandez (apinzonf) Supported by Google Summer of Code 2012 Project Documentation: http://wiki.blender.org/index.php/User:Apinzonf Manual Page: http://wiki.blender.org/index.php/User:Apinzonf/Doc:2.6/Manual/Modifiers/Deform/Laplacian_Smooth
Diffstat (limited to 'source/blender/bmesh/intern')
-rw-r--r--source/blender/bmesh/intern/bmesh_opdefines.c21
-rw-r--r--source/blender/bmesh/intern/bmesh_operators_private.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/bmesh/intern/bmesh_opdefines.c b/source/blender/bmesh/intern/bmesh_opdefines.c
index b527cffbfdc..e12e28f8cff 100644
--- a/source/blender/bmesh/intern/bmesh_opdefines.c
+++ b/source/blender/bmesh/intern/bmesh_opdefines.c
@@ -114,6 +114,26 @@ static BMOpDefine bmo_smooth_vert_def = {
};
/*
+ * Vertext Smooth Laplacian
+ * Smooths vertices by using Laplacian smoothing propose by.
+ * Desbrun, et al. Implicit Fairing of Irregular Meshes using Diffusion and Curvature Flow
+*/
+static BMOpDefine bmo_smooth_laplacian_vert_def = {
+ "smooth_laplacian_vert",
+ {{BMO_OP_SLOT_ELEMENT_BUF, "verts"}, //input vertices
+ {BMO_OP_SLOT_FLT, "lambda"}, //lambda param
+ {BMO_OP_SLOT_FLT, "lambda_border"}, //lambda param in border
+ {BMO_OP_SLOT_BOOL, "use_x"}, //Smooth object along X axis
+ {BMO_OP_SLOT_BOOL, "use_y"}, //Smooth object along Y axis
+ {BMO_OP_SLOT_BOOL, "use_z"}, //Smooth object along Z axis
+ {BMO_OP_SLOT_BOOL, "volume_preservation"}, //Apply volume preservation after smooth
+ {0} /* null-terminating sentinel */,
+ },
+ bmo_smooth_laplacian_vert_exec,
+ 0
+};
+
+/*
* Right-Hand Faces
*
* Computes an "outside" normal for the specified input faces.
@@ -1278,6 +1298,7 @@ BMOpDefine *opdefines[] = {
&bmo_similar_verts_def,
&bmo_slide_vert_def,
&bmo_smooth_vert_def,
+ &bmo_smooth_laplacian_vert_def,
&bmo_solidify_def,
&bmo_spin_def,
&bmo_split_def,
diff --git a/source/blender/bmesh/intern/bmesh_operators_private.h b/source/blender/bmesh/intern/bmesh_operators_private.h
index d6135efe19a..65c9cf0c421 100644
--- a/source/blender/bmesh/intern/bmesh_operators_private.h
+++ b/source/blender/bmesh/intern/bmesh_operators_private.h
@@ -91,6 +91,7 @@ void bmo_similar_faces_exec(BMesh *bm, BMOperator *op);
void bmo_similar_verts_exec(BMesh *bm, BMOperator *op);
void bmo_slide_vert_exec(BMesh *bm, BMOperator *op);
void bmo_smooth_vert_exec(BMesh *bm, BMOperator *op);
+void bmo_smooth_laplacian_vert_exec(BMesh *bm, BMOperator *op);
void bmo_solidify_face_region_exec(BMesh *bm, BMOperator *op);
void bmo_spin_exec(BMesh *bm, BMOperator *op);
void bmo_split_edges_exec(BMesh *bm, BMOperator *op);