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