Blender V5.3
DNA_meta_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_ID.h"
12#include "DNA_listBase.h"
13
14#include "BLI_enum_flags.hh"
15
16namespace blender {
17
18struct AnimData;
19struct BoundBox;
20struct Material;
21
27
28
35
37enum eMetaBall_Flag2 : char {
38 MB_DS_EXPAND = 1 << 0,
39};
41
42
43enum eMetaElem_Type : short {
45 MB_TUBEX = 1, /* Deprecated. */
46 MB_TUBEY = 2, /* Deprecated. */
47 MB_TUBEZ = 3, /* Deprecated. */
52};
53
54#define MB_TYPE_SIZE_SQUARED(type) ((type) == MB_ELLIPSOID)
55
57enum eMetaElem_Flag : short {
58 MB_SELECT = (1 << 0),
59 MB_NEGATIVE = 1 << 1,
60 MB_HIDE = 1 << 3,
61 MB_SCALE_RAD = 1 << 4,
62};
64
65struct MetaElem {
66 struct MetaElem *next = nullptr, *prev = nullptr;
67
69 struct BoundBox *bb = nullptr;
70
73 char _pad[4] = {};
75 float x = 0, y = 0, z = 0;
77 float quat[4] = {};
79 float expx = 0;
80 float expy = 0;
81 float expz = 0;
83 float rad = 0;
85 float rad2 = 0;
87 float s = 0;
89 float len = 0;
90
92 float *mat = nullptr, *imat = nullptr;
93};
94
95struct MetaBall {
96#ifdef __cplusplus
98 static constexpr ID_Type id_type = ID_MB;
99#endif
100
102 struct AnimData *adt = nullptr;
103
104 ListBaseT<MetaElem> elems = {nullptr, nullptr};
106 ListBaseT<MetaElem> *editelems = nullptr;
107
108 /* material of the mother ball will define the material used of all others */
109 struct Material **mat = nullptr;
110
114 short totcol = 0;
116 char _pad[2] = {};
117
123
124 float texspace_location[3] = {};
125 float texspace_size[3] = {1, 1, 1};
126
128 float wiresize = 0.4f, rendersize = 0.2f;
129
130 /* bias elements to have an offset volume.
131 * mother ball changes will effect other objects thresholds,
132 * but these may also have their own thresh as an offset */
133 float thresh = 0.6f;
134
135 char _pad0[4] = {};
136
138 MetaElem *lastelem = nullptr;
139};
140
141} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
These structs are the foundation for all linked lists in the library system.
BMesh Iterators.
@ MB_UPDATE_HALFRES
@ MB_TEXSPACE_FLAG_AUTO
eMetaBall_Flag2 flag2
ListBaseT< MetaElem > elems
ListBaseT< MetaElem > * editelems
struct AnimData * adt
struct Material ** mat
eMetaBall_Flag flag
struct MetaElem * prev
eMetaElem_Type type
struct MetaElem * next
struct BoundBox * bb
eMetaElem_Flag flag