2 * blenlib/DNA_meta_types.h (mar-2001 nzc)
6 * ***** BEGIN GPL LICENSE BLOCK *****
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software Foundation,
20 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
22 * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
23 * All rights reserved.
25 * The Original Code is: all of this file.
27 * Contributor(s): none yet.
29 * ***** END GPL LICENSE BLOCK *****
31 #ifndef DNA_META_TYPES_H
32 #define DNA_META_TYPES_H
34 #include "DNA_listBase.h"
42 typedef struct MetaElem {
43 struct MetaElem *next, *prev;
45 struct BoundBox *bb; /* Bound Box of MetaElem */
46 int i1,j1,k1, i2,j2,k2; /* corners of Bounding Box in lattice */
48 short type, flag, selcol1, selcol2;
49 float x, y, z; /* Position of center of MetaElem */
50 float quat[4]; /* Rotation of MetaElem */
51 float expx; /* dimension parameters, used for some types like cubes */
54 float rad; /* radius of the meta element */
55 float rad2; /* temp field, used only while processing */
56 float s; /* stiffness, how much of the element to fill */
57 float len; /* old, only used for backwards compat. use dimensions now */
59 float *mat, *imat; /* matrix and inverted matrix */
63 typedef struct MetaBall {
70 ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
73 /* material of the mother ball will define the material used of all others */
74 struct Material **mat;
77 int texflag; /* used to store MB_AUTOSPACE */
79 /* texture space, copied as one block in editobject.c */
84 float wiresize, rendersize; /* display and render res */
86 /* bias elements to have an offset volume.
87 mother ball changes will effect other objects thresholds,
88 but these may also have their own thresh as an offset */
91 /* used in editmode */
92 /*ListBase edit_elems;*/
96 /* **************** METABALL ********************* */
99 #define MB_AUTOSPACE 1
102 #define MB_UPDATE_ALWAYS 0
103 #define MB_UPDATE_HALFRES 1
104 #define MB_UPDATE_FAST 2
105 #define MB_UPDATE_NEVER 3
109 #define MB_TUBEX 1 /* depercated */
110 #define MB_TUBEY 2 /* depercated */
111 #define MB_TUBEZ 3 /* depercated */
114 #define MB_ELIPSOID 6
118 #define MB_NEGATIVE 2
120 #define MB_SCALE_RAD 16