diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-07 09:42:03 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-07 09:42:03 +0400 |
commit | 1f431b50d6642f77fc6a1757159b5c7568f90e31 (patch) | |
tree | 37d7eb81849feba09e7486a583186209a6dc4712 /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | 8da5df8887a315a9c92168c8dd81f11b6ee0b29b (diff) |
- got rid of DerivedMesh.drawMappedEdgeEM function, can be implemented with
drawMappedEdges
- added DerivedMesh.convertToDispListMeshMapped function which converts and
also returns mapping information for use in editmode
- updated DispListMesh derivedmesh to be able to function in editmode
- update mirror modifier to support use as a cage
- update mirror & subsurf modifiers to properly pass mapping information down
modifier stack
It is now possible to have a mesh with mirror/subsurf modifiers where you
can edit with both as cage. Selecting the mirror'd part works, but of course
transform is flipped so it is a bit weird. Not the cleanest code in the
world and I can't say I am really happy with the architecture but it works for
now and supports the existing feature set.
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 6350332fd66..1158f89dde0 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -74,6 +74,18 @@ struct DerivedMesh { */ struct DispListMesh* (*convertToDispListMesh)(DerivedMesh *dm, int allowShared); + /* Convert to new DispListMesh, should be free'd by caller. + * + * Additionally, allocate and return map arrays. Each map array should be + * have a length corresponding to the returned DLMs totvert, totedge, and + * totface fields respectively. + * + * Each index in the array should give the EditMesh element from which the + * element at the same index in the DLMs vert, edge, or face array was + * derived (which may be null). + */ + struct DispListMesh* (*convertToDispListMeshMapped)(DerivedMesh *dm, int allowShared, struct EditVert ***vertMap_r, struct EditEdge ***edgeMap_r, struct EditFace ***faceMap_r); + /* Iterate over all vertex points, calling DO_MINMAX with given args. * * Also called in Editmode @@ -137,9 +149,6 @@ struct DerivedMesh { */ void (*drawMappedVertsEM)(DerivedMesh *dm, int (*setDrawOptions)(void *userData, struct EditVert *eve), void *userData); - /* Draw single mapped edge as lines (no options) */ - void (*drawMappedEdgeEM)(DerivedMesh *dm, void *edge); - /* Draw mapped edges as lines * o Only if !setDrawOptions or setDrawOptions(userData, mapped-edge) returns true */ @@ -179,7 +188,7 @@ struct DerivedMesh { }; /* Internal function, just temporarily exposed */ -DerivedMesh *derivedmesh_from_displistmesh(struct DispListMesh *dlm); +DerivedMesh *derivedmesh_from_displistmesh(struct DispListMesh *dlm, float (*vertexCos)[3], struct EditVert **vertMap, struct EditEdge **edgeMap, struct EditFace **faceMap); DerivedMesh *mesh_get_derived_final(struct Object *ob, int *needsFree_r); DerivedMesh *mesh_get_derived_deform(struct Object *ob, int *needsFree_r); |