|
Blender
V2.59
|
00001 /* 00002 * $Id: DNA_cloth_types.h 36419 2011-05-01 21:39:13Z joeedh $ 00003 * 00004 * ***** BEGIN GPL LICENSE BLOCK ***** 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU General Public License 00008 * as published by the Free Software Foundation; either version 2 00009 * of the License, or (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software Foundation, 00018 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 00019 * 00020 * The Original Code is Copyright (C) 2006 by NaN Holding BV. 00021 * All rights reserved. 00022 * 00023 * The Original Code is: all of this file. 00024 * 00025 * Contributor(s): Daniel (Genscher) 00026 * 00027 * ***** END GPL LICENSE BLOCK ***** 00028 */ 00029 #ifndef DNA_CLOTH_TYPES_H 00030 #define DNA_CLOTH_TYPES_H 00031 00048 typedef struct ClothSimSettings 00049 { 00050 struct LinkNode *cache; /* UNUSED atm */ 00051 float mingoal; /* see SB */ 00052 float Cdis; /* Mechanical damping of springs. */ 00053 float Cvi; /* Viscous/fluid damping. */ 00054 float gravity[3]; /* Gravity/external force vector. */ 00055 float dt; /* This is the duration of our time step, computed. */ 00056 float mass; /* The mass of the entire cloth. */ 00057 float structural; /* Structural spring stiffness. */ 00058 float shear; /* Shear spring stiffness. */ 00059 float bending; /* Flexion spring stiffness. */ 00060 float max_bend; /* max bending scaling value, min is "bending" */ 00061 float max_struct; /* max structural scaling value, min is "structural" */ 00062 float max_shear; /* max shear scaling value, UNUSED */ 00063 float avg_spring_len; /* used for normalized springs */ 00064 float timescale; /* parameter how fast cloth runs */ 00065 float maxgoal; /* see SB */ 00066 float eff_force_scale;/* Scaling of effector forces (see softbody_calc_forces).*/ 00067 float eff_wind_scale; /* Scaling of effector wind (see softbody_calc_forces). */ 00068 float sim_time_old; 00069 float defgoal; 00070 float goalspring; 00071 float goalfrict; 00072 float velocity_smooth; /* smoothing of velocities for hair */ 00073 float collider_friction; /* friction with colliders */ 00074 00075 int stepsPerFrame; /* Number of time steps per frame. */ 00076 int flags; /* flags, see CSIMSETT_FLAGS enum above. */ 00077 int preroll; /* How many frames of simulation to do before we start. */ 00078 int maxspringlen; /* in percent!; if tearing enabled, a spring will get cut */ 00079 short solver_type; /* which solver should be used? txold */ 00080 short vgroup_bend; /* vertex group for scaling bending stiffness */ 00081 short vgroup_mass; /* optional vertexgroup name for assigning weight.*/ 00082 short vgroup_struct; /* vertex group for scaling structural stiffness */ 00083 short shapekey_rest; /* vertex group for scaling structural stiffness */ 00084 short presets; /* used for presets on GUI */ 00085 short reset; 00086 short pad[3]; 00087 00088 struct EffectorWeights *effector_weights; 00089 } ClothSimSettings; 00090 00091 00092 typedef struct ClothCollSettings 00093 { 00094 struct LinkNode *collision_list; /* e.g. pointer to temp memory for collisions */ 00095 float epsilon; /* min distance for collisions. */ 00096 float self_friction; /* Fiction/damping with self contact. */ 00097 float friction; /* Friction/damping applied on contact with other object.*/ 00098 float selfepsilon; /* for selfcollision */ 00099 float repel_force, distance_repel; 00100 int flags; /* collision flags defined in BKE_cloth.h */ 00101 short self_loop_count; /* How many iterations for the selfcollision loop */ 00102 short loop_count; /* How many iterations for the collision loop. */ 00103 struct Group *group; /* Only use colliders from this group of objects */ 00104 } ClothCollSettings; 00105 00106 00107 #endif