Cycles: svn merge -r41531:41613 ^/trunk/blender
[blender.git] / source / blender / blenkernel / BKE_subsurf.h
index c3c6b8d9edd442872810a53949a06c8131165380..dcbd045f62d14b6b9c34f7fae2c88e6766267d51 100644 (file)
@@ -1,5 +1,4 @@
-/* $Id$ 
- *
+/*
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -14,7 +13,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software Foundation,
- * Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  *
  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
  * All rights reserved.
 #ifndef BKE_SUBSURF_H
 #define BKE_SUBSURF_H
 
-struct Mesh;
-struct Object;
+/** \file BKE_subsurf.h
+ *  \ingroup bke
+ */
+
+struct DMGridAdjacency;
+struct DMGridData;
 struct DerivedMesh;
 struct EditMesh;
+struct IndexNode;
+struct ListBase;
+struct Mesh;
+struct MultiresSubsurf;
+struct Object;
+struct PBVH;
 struct SubsurfModifierData;
+struct _CCGEdge;
+struct _CCGFace;
+struct _CCGSubsurf;
+struct _CCGVert;
+
+/**************************** External *****************************/
 
 struct DerivedMesh *subsurf_make_derived_from_derived(
-                        struct DerivedMesh *dm,
-                        struct SubsurfModifierData *smd,
-                        int useRenderParams, float (*vertCos)[3],
-                        int isFinalCalc, int editMode);
+                                               struct DerivedMesh *dm,
+                                               struct SubsurfModifierData *smd,
+                                               int useRenderParams, float (*vertCos)[3],
+                                               int isFinalCalc, int forEditMode, int inEditMode);
+
+void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]);
+
+/**************************** Internal *****************************/
+
+typedef struct CCGDerivedMesh {
+       DerivedMesh dm;
+
+       struct _CCGSubSurf *ss;
+       int freeSS;
+       int drawInteriorEdges, useSubsurfUv;
+
+       struct {int startVert; struct _CCGVert *vert;} *vertMap;
+       struct {int startVert; int startEdge; struct _CCGEdge *edge;} *edgeMap;
+       struct {int startVert; int startEdge;
+                       int startFace; struct _CCGFace *face;} *faceMap;
+
+       short *edgeFlags;
+       char *faceFlags;
+
+       struct PBVH *pbvh;
+       struct ListBase *fmap;
+       struct IndexNode *fmap_mem;
+
+       struct DMGridData **gridData;
+       struct DMGridAdjacency *gridAdjacency;
+       int *gridOffset;
+       struct _CCGFace **gridFaces;
+
+       struct {
+               struct MultiresModifierData *mmd;
+               int local_mmd;
+
+               int lvl, totlvl;
+               float (*orco)[3];
+
+               struct Object *ob;
+               int modified;
 
-void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3]);
+               void (*update)(DerivedMesh*);
+       } multires;
+} CCGDerivedMesh;
 
 #endif