Blender V2.61 - r43446
|
00001 /* 00002 * ***** BEGIN GPL LICENSE BLOCK ***** 00003 * 00004 * This program is free software; you can redistribute it and/or 00005 * modify it under the terms of the GNU General Public License 00006 * as published by the Free Software Foundation; either version 2 00007 * of the License, or (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with this program; if not, write to the Free Software Foundation, 00016 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00017 * 00018 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV. 00019 * All rights reserved. 00020 * 00021 * The Original Code is: all of this file. 00022 * 00023 * Contributor(s): none yet. 00024 * 00025 * ***** END GPL LICENSE BLOCK ***** 00026 */ 00027 00032 #ifndef DNA_META_TYPES_H 00033 #define DNA_META_TYPES_H 00034 00035 #include "DNA_listBase.h" 00036 #include "DNA_ID.h" 00037 00038 struct BoundBox; 00039 struct AnimData; 00040 struct Ipo; 00041 struct Material; 00042 00043 00044 typedef struct MetaElem { 00045 struct MetaElem *next, *prev; 00046 00047 struct BoundBox *bb; /* Bound Box of MetaElem */ 00048 00049 short type, flag, selcol1, selcol2; 00050 float x, y, z; /* Position of center of MetaElem */ 00051 float quat[4]; /* Rotation of MetaElem (MUST be kept normalized) */ 00052 float expx; /* dimension parameters, used for some types like cubes */ 00053 float expy; 00054 float expz; 00055 float rad; /* radius of the meta element */ 00056 float rad2; /* temp field, used only while processing */ 00057 float s; /* stiffness, how much of the element to fill */ 00058 float len; /* old, only used for backwards compat. use dimensions now */ 00059 00060 float *mat, *imat; /* matrix and inverted matrix */ 00061 00062 } MetaElem; 00063 00064 typedef struct MetaBall { 00065 ID id; 00066 struct AnimData *adt; 00067 00068 struct BoundBox *bb; 00069 00070 ListBase elems; 00071 ListBase disp; 00072 ListBase *editelems; /* not saved in files, note we use pointer for editmode check */ 00073 struct Ipo *ipo DNA_DEPRECATED; /* old animation system, deprecated for 2.5 */ 00074 00075 /* material of the mother ball will define the material used of all others */ 00076 struct Material **mat; 00077 00078 char flag, flag2; /* flag is enum for updates, flag2 is bitflags for settings */ 00079 short totcol; 00080 short texflag, pad; /* used to store MB_AUTOSPACE */ 00081 00082 /* texture space, copied as one block in editobject.c */ 00083 float loc[3]; 00084 float size[3]; 00085 float rot[3]; 00086 00087 float wiresize, rendersize; /* display and render res */ 00088 00089 /* bias elements to have an offset volume. 00090 mother ball changes will effect other objects thresholds, 00091 but these may also have their own thresh as an offset */ 00092 float thresh; 00093 00094 /* used in editmode */ 00095 /*ListBase edit_elems;*/ 00096 MetaElem *lastelem; 00097 } MetaBall; 00098 00099 /* **************** METABALL ********************* */ 00100 00101 /* texflag */ 00102 #define MB_AUTOSPACE 1 00103 00104 /* mb->flag */ 00105 #define MB_UPDATE_ALWAYS 0 00106 #define MB_UPDATE_HALFRES 1 00107 #define MB_UPDATE_FAST 2 00108 #define MB_UPDATE_NEVER 3 00109 00110 /* mb->flag2 */ 00111 #define MB_DS_EXPAND (1<<0) 00112 00113 00114 /* ml->type */ 00115 #define MB_BALL 0 00116 #define MB_TUBEX 1 /* depercated */ 00117 #define MB_TUBEY 2 /* depercated */ 00118 #define MB_TUBEZ 3 /* depercated */ 00119 #define MB_TUBE 4 00120 #define MB_PLANE 5 00121 #define MB_ELIPSOID 6 00122 #define MB_CUBE 7 00123 00124 /* ml->flag */ 00125 #define MB_NEGATIVE 2 00126 #define MB_HIDE 8 00127 #define MB_SCALE_RAD 16 00128 00129 #endif