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-10-31 16:23:32 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2015-01-20 11:30:05 +0300
commitc3968861b3e5a81e138003cca2b51a040a0ed454 (patch)
treec197df6f86c76ead3e76c9b3f4fc7caa0f4b584d /source/blender/physics/intern/BPH_mass_spring.cpp
parentaea309779f631e4f0bb6fa2a38f39d4f4db4de97 (diff)
Debug drawing feature to visualize the hair continuum grid.
Diffstat (limited to 'source/blender/physics/intern/BPH_mass_spring.cpp')
-rw-r--r--source/blender/physics/intern/BPH_mass_spring.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 821b08ce334..55475d06d8d 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -601,6 +601,11 @@ static void cloth_continuum_step(ClothModifierData *clmd)
float gmin[3], gmax[3];
int i;
+ /* clear grid info */
+ zero_v3_int(clmd->hair_grid_res);
+ zero_v3(clmd->hair_grid_min);
+ zero_v3(clmd->hair_grid_max);
+
hair_get_boundbox(clmd, gmin, gmax);
/* gather velocities & density */
@@ -637,6 +642,9 @@ static void cloth_continuum_step(ClothModifierData *clmd)
BPH_mass_spring_set_new_velocity(data, i, nv);
}
+ /* store basic grid info in the modifier data */
+ BPH_hair_volume_grid_geometry(vertex_grid, NULL, clmd->hair_grid_res, clmd->hair_grid_min, clmd->hair_grid_max);
+
BPH_hair_volume_free_vertex_grid(vertex_grid);
}
}