diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 16:11:44 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 16:11:44 +0300 |
commit | a1bf207be31f4bb578e920bc472cc3471a6554ca (patch) | |
tree | 4c8eafd32e190c9d3292c0edf3ce27bb5bd5e31b /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | 90cc7c8abd7b4c36002031edba8b75207fb98086 (diff) |
Sculpt: Subsurf
* Now uses the CCG DerivedMesh also in object mode, used to be edit mode only.
* Create CD_ORIGINDEX layer on demand, to save memory.
* Removed ss_to_cdderivedmesh function, and instead create ccgdm and then
convert that to cddm, to avoid code duplication.
* Added and implement DerivedMesh interface functions to obtain face grids.
* Store edge/face flags more memory efficient.
* Export CCGDerivedMesh struct in BKE_subsurf.h
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index d9b0c4bc357..6bce7575556 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -67,6 +67,16 @@ struct PBVH; #define SUB_ELEMS_EDGE 2 #define SUB_ELEMS_FACE 4 +typedef struct DMGridData { + float co[3]; + float no[3]; +} DMGridData; + +typedef struct DMGridAdjacency { + int index[4]; + int rotation[4]; +} DMGridAdjacency; + typedef struct DerivedMesh DerivedMesh; struct DerivedMesh { /* Private DerivedMesh data, only for internal DerivedMesh use */ @@ -135,6 +145,12 @@ struct DerivedMesh { void *(*getEdgeDataArray)(DerivedMesh *dm, int type); void *(*getFaceDataArray)(DerivedMesh *dm, int type); + /* optional grid access for subsurf */ + int (*getNumGrids)(DerivedMesh *dm); + int (*getGridSize)(DerivedMesh *dm); + DMGridData **(*getGridData)(DerivedMesh *dm); + DMGridAdjacency *(*getGridAdjacency)(DerivedMesh *dm); + /* Iterate over each mapped vertex in the derived mesh, calling the * given function with the original vert and the mapped vert's new * coordinate and normal. For historical reasons the normal can be @@ -189,7 +205,7 @@ struct DerivedMesh { /* Get the BVH used for paint modes */ - struct PBVH *(*getPBVH)(DerivedMesh *dm); + struct PBVH *(*getPBVH)(struct Object *ob, DerivedMesh *dm); /* Drawing Operations */ |