Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Parborg <darkdefende@gmail.com>2019-11-27 16:56:16 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-11-27 17:01:15 +0300
commitf6cefbef22c8c6583b4927c179dabac3eb57aa22 (patch)
tree96785e2ee93f34bb14975a53bc2a4e003ee3fb59 /source/blender/makesdna/DNA_cloth_types.h
parenteb798de101ac7946e2d719e763ad1f0fd3e26acd (diff)
Fix T30941: Add cloth air pressure simulation
This adds some basic simulation of internal air pressure inside of closed cloth mesh objects. Reviewed By: Jacques Lucke Differential Revision: http://developer.blender.org/D5473
Diffstat (limited to 'source/blender/makesdna/DNA_cloth_types.h')
-rw-r--r--source/blender/makesdna/DNA_cloth_types.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_cloth_types.h b/source/blender/makesdna/DNA_cloth_types.h
index 9cedd8f0ebf..5653e8a0450 100644
--- a/source/blender/makesdna/DNA_cloth_types.h
+++ b/source/blender/makesdna/DNA_cloth_types.h
@@ -98,6 +98,17 @@ typedef struct ClothSimSettings {
/** Max amount to shrink cloth by 0.0f (no shrink) - 1.0f (shrink to nothing). */
float shrink_max;
+ /* Air pressure */
+ /* The uniform pressure that is constanty applied to the mesh. Can be negative */
+ float uniform_pressure_force;
+ /* User set volume. This is the volume the mesh wants to expand to (the equilibrium volume). */
+ float target_volume;
+ /* The scaling factor to apply to the actual pressure.
+ pressure=( (current_volume/target_volume) - 1 + uniform_pressure_force) *
+ pressure_factor */
+ float pressure_factor;
+ char _pad7[4];
+
/* XXX various hair stuff
* should really be separate, this struct is a horrible mess already
*/