Blender  V3.3
Public Attributes | List of all members
ClothSimSettings Struct Reference

#include <DNA_cloth_types.h>

Public Attributes

struct LinkNodecache
 
float mingoal
 
float Cdis DNA_DEPRECATED
 
float Cvi
 
float gravity [3]
 
float dt
 
float mass
 
float structural DNA_DEPRECATED
 
float shear
 
float bending
 
float max_bend
 
float max_struct DNA_DEPRECATED
 
float max_shear
 
float max_sewing
 
float avg_spring_len
 
float timescale
 
float time_scale
 
float maxgoal
 
float eff_force_scale
 
float eff_wind_scale
 
float sim_time_old
 
float defgoal
 
float goalspring
 
float goalfrict
 
float velocity_smooth
 
float density_target
 
float density_strength
 
float collider_friction
 
float vel_damping DNA_DEPRECATED
 
float shrink_min
 
float shrink_max
 
float uniform_pressure_force
 
float target_volume
 
float pressure_factor
 
float fluid_density
 
short vgroup_pressure
 
char _pad7 [6]
 
float bending_damping
 
float voxel_cell_size
 
int stepsPerFrame
 
int flags
 
int preroll DNA_DEPRECATED
 
int maxspringlen
 
short solver_type
 
short vgroup_bend
 
short vgroup_mass
 
short vgroup_struct
 
short vgroup_shrink
 
short shapekey_rest
 
short presets
 
short reset
 
struct EffectorWeightseffector_weights
 
short bending_model
 
short vgroup_shear
 
float tension
 
float compression
 
float max_tension
 
float max_compression
 
float tension_damp
 
float compression_damp
 
float shear_damp
 
float internal_spring_max_length
 
float internal_spring_max_diversion
 
short vgroup_intern
 
char _pad1 [2]
 
float internal_tension
 
float internal_compression
 
float max_internal_tension
 
float max_internal_compression
 
char _pad0 [4]
 

Detailed Description

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.

Member Data Documentation

◆ _pad0

char ClothSimSettings::_pad0[4]

Definition at line 167 of file DNA_cloth_types.h.

◆ _pad1

char ClothSimSettings::_pad1[2]

Definition at line 162 of file DNA_cloth_types.h.

◆ _pad7

char ClothSimSettings::_pad7[6]

Definition at line 106 of file DNA_cloth_types.h.

◆ avg_spring_len

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().

◆ bending

float ClothSimSettings::bending

Flexion spring stiffness.

Definition at line 48 of file DNA_cloth_types.h.

Referenced by cloth_calc_spring_force().

◆ bending_damping

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().

◆ bending_model

short ClothSimSettings::bending_model

◆ cache

struct LinkNode* ClothSimSettings::cache

UNUSED.

Definition at line 30 of file DNA_cloth_types.h.

◆ collider_friction

float ClothSimSettings::collider_friction

Friction with colliders.

Definition at line 80 of file DNA_cloth_types.h.

◆ compression

float ClothSimSettings::compression

Definition at line 146 of file DNA_cloth_types.h.

Referenced by blo_do_versions_280(), and cloth_calc_spring_force().

◆ compression_damp

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().

◆ Cvi

float ClothSimSettings::Cvi

Viscous/fluid damping.

Definition at line 36 of file DNA_cloth_types.h.

Referenced by cloth_calc_force().

◆ defgoal

float ClothSimSettings::defgoal

Definition at line 70 of file DNA_cloth_types.h.

Referenced by cloth_apply_vgroup(), and cloth_from_object().

◆ density_strength

float ClothSimSettings::density_strength

Influence of hair density.

Definition at line 78 of file DNA_cloth_types.h.

Referenced by cloth_continuum_step().

◆ density_target

float ClothSimSettings::density_target

Minimum density for hair.

Definition at line 76 of file DNA_cloth_types.h.

Referenced by cloth_continuum_step().

◆ DNA_DEPRECATED [1/5]

float Cdis ClothSimSettings::DNA_DEPRECATED

Mechanical damping of springs.

Definition at line 34 of file DNA_cloth_types.h.

◆ DNA_DEPRECATED [2/5]

float structural ClothSimSettings::DNA_DEPRECATED

