diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-11 00:33:09 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-11 00:33:09 +0400 |
commit | f751d0f6ae7de155343e24e36965956bd7a061e3 (patch) | |
tree | d963bb17c3fb79066e9de499b20317626d60fe92 /source/blender/blenkernel/BKE_DerivedMesh.h | |
parent | 2ca64189b734dbd289d1a07e1ce9d332eadebe19 (diff) |
Replace hardcoded DMGridData structure with CCGElem/CCGKey.
* Changes to DerivedMesh interface: DMGridData has been removed,
getGridData() now returns an array of CCGElem pointers. Also added
getGridKey() to initialize a CCGKey (implemented only by
CCGDerivedMesh.)
* PBVH: added BLI_pbvh_get_grid_key().
* A lot of code is affected, but mainly is just replacing
DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the
CCG_*_elem functions, removing the reliance on grid elements of
exactly six floats.
Diffstat (limited to 'source/blender/blenkernel/BKE_DerivedMesh.h')
-rw-r--r-- | source/blender/blenkernel/BKE_DerivedMesh.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_DerivedMesh.h b/source/blender/blenkernel/BKE_DerivedMesh.h index a15192f156a..595a1e884d7 100644 --- a/source/blender/blenkernel/BKE_DerivedMesh.h +++ b/source/blender/blenkernel/BKE_DerivedMesh.h @@ -74,6 +74,8 @@ #include "BKE_customdata.h" #include "BKE_bvhutils.h" +struct CCGElem; +struct CCGKey; struct MVert; struct MEdge; struct MFace; @@ -102,11 +104,6 @@ struct PBVH; * Also, the mface origindex layer indexes mpolys, not mfaces. */ -typedef struct DMGridData { - float co[3]; - float no[3]; -} DMGridData; - typedef struct DMGridAdjacency { int index[4]; int rotation[4]; @@ -250,9 +247,10 @@ struct DerivedMesh { /* optional grid access for subsurf */ int (*getNumGrids)(DerivedMesh *dm); int (*getGridSize)(DerivedMesh *dm); - DMGridData **(*getGridData)(DerivedMesh *dm); + struct CCGElem **(*getGridData)(DerivedMesh *dm); DMGridAdjacency *(*getGridAdjacency)(DerivedMesh *dm); int *(*getGridOffset)(DerivedMesh *dm); + void (*getGridKey)(DerivedMesh *dm, struct CCGKey *key); DMFlagMat *(*getGridFlagMats)(DerivedMesh *dm); unsigned int **(*getGridHidden)(DerivedMesh *dm); |