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, expy, expz; /* dimension parameters, used for some types like cubes */
52 float rad; /* radius of the meta element */
53 float rad2; /* temp field, used only while processing */
54 float s; /* stiffness, how much of the element to fill */
55 float len; /* old, only used for backwards compat. use dimensions now */
57 float *mat, *imat; /* matrix and inverted matrix */
61 typedef struct MetaBall {
68 ListBase *editelems; /* not saved in files, note we use pointer for editmode check */
71 /* material of the mother ball will define the material used of all others */
72 struct Material **mat;
75 int texflag; /* used to store MB_AUTOSPACE */
77 /* texture space, copied as one block in editobject.c */
82 float wiresize, rendersize; /* display and render res */
84 /* bias elements to have an offset volume.
85 mother ball changes will effect other objects thresholds,
86 but these may also have their own thresh as an offset */
89 /* used in editmode */
90 /*ListBase edit_elems;*/
94 /* **************** METABALL ********************* */
97 #define MB_AUTOSPACE 1
100 #define MB_UPDATE_ALWAYS 0
101 #define MB_UPDATE_HALFRES 1
102 #define MB_UPDATE_FAST 2
103 #define MB_UPDATE_NEVER 3
107 #define MB_TUBEX 1 /* depercated */
108 #define MB_TUBEY 2 /* depercated */
109 #define MB_TUBEZ 3 /* depercated */
112 #define MB_ELIPSOID 6
116 #define MB_NEGATIVE 2
118 #define MB_SCALE_RAD 16