Blender
V3.3
|
#include <DNA_cloth_types.h>
This struct contains all the global data required to run a simulation. At the time of this writing, this structure contains data appropriate to run a simulation as described in Deformation Constraints in a Mass-Spring Model to Describe Rigid Cloth Behavior by Xavier Provot.
I've tried to keep similar, if not exact names for the variables as are presented in the paper. Where I've changed the concept slightly, as in stepsPerFrame
compared to the time step in the paper, I've used variables with different names to minimize confusion.
Definition at line 28 of file DNA_cloth_types.h.
char ClothSimSettings::_pad0[4] |
Definition at line 167 of file DNA_cloth_types.h.
char ClothSimSettings::_pad1[2] |
Definition at line 162 of file DNA_cloth_types.h.
char ClothSimSettings::_pad7[6] |
Definition at line 106 of file DNA_cloth_types.h.
float ClothSimSettings::avg_spring_len |
Used for normalized springs.
Definition at line 58 of file DNA_cloth_types.h.
Referenced by cloth_build_springs(), cloth_calc_force(), cloth_calc_spring_force(), and cloth_update_spring_lengths().
float ClothSimSettings::bending |
Flexion spring stiffness.
Definition at line 48 of file DNA_cloth_types.h.
Referenced by cloth_calc_spring_force().
float ClothSimSettings::bending_damping |
Damping of bending springs.
Definition at line 112 of file DNA_cloth_types.h.
Referenced by blo_do_versions_270(), and cloth_calc_spring_force().
short ClothSimSettings::bending_model |
Definition at line 142 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), cloth_add_shear_bend_spring(), cloth_build_springs(), cloth_calc_spring_force(), and cloth_update_springs().
struct LinkNode* ClothSimSettings::cache |
UNUSED.
Definition at line 30 of file DNA_cloth_types.h.
float ClothSimSettings::collider_friction |
Friction with colliders.
Definition at line 80 of file DNA_cloth_types.h.
float ClothSimSettings::compression |
Definition at line 146 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::compression_damp |
Mechanical damping of compression springs.
Definition at line 152 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::Cvi |
Viscous/fluid damping.
Definition at line 36 of file DNA_cloth_types.h.
Referenced by cloth_calc_force().
float ClothSimSettings::defgoal |
Definition at line 70 of file DNA_cloth_types.h.
Referenced by cloth_apply_vgroup(), and cloth_from_object().
float ClothSimSettings::density_strength |
Influence of hair density.
Definition at line 78 of file DNA_cloth_types.h.
Referenced by cloth_continuum_step().
float ClothSimSettings::density_target |
Minimum density for hair.
Definition at line 76 of file DNA_cloth_types.h.
Referenced by cloth_continuum_step().
float Cdis ClothSimSettings::DNA_DEPRECATED |
Mechanical damping of springs.
Definition at line 34 of file DNA_cloth_types.h.
float structural ClothSimSettings::DNA_DEPRECATED |
Structural spring stiffness.
Definition at line 44 of file DNA_cloth_types.h.
float max_struct ClothSimSettings::DNA_DEPRECATED |
Max structural scaling value, min is "structural".
Definition at line 52 of file DNA_cloth_types.h.
float vel_damping ClothSimSettings::DNA_DEPRECATED |
Damp the velocity to speed up getting to the resting position.
Definition at line 82 of file DNA_cloth_types.h.
int preroll ClothSimSettings::DNA_DEPRECATED |
How many frames of simulation to do before we start.
Definition at line 121 of file DNA_cloth_types.h.
float ClothSimSettings::dt |
This is the duration of our time step, computed.
Definition at line 40 of file DNA_cloth_types.h.
Referenced by cloth_collision_response_static(), cloth_selfcollision_response_static(), cloth_solve_collisions(), do_init_cloth(), and SIM_cloth_solve().
float ClothSimSettings::eff_force_scale |
Scaling of effector forces (see softbody_calc_forces).
Definition at line 66 of file DNA_cloth_types.h.
float ClothSimSettings::eff_wind_scale |
Scaling of effector wind (see softbody_calc_forces).
Definition at line 68 of file DNA_cloth_types.h.
struct EffectorWeights* ClothSimSettings::effector_weights |
Definition at line 140 of file DNA_cloth_types.h.
Referenced by BKE_modifier_blend_read_data(), BKE_modifier_blend_write(), BKE_particle_system_blend_read_data(), blo_do_versions_250(), cloth_calc_force(), copyData(), do_hair_dynamics(), do_step_cloth(), foreachIDLink(), freeData(), initData(), and updateDepsgraph().
int ClothSimSettings::flags |
Flags, see CSIMSETT_FLAGS enum above.
Definition at line 119 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), cloth_build_springs(), cloth_bvh_collision(), cloth_bvh_selfcollision_is_active(), cloth_calc_force(), cloth_calc_spring_force(), cloth_from_object(), do_hair_dynamics(), do_init_cloth(), do_step_cloth(), and SIM_cloth_solve().
float ClothSimSettings::fluid_density |
Density of the fluid inside or outside the object for use in the hydro-static pressure gradient.
Definition at line 104 of file DNA_cloth_types.h.
Referenced by cloth_calc_force(), and SIM_cloth_solve().
float ClothSimSettings::goalfrict |
Definition at line 72 of file DNA_cloth_types.h.
Referenced by cloth_calc_force().
float ClothSimSettings::goalspring |
Definition at line 71 of file DNA_cloth_types.h.
Referenced by cloth_calc_force(), and do_hair_dynamics().
float ClothSimSettings::gravity[3] |
Gravity/external force vector.
Definition at line 38 of file DNA_cloth_types.h.
Referenced by blo_do_versions_250().
float ClothSimSettings::internal_compression |
Definition at line 164 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::internal_spring_max_diversion |
How much the internal spring can diverge from the vertex normal during creation.
Definition at line 159 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_build_springs().
float ClothSimSettings::internal_spring_max_length |
The maximum length an internal spring can have during creation.
Definition at line 157 of file DNA_cloth_types.h.
Referenced by cloth_build_springs().
float ClothSimSettings::internal_tension |
Definition at line 163 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::mass |
The mass of the entire cloth.
Definition at line 42 of file DNA_cloth_types.h.
Referenced by cloth_from_object(), and do_step_cloth().
float ClothSimSettings::max_bend |
Max bending scaling value, min is "bending".
Definition at line 50 of file DNA_cloth_types.h.
Referenced by cloth_calc_spring_force().
float ClothSimSettings::max_compression |
Definition at line 148 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::max_internal_compression |
Definition at line 166 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::max_internal_tension |
Definition at line 165 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::max_sewing |
Max sewing force.
Definition at line 56 of file DNA_cloth_types.h.
Referenced by cloth_calc_spring_force().
float ClothSimSettings::max_shear |
Max shear scaling value.
Definition at line 54 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::max_tension |
Definition at line 147 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::maxgoal |
See SB.
Definition at line 64 of file DNA_cloth_types.h.
int ClothSimSettings::maxspringlen |
In percent!; if tearing enabled, a spring will get cut.
Definition at line 123 of file DNA_cloth_types.h.
float ClothSimSettings::mingoal |
See SB.
Definition at line 32 of file DNA_cloth_types.h.
short ClothSimSettings::presets |
Used for presets on GUI.
Definition at line 137 of file DNA_cloth_types.h.
Referenced by BKE_modifier_blend_read_data(), and BKE_particle_system_blend_read_data().
float ClothSimSettings::pressure_factor |
The scaling factor to apply to the actual pressure. pressure = ((current_volume/target_volume) - 1 + uniform_pressure_force) * pressure_factor
Definition at line 99 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_force().
short ClothSimSettings::reset |
Definition at line 138 of file DNA_cloth_types.h.
Referenced by BKE_modifier_blend_read_data(), and clothModifier_do().
short ClothSimSettings::shapekey_rest |
Vertex group for scaling structural stiffness.
Definition at line 135 of file DNA_cloth_types.h.
Referenced by cloth_build_springs(), cloth_from_object(), deformVerts(), get_orco_coords(), and requiredDataMask().
float ClothSimSettings::shear |
Shear spring stiffness.
Definition at line 46 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::shear_damp |
Mechanical damping of shear springs.
Definition at line 154 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::shrink_max |
Max amount to shrink cloth by 0.0f (no shrink), 1.0f (shrink to nothing), -1.0f (double the edge length).
Definition at line 88 of file DNA_cloth_types.h.
Referenced by cloth_shrink_factor().
float ClothSimSettings::shrink_min |
Min amount to shrink cloth by 0.0f (no shrink), 1.0f (shrink to nothing), -1.0f (double the edge length).
Definition at line 85 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), cloth_shrink_factor(), and do_step_cloth().
float ClothSimSettings::sim_time_old |
Definition at line 69 of file DNA_cloth_types.h.
short ClothSimSettings::solver_type |
Which solver should be used? txold.
Definition at line 125 of file DNA_cloth_types.h.
int ClothSimSettings::stepsPerFrame |
Number of time steps per frame.
Definition at line 117 of file DNA_cloth_types.h.
Referenced by do_init_cloth().
float ClothSimSettings::target_volume |
User set volume. This is the volume the mesh wants to expand to (the equilibrium volume).
Definition at line 94 of file DNA_cloth_types.h.
Referenced by cloth_calc_force().
float ClothSimSettings::tension |
Definition at line 145 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::tension_damp |
Mechanical damping of tension springs.
Definition at line 150 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_calc_spring_force().
float ClothSimSettings::time_scale |
Multiplies cloth speed.
Definition at line 62 of file DNA_cloth_types.h.
Referenced by blo_do_versions_270(), cloth_calc_force(), clothModifier_do(), and SIM_cloth_solve().
float ClothSimSettings::timescale |
Parameter how fast cloth runs.
Definition at line 60 of file DNA_cloth_types.h.
Referenced by cloth_collision_response_static(), cloth_selfcollision_response_static(), cloth_solve_collisions(), clothModifier_do(), and SIM_cloth_solve().
float ClothSimSettings::uniform_pressure_force |
The uniform pressure that is constantly applied to the mesh. Can be negative.
Definition at line 92 of file DNA_cloth_types.h.
Referenced by cloth_calc_force().
float ClothSimSettings::velocity_smooth |
Smoothing of velocities for hair.
Definition at line 74 of file DNA_cloth_types.h.
Referenced by blo_do_versions_250(), and cloth_continuum_step().
short ClothSimSettings::vgroup_bend |
Vertex group for scaling bending stiffness.
Definition at line 127 of file DNA_cloth_types.h.
Referenced by BKE_object_defgroup_remap_update_users(), blo_do_versions_280(), cloth_apply_vgroup(), and cloth_uses_vgroup().
short ClothSimSettings::vgroup_intern |
Vertex group for scaling structural stiffness.
Definition at line 161 of file DNA_cloth_types.h.
Referenced by cloth_apply_vgroup(), and cloth_uses_vgroup().
short ClothSimSettings::vgroup_mass |
Optional vertexgroup name for assigning weight.
Definition at line 129 of file DNA_cloth_types.h.
Referenced by BKE_object_defgroup_remap_update_users(), blo_do_versions_280(), cloth_apply_vgroup(), cloth_bvh_collision(), cloth_from_object(), cloth_solve_collisions(), cloth_uses_vgroup(), hair_create_input_mesh(), and SIM_cloth_solve().
short ClothSimSettings::vgroup_pressure |
Definition at line 105 of file DNA_cloth_types.h.
Referenced by cloth_apply_vgroup(), cloth_get_pressure_weights(), and cloth_uses_vgroup().
short ClothSimSettings::vgroup_shear |
Vertex group for scaling structural stiffness.
Definition at line 144 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), and cloth_apply_vgroup().
short ClothSimSettings::vgroup_shrink |
Vertex group for shrinking cloth.
Definition at line 133 of file DNA_cloth_types.h.
Referenced by blo_do_versions_280(), cloth_apply_vgroup(), cloth_uses_vgroup(), and do_step_cloth().
short ClothSimSettings::vgroup_struct |
Vertex group for scaling structural stiffness.
Definition at line 131 of file DNA_cloth_types.h.
Referenced by BKE_object_defgroup_remap_update_users(), blo_do_versions_280(), cloth_apply_vgroup(), and cloth_uses_vgroup().
float ClothSimSettings::voxel_cell_size |
Size of voxel grid cells for continuum dynamics.
Definition at line 114 of file DNA_cloth_types.h.
Referenced by cloth_continuum_step().