diff options
author | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 16:56:16 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2019-11-27 17:01:15 +0300 |
commit | f6cefbef22c8c6583b4927c179dabac3eb57aa22 (patch) | |
tree | 96785e2ee93f34bb14975a53bc2a4e003ee3fb59 /source/blender/blenkernel/BKE_cloth.h | |
parent | eb798de101ac7946e2d719e763ad1f0fd3e26acd (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/blenkernel/BKE_cloth.h')
-rw-r--r-- | source/blender/blenkernel/BKE_cloth.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 01f94c39215..0543021afef 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -87,7 +87,8 @@ typedef struct Cloth { struct MVertTri *tri; struct Implicit_Data *implicit; /* our implicit solver connects to this pointer */ struct EdgeSet *edgeset; /* used for selfcollisions */ - int last_frame, pad4; + int last_frame; + float initial_mesh_volume; /* Initial volume of the mesh. Used for pressure */ } Cloth; /** @@ -192,6 +193,10 @@ typedef enum { CLOTH_SIMSETTINGS_FLAG_GOAL = (1 << 3), /** True if tearing is enabled. */ CLOTH_SIMSETTINGS_FLAG_TEARING = (1 << 4), + /** True if pressure sim is enabled. */ + CLOTH_SIMSETTINGS_FLAG_PRESSURE = (1 << 5), + /** Use the user defined target volume. */ + CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL = (1 << 6), /** DEPRECATED, for versioning only. */ CLOTH_SIMSETTINGS_FLAG_SCALING = (1 << 8), /** Edit cache in edit-mode. */ |