diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2016-04-18 18:48:22 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2016-05-06 11:40:19 +0300 |
commit | 2a9ddc808de117786c354a2a6b72c68437d18808 (patch) | |
tree | ae12548cd93d8dc6657dbb631c101971034ff1ac /source/blender/blenkernel/BKE_cloth.h | |
parent | fcfbe27826bf900e8ecc10927b6415edfc316e78 (diff) |
Cloth: Change ClothVertex::xrest to actually store the rest position.
Originally the value was only needed when building the springs,
so a pointer to the input data was somewhat ok. However, recalculating
spring length dynamically requires keeping the actual value around.
Diffstat (limited to 'source/blender/blenkernel/BKE_cloth.h')
-rw-r--r-- | source/blender/blenkernel/BKE_cloth.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_cloth.h b/source/blender/blenkernel/BKE_cloth.h index 28de270bbd1..50fcbd8e139 100644 --- a/source/blender/blenkernel/BKE_cloth.h +++ b/source/blender/blenkernel/BKE_cloth.h @@ -115,7 +115,7 @@ typedef struct ClothVertex { float mass; /* mass / weight of the vertex */ float goal; /* goal, from SB */ float impulse[3]; /* used in collision.c */ - float *xrest; /* temporary valid for building springs */ + float xrest[3]; /* rest position of the vertex */ unsigned int impulse_count; /* same as above */ float avg_spring_len; /* average length of connected springs */ float struct_stiff; |