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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-28 16:33:17 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-11-28 16:33:17 +0300
commitc4933cccfa74836ff88a6904abfaf52c8e0cde87 (patch)
tree87004e9a5c1004c7c67c9c6b80d19a670ddd4d08 /source/blender/makesdna/DNA_modifier_types.h
parentb83751d8c2a3fd85e6e8e301ee1f986d684b03d5 (diff)
Mesh Deform Modifier
* Now support a Surface mode next to the existing Volume mode. This binds the mesh to the cage mesh surface rather than it's volume. * Implemented reusing the bone heat weighting code. * Advantage is that it works for cage meshes that are not volumes and that binding is much faster. * Weak point is that disconnected components of a mesh are not guaranteed to stick together (same problem exists with bone heat weighting). * Bind weights could still be compressed better to use less memory. Example file: http://download.blender.org/ftp/incoming/cloth_mdef_surface.blend
Diffstat (limited to 'source/blender/makesdna/DNA_modifier_types.h')
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index fe6a5b050e3..040dc4dbd78 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -492,6 +492,9 @@ typedef struct BooleanModifierData {
#define MOD_MDEF_INVERT_VGROUP (1<<0)
#define MOD_MDEF_DYNAMIC_BIND (1<<1)
+#define MOD_MDEF_VOLUME 0
+#define MOD_MDEF_SURFACE 1
+
typedef struct MDefInfluence {
int vertex;
float weight;
@@ -508,7 +511,7 @@ typedef struct MeshDeformModifierData {
struct Object *object; /* mesh object */
char defgrp_name[32]; /* optional vertexgroup name */
- short gridsize, flag, pad[2];
+ short gridsize, flag, mode, pad;
/* variables filled in when bound */
float *bindweights, *bindcos; /* computed binding weights */
@@ -523,7 +526,8 @@ typedef struct MeshDeformModifierData {
float bindmat[4][4]; /* matrix of cage at binding time */
/* runtime */
- void (*bindfunc)(struct Scene *scene, struct MeshDeformModifierData *mmd,
+ void (*bindfunc)(struct Scene *scene, struct DerivedMesh *dm,
+ struct MeshDeformModifierData *mmd,
float *vertexcos, int totvert, float cagemat[][4]);
} MeshDeformModifierData;