diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-03-28 09:58:43 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-03-28 09:58:43 +0400 |
commit | 09596b04a56632f5a63ede5e2a9feb5a4f2288b2 (patch) | |
tree | f1d16838c34c881b7abd138bb6d0bcc07ea2b602 /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | a0feaebfa5f591ffaa0b4fafa99acd081691f890 (diff) |
- added mesh_get_cage_derived (returns appropriate DerivedMesh
to be used as a cage - depends on ME_OPT_EDGE flag)
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index 3fe9f771c7f..8146cdea349 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -33,6 +33,14 @@ #ifndef BKE_DERIVEDMESH_H #define BKE_DERIVEDMESH_H +/* TODO (Probably) + * + * o Make drawMapped* functions take a predicate function that + * determines whether to draw the edge (this predicate can + * also set color, etc). This will be slightly more general + * and allow some of the functions to be collapsed. + */ + struct Object; struct DispListMesh; @@ -88,6 +96,7 @@ struct DerivedMesh { * o If useColor==2, set color based on mapped (EditVert->f&SELECT) * - Should interpolate as nicely as possible across edge. * o If onlySeams, only draw if mapped (EditEdge->seam) + * o Only if mapped EditEdge->h==0 */ void (*drawMappedEdgesEM)(DerivedMesh *dm, int useColor, unsigned char *baseCol, unsigned char *selCol, int onlySeams); @@ -96,11 +105,24 @@ struct DerivedMesh { */ void (*drawFacesEM)(DerivedMesh *dm, int useColor, unsigned char *baseCol, unsigned char *selCol); + /* Draw mapped edges as lines + * o Call setColor(offset+index) for each edge, where index is the + * edge's index in the EditMesh. Return offset+count where count + * is the total number of mapped edges. + * o Only if mapped EditEdge->h==0 + */ + int (*drawMappedEdgesEMSelect)(DerivedMesh *dm, void (*setColor)(int index), int offset); + void (*release)(DerivedMesh *dm); }; DerivedMesh *mesh_get_derived(struct Object *ob); DerivedMesh *mesh_get_base_derived(struct Object *ob); + /* Utility function, just chooses appropriate DerivedMesh based + * on mesh flags. + */ +DerivedMesh *mesh_get_cage_derived(struct Object *ob); + #endif |