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:
authorLukas Tönne <lukas.toenne@gmail.com>2015-03-01 14:33:30 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-03-01 14:33:30 +0300
commitdfefd3683710a4bf70cf90c874b65a9c118d2c06 (patch)
treeccf13a6ec8a4d8172e4c5721a12ebceb6d6c547c /source/blender/physics/intern/implicit_blender.c
parent9f6f151536b24f3329e357c8cbe05c2069578866 (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.c10
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]);