Changeset View
Changeset View
Standalone View
Standalone View
source/blender/simulation/intern/hair_volume.cpp
| Show First 20 Lines • Show All 92 Lines • ▼ Show 20 Lines | |||||
| zero_v3(collgrid[i].velocity); | zero_v3(collgrid[i].velocity); | ||||
| collgrid[i].density = 0.0f; | collgrid[i].density = 0.0f; | ||||
| } | } | ||||
| /* gather colliders */ | /* gather colliders */ | ||||
| colliders = BKE_collider_cache_create(depsgraph, NULL, NULL); | colliders = BKE_collider_cache_create(depsgraph, NULL, NULL); | ||||
| if (colliders && collfac > 0.0f) { | if (colliders && collfac > 0.0f) { | ||||
| for (col = colliders->first; col; col = col->next) { | for (col = colliders->first; col; col = col->next) { | ||||
| MVert *loc0 = col->collmd->x; | float3 *loc0 = col->collmd->x; | ||||
| MVert *loc1 = col->collmd->xnew; | float3 *loc1 = col->collmd->xnew; | ||||
| float vel[3]; | float vel[3]; | ||||
| float weights[8]; | float weights[8]; | ||||
| int di, dj, dk; | int di, dj, dk; | ||||
| for (v = 0; v < col->collmd->numverts; v++, loc0++, loc1++) { | for (v = 0; v < col->collmd->numverts; v++, loc0++, loc1++) { | ||||
| int offset; | int offset; | ||||
| if (!hair_grid_point_valid(loc1->co, gmin, gmax)) { | if (!hair_grid_point_valid(loc1->co, gmin, gmax)) { | ||||
| Show All 34 Lines | |||||