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-12-09 21:10:55 +0300
committerSebastian Parborg <darkdefende@gmail.com>2019-12-09 21:18:10 +0300
commit62ef59aa0cca736b09192b67cc924180d9c2f9f9 (patch)
treef0f76383b9536a5186abe0072b1a535e587cef22 /source/blender/blenkernel/BKE_cloth.h
parente77fdc62b75a3b96e4c3ca5c2fc4025d8091ff99 (diff)
Add the ability to create internal springs to the cloth sim
This can be used to make closed surfaces behave more like a soft body. Reviewed By: Jacques Lucke Differential Revision: http://developer.blender.org/D5788
Diffstat (limited to 'source/blender/blenkernel/BKE_cloth.h')
-rw-r--r--source/blender/blenkernel/BKE_cloth.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h
index d59a81c1baf..17de53be42a 100644
--- a/source/blender/blenkernel/BKE_cloth.h
+++ b/source/blender/blenkernel/BKE_cloth.h
@@ -115,6 +115,7 @@ typedef struct ClothVertex {
float shear_stiff;
int spring_count; /* how many springs attached? */
float shrink_factor; /* how much to shrink this cloth */
+ float internal_stiff; /* internal spring stiffness scaling */
float pressure_factor; /* how much pressure should affect this vertex */
} ClothVertex;
@@ -198,8 +199,12 @@ typedef enum {
CLOTH_SIMSETTINGS_FLAG_PRESSURE = (1 << 5),
/** Use the user defined target volume. */
CLOTH_SIMSETTINGS_FLAG_PRESSURE_VOL = (1 << 6),
+ /** True if internal spring generation is enabled. */
+ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS = (1 << 7),
/** DEPRECATED, for versioning only. */
CLOTH_SIMSETTINGS_FLAG_SCALING = (1 << 8),
+ /** Require internal springs to be created between points with opposite normals. */
+ CLOTH_SIMSETTINGS_FLAG_INTERNAL_SPRINGS_NORMAL = (1 << 9),
/** Edit cache in edit-mode. */
CLOTH_SIMSETTINGS_FLAG_CCACHE_EDIT = (1 << 12),
/** Don't allow spring compression. */
@@ -230,6 +235,7 @@ typedef enum {
CLOTH_SPRING_TYPE_GOAL = (1 << 4),
CLOTH_SPRING_TYPE_SEWING = (1 << 5),
CLOTH_SPRING_TYPE_BENDING_HAIR = (1 << 6),
+ CLOTH_SPRING_TYPE_INTERNAL = (1 << 7),
} CLOTH_SPRING_TYPES;
/* SPRING FLAGS */