diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-01 14:33:30 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-03-01 14:33:30 +0300 |
commit | dfefd3683710a4bf70cf90c874b65a9c118d2c06 (patch) | |
tree | ccf13a6ec8a4d8172e4c5721a12ebceb6d6c547c /source/blender/physics/intern/implicit_blender.c | |
parent | 9f6f151536b24f3329e357c8cbe05c2069578866 (diff) |
Fix T43406: Bring back cloth collisions.
This was disabled during the course of hair dynamics work. The cloth
collision solution is based on a secondary velocity-only solver step.
While this approach is usable in general, the collision response
calculation still does not work well for hair meshes. Better contact
point generation is needed here (Bullet) and preferably an improved
solver for unilateral constraints.
Diffstat (limited to 'source/blender/physics/intern/implicit_blender.c')
-rw-r--r-- | source/blender/physics/intern/implicit_blender.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/blender/physics/intern/implicit_blender.c b/source/blender/physics/intern/implicit_blender.c index e6ba55ab605..5b1d83a3eef 100644 --- a/source/blender/physics/intern/implicit_blender.c +++ b/source/blender/physics/intern/implicit_blender.c @@ -1225,6 +1225,16 @@ void BPH_mass_spring_get_position(struct Implicit_Data *data, int index, float x root_to_world_v3(data, index, x, data->X[index]); } +void BPH_mass_spring_get_new_position(struct Implicit_Data *data, int index, float x[3]) +{ + root_to_world_v3(data, index, x, data->Xnew[index]); +} + +void BPH_mass_spring_set_new_position(struct Implicit_Data *data, int index, const float x[3]) +{ + world_to_root_v3(data, index, data->Xnew[index], x); +} + void BPH_mass_spring_get_new_velocity(struct Implicit_Data *data, int index, float v[3]) { root_to_world_v3(data, index, v, data->Vnew[index]); |