Structural spring stiffness.

Definition at line 44 of file DNA_cloth_types.h.

◆ DNA_DEPRECATED [3/5]

float max_struct ClothSimSettings::DNA_DEPRECATED

Max structural scaling value, min is "structural".

Definition at line 52 of file DNA_cloth_types.h.

◆ DNA_DEPRECATED [4/5]

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.

◆ DNA_DEPRECATED [5/5]

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.

◆ dt

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().

◆ eff_force_scale

float ClothSimSettings::eff_force_scale

Scaling of effector forces (see softbody_calc_forces).

Definition at line 66 of file DNA_cloth_types.h.

◆ eff_wind_scale

float ClothSimSettings::eff_wind_scale

Scaling of effector wind (see softbody_calc_forces).

Definition at line 68 of file DNA_cloth_types.h.

◆ effector_weights

struct EffectorWeights* ClothSimSettings::effector_weights

◆ flags

int ClothSimSettings::flags

◆ fluid_density

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().

◆ goalfrict

float ClothSimSettings::goalfrict

Definition at line 72 of file DNA_cloth_types.h.

Referenced by cloth_calc_force().

◆ goalspring

float ClothSimSettings::goalspring

Definition at line 71 of file DNA_cloth_types.h.

Referenced by cloth_calc_force(), and do_hair_dynamics().

◆ gravity

float ClothSimSettings::gravity[3]

Gravity/external force vector.

Definition at line 38 of file DNA_cloth_types.h.

Referenced by blo_do_versions_250().

◆ internal_compression

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().

◆ internal_spring_max_diversion

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().

◆ internal_spring_max_length

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().

◆ internal_tension

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().

◆ mass

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().

◆ max_bend

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().

◆ max_compression

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().

◆ max_internal_compression

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().

◆ max_internal_tension

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().

◆ max_sewing

float ClothSimSettings::max_sewing

Max sewing force.

Definition at line 56 of file DNA_cloth_types.h.

Referenced by cloth_calc_spring_force().

◆ max_shear

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().

◆ max_tension

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().

◆ maxgoal

float ClothSimSettings::maxgoal

See SB.

Definition at line 64 of file DNA_cloth_types.h.

◆ maxspringlen

int ClothSimSettings::maxspringlen

In percent!; if tearing enabled, a spring will get cut.

Definition at line 123 of file DNA_cloth_types.h.

◆ mingoal

float ClothSimSettings::mingoal

See SB.

Definition at line 32 of file DNA_cloth_types.h.

◆ presets

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().

◆ pressure_factor

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().

◆ reset

short ClothSimSettings::reset

Definition at line 138 of file DNA_cloth_types.h.

Referenced by BKE_modifier_blend_read_data(), and clothModifier_do().

◆ shapekey_rest

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().

◆ shear

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().

◆ shear_damp

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().

◆ shrink_max

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().

◆ shrink_min

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().

◆ sim_time_old

float ClothSimSettings::sim_time_old

Definition at line 69 of file DNA_cloth_types.h.

◆ solver_type

short ClothSimSettings::solver_type

Which solver should be used? txold.

Definition at line 125 of file DNA_cloth_types.h.

◆ stepsPerFrame

int ClothSimSettings::stepsPerFrame

Number of time steps per frame.

Definition at line 117 of file DNA_cloth_types.h.

Referenced by do_init_cloth().

◆ target_volume

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().

◆ tension

float ClothSimSettings::tension

Definition at line 145 of file DNA_cloth_types.h.

Referenced by blo_do_versions_280(), and cloth_calc_spring_force().

◆ tension_damp

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().

◆ time_scale

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().

◆ timescale

float ClothSimSettings::timescale

◆ uniform_pressure_force

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().

◆ velocity_smooth

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().

◆ vgroup_bend

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().

◆ vgroup_intern

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().

◆ vgroup_mass

short ClothSimSettings::vgroup_mass

◆ vgroup_pressure

short ClothSimSettings::vgroup_pressure

◆ vgroup_shear

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().

◆ vgroup_shrink

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().

◆ vgroup_struct

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().

◆ voxel_cell_size

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().


The documentation for this struct was generated from the following file: