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:
authorAndre Susano Pinto <andresusanopinto@gmail.com>2008-08-22 04:35:14 +0400
committerAndre Susano Pinto <andresusanopinto@gmail.com>2008-08-22 04:35:14 +0400
commit4655426ec7d643d8a67cf7bad6e446c9620d9b7d (patch)
treeea4f8059a9c6be968e0457b27d749944e18195a6 /source/blender/makesdna/DNA_modifier_types.h
parentf0d58a8b99aa817824e677c3d246750ca1f25dc7 (diff)
parentf4ae23f3794605f5b7c0a5b90d982d6dfd20d492 (diff)
Merged shrinkwrap modifier from soc-2008-jaguarandi
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index d8cc7633fb3..9599cc1d247 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -35,6 +35,7 @@ typedef enum ModifierType {
eModifierType_Cloth,
eModifierType_Collision,
eModifierType_Bevel,
+ eModifierType_Shrinkwrap,
NUM_MODIFIER_TYPES
} ModifierType;
@@ -491,4 +492,45 @@ typedef struct ExplodeModifierData {
float protect;
} ExplodeModifierData;
+typedef struct ShrinkwrapModifierData {
+ ModifierData modifier;
+
+ struct Object *target; /* shrink target */
+ struct Object *auxTarget; /* additional shrink target */
+ char vgroup_name[32]; /* optional vertexgroup name */
+ float keepDist; /* distance offset to keep from mesh/projection point */
+ short shrinkType; /* shrink type projection */
+ short shrinkOpts; /* shrink options */
+ char projAxis; /* axis to project over */
+
+ /*
+ * if using projection over vertex normal this controls the
+ * the level of subsurface that must be done before getting the
+ * vertex coordinates and normal
+ */
+ char subsurfLevels;
+
+ char pad[6];
+
+} ShrinkwrapModifierData;
+
+/* Shrinkwrap->shrinkType */
+#define MOD_SHRINKWRAP_NEAREST_SURFACE 0
+#define MOD_SHRINKWRAP_PROJECT 1
+#define MOD_SHRINKWRAP_NEAREST_VERTEX 2
+
+/* Shrinkwrap->shrinkOpts */
+#define MOD_SHRINKWRAP_PROJECT_ALLOW_POS_DIR (1<<0) /* allow shrinkwrap to move the vertex in the positive direction of axis */
+#define MOD_SHRINKWRAP_PROJECT_ALLOW_NEG_DIR (1<<1) /* allow shrinkwrap to move the vertex in the negative direction of axis */
+
+#define MOD_SHRINKWRAP_CULL_TARGET_FRONTFACE (1<<3) /* ignore vertex moves if a vertex ends projected on a front face of the target */
+#define MOD_SHRINKWRAP_CULL_TARGET_BACKFACE (1<<4) /* ignore vertex moves if a vertex ends projected on a back face of the target */
+
+#define MOD_SHRINKWRAP_KEEP_ABOVE_SURFACE (1<<5) /* distance is measure to the front face of the target */
+
+#define MOD_SHRINKWRAP_PROJECT_OVER_X_AXIS (1<<0)
+#define MOD_SHRINKWRAP_PROJECT_OVER_Y_AXIS (1<<1)
+#define MOD_SHRINKWRAP_PROJECT_OVER_Z_AXIS (1<<2)
+#define MOD_SHRINKWRAP_PROJECT_OVER_NORMAL 0 /* projection over normal is used if no axis is selected */
+
#endif