Blender  V2.93
DNA_meta_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_ID.h"
27 #include "DNA_defs.h"
28 #include "DNA_listBase.h"
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 struct AnimData;
35 struct BoundBox;
36 struct Ipo;
37 struct Material;
38 
39 typedef struct MetaElem {
40  struct MetaElem *next, *prev;
41 
43  struct BoundBox *bb;
44 
45  short type, flag;
46  char _pad[4];
48  float x, y, z;
50  float quat[4];
52  float expx;
53  float expy;
54  float expz;
56  float rad;
58  float rad2;
60  float s;
62  float len;
63 
65  float *mat, *imat;
67 
68 typedef struct MetaBall {
69  ID id;
70  struct AnimData *adt;
71 
77  struct Ipo *ipo DNA_DEPRECATED;
78 
79  /* material of the mother ball will define the material used of all others */
80  struct Material **mat;
81 
83  char flag, flag2;
84  short totcol;
86  short texflag;
87  char _pad[1];
88 
94 
95  /* texture space, copied as one block in editobject.c */
96  float loc[3];
97  float size[3];
98  float rot[3];
99 
102 
103  /* bias elements to have an offset volume.
104  * mother ball changes will effect other objects thresholds,
105  * but these may also have their own thresh as an offset */
106  float thresh;
107 
108  /* used in editmode */
109  /*ListBase edit_elems;*/
111 
112  void *batch_cache;
114 
115 /* **************** METABALL ********************* */
116 
117 /* texflag */
118 #define MB_AUTOSPACE 1
119 
120 /* mb->flag */
121 #define MB_UPDATE_ALWAYS 0
122 #define MB_UPDATE_HALFRES 1
123 #define MB_UPDATE_FAST 2
124 #define MB_UPDATE_NEVER 3
125 
126 /* mb->flag2 */
127 #define MB_DS_EXPAND (1 << 0)
128 
129 /* ml->type */
130 #define MB_BALL 0
131 #define MB_TUBEX 1 /* deprecated. */
132 #define MB_TUBEY 2 /* deprecated. */
133 #define MB_TUBEZ 3 /* deprecated. */
134 #define MB_TUBE 4
135 #define MB_PLANE 5
136 #define MB_ELIPSOID 6
137 #define MB_CUBE 7
138 
139 #define MB_TYPE_SIZE_SQUARED(type) (type == MB_ELIPSOID)
140 
141 /* ml->flag */
142 #define MB_NEGATIVE 2
143 #define MB_HIDE 8
144 #define MB_SCALE_RAD 16
145 
146 #ifdef __cplusplus
147 }
148 #endif
ID and Library types, which are fundamental for sdna.
These structs are the foundation for all linked lists in the library system.
struct MetaBall MetaBall
struct MetaElem MetaElem
Definition: DNA_ID.h:273
MetaElem * lastelem
char _pad[1]
float thresh
float size[3]
ListBase elems
float rendersize
void * batch_cache
struct Ipo *ipo DNA_DEPRECATED
ListBase disp
short totcol
float loc[3]
float wiresize
struct AnimData * adt
ListBase * editelems
char needs_flush_to_id
struct Material ** mat
short texflag
float rot[3]
float expy
float * imat
char _pad[4]
struct MetaElem * next
short type
float expx
float expz
float quat[4]
float rad2
struct BoundBox * bb
float * mat
struct MetaElem * prev
short flag