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>2014-09-15 14:10:49 +0400
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:01 +0300
commit02c8bf99c9b8bc7302d3f8e7585f11685a846624 (patch)
treebcbef994e0d791efd564d7fa60339ed7f5471860 /source/blender/physics/intern/implicit_eigen.cpp
parentdd0a7444d8e2bd3366fb91710bf4349aa5b69351 (diff)
Added back spring force definitions outside the implicit solver.
There are currently 3 types of springs: basic linear springs, goal springs toward a fixed global target (not recommended, but works) and bending springs. These are agnostic to the specific spring definition in the cloth system so hair systems can use the same API without converting everything to cloth first. Conflicts: source/blender/physics/intern/implicit_blender.c
Diffstat (limited to 'source/blender/physics/intern/implicit_eigen.cpp')
-rw-r--r--source/blender/physics/intern/implicit_eigen.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/physics/intern/implicit_eigen.cpp b/source/blender/physics/intern/implicit_eigen.cpp
index d391907743a..6525a492085 100644
--- a/source/blender/physics/intern/implicit_eigen.cpp
+++ b/source/blender/physics/intern/implicit_eigen.cpp
@@ -612,7 +612,7 @@ static void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, con
sub_v3_v3v3(extent, lVector_v3(X, s->kl), lVector_v3(X, s->ij));
sub_v3_v3v3(vel, lVector_v3(V, s->kl), lVector_v3(V, s->ij));
dot = dot_v3v3(extent, extent);
- length = sqrt(dot);
+ length = sqrtf(dot);
if (length > ALMOST_ZERO) {
/*
@@ -683,7 +683,7 @@ static void cloth_calc_spring_force(ClothModifierData *clmd, ClothSpring *s, con
// SEE MSG BELOW (these are UNUSED)
// dot = dot_v3v3(extent, extent);
- // length = sqrt(dot);
+ // length = sqrtf(dot);
k = clmd->sim_parms->goalspring;
scaling = k + s->stiffness * fabsf(clmd->sim_parms->max_struct - k);