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:
authorNicholas Bishop <nicholasbishop@gmail.com>2011-12-31 01:11:40 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2011-12-31 01:11:40 +0400
commit289c8b575872ab49d7d16b742af0e5f56f7282eb (patch)
tree67d2bf7b8497a12a9e2f4f4c5de7c565f4c9e423 /source/blender/makesdna/DNA_modifier_types.h
parent792452a7e53aa92361145e415491943bc91d8a6e (diff)
Add remesh modifier (dual contouring).
This patch adds a new remeshing modifier. The algorithm is based on the paper "Dual Contouring of Hermite Data", and the implementation was contributed to Blender by Dr. Tao Ju. The contributed code is in intern/dualcon, and was modified to compile under gcc and work on 64-bit systems. Files not needed for Blender were removed and a small C wrapper was added in order to interface it with Blender. The rest of the patch is just standard modifier stuff. Reviewed by Sergey, code review link: http://codereview.appspot.com/5491053/ The remesh icon was contributed by Zafio: http://blenderartists.org/forum/showthread.php?240751-Request-for-modifier-icon/page2. Thanks to everyone in that thread for the icon proposals and discussion. Documentation and examples on the Blender wiki: http://wiki.blender.org/index.php/User:Nicholasbishop/RemeshModifier In case the history is needed for anything, check the remesh-modifier branch of this git repository: https://gitorious.org/~nicholasbishop/blenderprojects/nicholasbishop-blender
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 2b62f70c319..5fe9851738a 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -76,6 +76,7 @@ typedef enum ModifierType {
eModifierType_WeightVGProximity,
eModifierType_Ocean,
eModifierType_DynamicPaint,
+ eModifierType_Remesh,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -1032,4 +1033,39 @@ typedef struct DynamicPaintModifierData {
int pad;
} DynamicPaintModifierData;
+/* Remesh modifier */
+
+typedef enum RemeshModifierFlags {
+ MOD_REMESH_FLOOD_FILL = 1,
+} RemeshModifierFlags;
+
+typedef enum RemeshModifierMode {
+ /* blocky */
+ MOD_REMESH_CENTROID = 0,
+ /* smooth */
+ MOD_REMESH_MASS_POINT = 1,
+ /* keeps sharp edges */
+ MOD_REMESH_SHARP_FEATURES = 2,
+} RemeshModifierMode;
+
+typedef struct RemeshModifierData {
+ ModifierData modifier;
+
+ /* floodfill option, controls how small components can be
+ before they are removed */
+ float threshold;
+
+ /* ratio between size of model and grid */
+ float scale;
+
+ float hermite_num;
+
+ /* octree depth */
+ char depth;
+
+ char flag;
+ char mode;
+ char pad;
+} RemeshModifierData;
+
#endif