Blender  V2.93
DNA_cloth_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) 2006 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
24 #pragma once
25 
26 #include "DNA_defs.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
44 typedef struct ClothSimSettings {
46  struct LinkNode *cache;
48  float mingoal;
50  float Cdis DNA_DEPRECATED;
52  float Cvi;
54  float gravity[3];
56  float dt;
58  float mass;
60  float structural DNA_DEPRECATED;
62  float shear;
64  float bending;
66  float max_bend;
68  float max_struct DNA_DEPRECATED;
70  float max_shear;
72  float max_sewing;
76  float timescale;
78  float time_scale;
80  float maxgoal;
85  float sim_time_old;
86  float defgoal;
87  float goalspring;
88  float goalfrict;
98  float vel_damping DNA_DEPRECATED;
101  float shrink_min;
104  float shrink_max;
105 
106  /* Air pressure */
122  char _pad7[6];
123 
124  /* XXX various hair stuff
125  * should really be separate, this struct is a horrible mess already
126  */
131 
135  int flags;
137  int preroll DNA_DEPRECATED;
141  short solver_type;
143  short vgroup_bend;
145  short vgroup_mass;
153  short presets;
154  short reset;
155 
157 
161  float tension;
162  float compression;
163  float max_tension;
170  float shear_damp;
171 
178  char _pad1[2];
183  char _pad0[4];
184 
186 
187 /* SIMULATION FLAGS: goal flags,.. */
188 /* These are the bits used in SimSettings.flags. */
189 typedef enum {
207  /* CLOTH_SIMSETTINGS_FLAG_CCACHE_EDIT = (1 << 12), */ /* UNUSED */
215 
216 /* ClothSimSettings.bending_model. */
217 typedef enum {
221 
222 typedef struct ClothCollSettings {
226  float epsilon;
230  float friction;
232  float damping;
234  float selfepsilon;
235  float repel_force DNA_DEPRECATED;
236  float distance_repel DNA_DEPRECATED;
238  int flags;
240  short self_loop_count DNA_DEPRECATED;
242  short loop_count;
243  char _pad[4];
245  struct Collection *group;
250  char _pad2[4];
252  float clamp;
254  float self_clamp;
256 
257 /* COLLISION FLAGS */
258 typedef enum {
259  CLOTH_COLLSETTINGS_FLAG_ENABLED = (1 << 1), /* enables cloth - object collisions */
260  CLOTH_COLLSETTINGS_FLAG_SELF = (1 << 2), /* enables selfcollisions */
262 
263 #ifdef __cplusplus
264 }
265 #endif
CLOTH_BENDING_MODEL
@ CLOTH_BENDING_LINEAR
@ CLOTH_BENDING_ANGULAR
CLOTH_COLLISIONSETTINGS_FLAGS
@ CLOTH_COLLSETTINGS_FLAG_ENABLED
@ CLOTH_COLLSETTINGS_FLAG_SELF
struct ClothCollSettings ClothCollSettings
CLOTH_SIMSETTINGS_FLAGS
@ CLOTH_SIMSETTINGS_FLAG_DYNAMIC_BASEMESH
@ CLOTH_SIMSETTINGS_FLAG_GOAL
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL
@ CLOTH_SIMSETTINGS_FLAG_SCALING
@ CLOTH_SIMSETTINGS_FLAG_SEW
@ CLOTH_SIMSETTINGS_FLAG_PRESSURE
@ CLOTH_SIMSETTINGS_FLAG_TEARING
@ CLOTH_SIMSETTINGS_FLAG_COLLOBJ
@ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS
@ CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS
struct ClothSimSettings ClothSimSettings
short self_loop_count DNA_DEPRECATED
float repel_force DNA_DEPRECATED
float distance_repel DNA_DEPRECATED
struct LinkNode * collision_list
struct Collection * group
struct EffectorWeights * effector_weights
float vel_damping DNA_DEPRECATED
float internal_spring_max_length
float Cdis DNA_DEPRECATED
float structural DNA_DEPRECATED
int preroll DNA_DEPRECATED
float max_internal_compression
float internal_spring_max_diversion
struct LinkNode * cache
float max_struct DNA_DEPRECATED