|
Blender
V2.59
|
00001 /* $Id: BKE_subsurf.h 36773 2011-05-19 11:24:56Z blendix $ 00002 * 00003 * ***** BEGIN GPL LICENSE BLOCK ***** 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software Foundation, 00017 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00018 * 00019 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00020 * All rights reserved. 00021 * 00022 * The Original Code is: all of this file. 00023 * 00024 * Contributor(s): none yet. 00025 * 00026 * ***** END GPL LICENSE BLOCK ***** 00027 */ 00028 #ifndef BKE_SUBSURF_H 00029 #define BKE_SUBSURF_H 00030 00035 struct DMGridAdjacency; 00036 struct DMGridData; 00037 struct DerivedMesh; 00038 struct EditMesh; 00039 struct IndexNode; 00040 struct ListBase; 00041 struct Mesh; 00042 struct MultiresSubsurf; 00043 struct Object; 00044 struct PBVH; 00045 struct SubsurfModifierData; 00046 struct _CCGEdge; 00047 struct _CCGFace; 00048 struct _CCGSubsurf; 00049 struct _CCGVert; 00050 00051 /**************************** External *****************************/ 00052 00053 struct DerivedMesh *subsurf_make_derived_from_derived( 00054 struct DerivedMesh *dm, 00055 struct SubsurfModifierData *smd, 00056 int useRenderParams, float (*vertCos)[3], 00057 int isFinalCalc, int forEditMode, int inEditMode); 00058 00059 void subsurf_calculate_limit_positions(struct Mesh *me, float (*positions_r)[3]); 00060 00061 /**************************** Internal *****************************/ 00062 00063 typedef struct CCGDerivedMesh { 00064 DerivedMesh dm; 00065 00066 struct _CCGSubSurf *ss; 00067 int freeSS; 00068 int drawInteriorEdges, useSubsurfUv; 00069 00070 struct {int startVert; struct _CCGVert *vert;} *vertMap; 00071 struct {int startVert; int startEdge; struct _CCGEdge *edge;} *edgeMap; 00072 struct {int startVert; int startEdge; 00073 int startFace; struct _CCGFace *face;} *faceMap; 00074 00075 short *edgeFlags; 00076 char *faceFlags; 00077 00078 struct PBVH *pbvh; 00079 struct ListBase *fmap; 00080 struct IndexNode *fmap_mem; 00081 00082 struct DMGridData **gridData; 00083 struct DMGridAdjacency *gridAdjacency; 00084 int *gridOffset; 00085 struct _CCGFace **gridFaces; 00086 00087 struct { 00088 struct MultiresModifierData *mmd; 00089 int local_mmd; 00090 00091 int lvl, totlvl; 00092 float (*orco)[3]; 00093 00094 struct Object *ob; 00095 int modified; 00096 00097 void (*update)(DerivedMesh*); 00098 } multires; 00099 } CCGDerivedMesh; 00100 00101 #endif 00102