Blender V5.3
DNA_cloth_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2006 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "BLI_enum_flags.hh"
12#include "BLI_math_constants.hh"
13
14#include "DNA_defs.h"
15
16namespace blender {
17
18/* SIMULATION FLAGS: goal flags, etc. */
19/* These are the bits used in SimSettings.flags. */
47
48/* ClothSimSettings.bending_model. */
53
54/* COLLISION FLAGS */
56 CLOTH_COLLSETTINGS_FLAG_ENABLED = (1 << 1), /* enables cloth - object collisions */
57 CLOTH_COLLSETTINGS_FLAG_SELF = (1 << 2), /* enables selfcollisions */
58};
60
61
74
75
76 struct LinkNode *cache = nullptr;
78 float mingoal = 0.0f;
80 DNA_DEPRECATED float Cdis = {};
82 float Cvi = 1.0f;
84 float gravity[3] = {0.0f, 0.0f, -9.81f};
86 float dt = 0.0f;
88 float mass = 0.3f;
92 float shear = 5.0f;
94 float bending = 0.5f;
96 float max_bend = 0.5f;
100 float max_shear = 5.0f;
102 float max_sewing = 0.0f;
104 float avg_spring_len = 0.0f;
106 float timescale = 1.0f;
108 float time_scale = 1.0f;
110 float maxgoal = 1.0f;
112 float eff_force_scale = 1000.0f;
114 float eff_wind_scale = 250.0f;
115 float sim_time_old = 0.0f;
116 float defgoal = 0.0f;
117 float goalspring = 1.0f;
118 float goalfrict = 0.0f;
120 float velocity_smooth = 0.0f;
122 float density_target = 0.0f;
124 float density_strength = 0.0f;
126 float collider_friction = 0.0f;
131 float shrink_min = 0.0f;
134 float shrink_max = 0.0f;
135
136 /* Air pressure */
140 float target_volume = 0.0f;
145 float pressure_factor = 1.0f;
150 float fluid_density = 0.0f;
152 char _pad7[6] = {};
153
154 /* XXX various hair stuff
155 * should really be separate, this struct is a horrible mess already
156 */
158 float bending_damping = 0.5f;
160 float voxel_cell_size = 0.1f;
161
169 int maxspringlen = 10;
171 short solver_type = 0;
173 short vgroup_bend = 0;
175 short vgroup_mass = 0;
177 short vgroup_struct = 0;
179 short vgroup_shrink = 0;
181 short shapekey_rest = 0;
183 short presets = 2;
184 short reset = 0;
185
187
190 short vgroup_shear = 0;
191 float tension = 15.0f;
192 float compression = 15.0f;
193 float max_tension = 15.0f;
194 float max_compression = 15.0f;
196 float tension_damp = 5.0f;
198 float compression_damp = 5.0f;
200 float shear_damp = 5.0f;
201
207 short vgroup_intern = 0;
208 char _pad1[2] = {};
209 float internal_tension = 15.0f;
210 float internal_compression = 15.0f;
211 float max_internal_tension = 15.0f;
213 char _pad0[4] = {};
214};
215
218
219
220 struct LinkNode *collision_list = nullptr;
222 float epsilon = 0.015f;
224 float self_friction = 5.0f;
226 float friction = 5.0f;
228 float damping = 0.0f;
230 float selfepsilon = 0.015f;
237 short loop_count = 2;
238 char _pad[4] = {};
240 struct Collection *group = nullptr;
242 short vgroup_selfcol = 0;
244 short vgroup_objcol = 0;
245 char _pad2[4] = {};
247 float clamp = 0.0f;
249 float self_clamp = 0.0f;
250};
251
252} // namespace blender
#define ENUM_OPERATORS(_enum_type)
#define M_PI_4
#define DNA_DEFINE_CXX_METHODS(class_name)
Definition DNA_defs.h:104
#define DNA_DEPRECATED
Definition DNA_defs.h:21
BMesh Iterators.
@ CLOTH_BENDING_LINEAR
@ CLOTH_BENDING_ANGULAR
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL
@ CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH
@ CLOTH_SIMSETTINGS_FLAG_SCALING
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS
@ CLOTH_SIMSETTINGS_FLAG_GOAL
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL
@ CLOTH_SIMSETTINGS_FLAG_TEARING
@ CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS
@ CLOTH_SIMSETTINGS_FLAG_COLLOBJ
@ CLOTH_SIMSETTINGS_FLAG_SEW
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE
CLOTH_COLLISIONSETTINGS_FLAGS
@ CLOTH_COLLSETTINGS_FLAG_ENABLED
@ CLOTH_COLLSETTINGS_FLAG_SELF
struct LinkNode * collision_list
CLOTH_COLLISIONSETTINGS_FLAGS flags
DNA_DEPRECATED float distance_repel
DNA_DEPRECATED short self_loop_count
DNA_DEPRECATED float repel_force
struct Collection * group
DNA_DEPRECATED float Cdis
DNA_DEPRECATED float structural
struct EffectorWeights * effector_weights
DNA_DEPRECATED float vel_damping
DNA_DEPRECATED float max_struct
CLOTH_SIMSETTINGS_FLAGS flags
CLOTH_BENDING_MODEL bending_model
DNA_DEPRECATED int preroll