diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-11-14 13:10:45 +0300 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2015-01-20 11:30:07 +0300 |
commit | 42fc88de43bd1b003e7d2fd7aaa030f471a8d4ce (patch) | |
tree | 91c805e39aeb3f338aedbf5da200b81e73318363 /source/blender/physics/intern/BPH_mass_spring.cpp | |
parent | e73df249c7f0e5acfcb187e6eb86246b44ae06f9 (diff) |
Fallback method for defining density in the hair grid using discrete
samples.
This is just an intermediate method to make sure the density is valid.
Eventually the closest-point method should be used, but for testing
the poisson solver this is easier to debug.
Conflicts:
source/blender/physics/intern/BPH_mass_spring.cpp
Diffstat (limited to 'source/blender/physics/intern/BPH_mass_spring.cpp')
-rw-r--r-- | source/blender/physics/intern/BPH_mass_spring.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp index 945cc0d6044..c51cb3189cd 100644 --- a/source/blender/physics/intern/BPH_mass_spring.cpp +++ b/source/blender/physics/intern/BPH_mass_spring.cpp @@ -765,6 +765,8 @@ static void cloth_continuum_step(ClothModifierData *clmd, float dt) if (!is_zero_v3(gvel) || !is_zero_v3(gvel_smooth)) {
BKE_sim_debug_data_add_vector(clmd->debug_data, x, gvel, 0.4, 0, 1, "grid velocity", hash_int_2d(hash_int_2d(i, j), 3112));
BKE_sim_debug_data_add_vector(clmd->debug_data, x, gvel_smooth, 0.6, 4, 1, "grid velocity", hash_int_2d(hash_int_2d(i, j), 3113));
+ if (gdensity > 0.0f)
+ BKE_sim_debug_data_add_circle(clmd->debug_data, x, gdensity * clmd->sim_parms->density_strength, 0, 1, 0.4, "grid velocity", hash_int_2d(354, hash_int_2d(i, j)));
}
}
}
|