diff options
Diffstat (limited to 'source/blender/physics/intern/hair_volume.cpp')
-rw-r--r-- | source/blender/physics/intern/hair_volume.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/source/blender/physics/intern/hair_volume.cpp b/source/blender/physics/intern/hair_volume.cpp index cd869046cc1..b59ac46abbc 100644 --- a/source/blender/physics/intern/hair_volume.cpp +++ b/source/blender/physics/intern/hair_volume.cpp @@ -1099,56 +1099,3 @@ static HairGridVert *hair_volume_create_collision_grid(ClothModifierData *clmd, return collgrid; } #endif - -bool BPH_hair_volume_get_texture_data(HairGrid *grid, VoxelData *vd) -{ - int totres, i; - int depth; - - vd->resol[0] = grid->res[0]; - vd->resol[1] = grid->res[1]; - vd->resol[2] = grid->res[2]; - - totres = hair_grid_size(grid->res); - - if (vd->hair_type == TEX_VD_HAIRVELOCITY) { - depth = 4; - vd->data_type = TEX_VD_RGBA_PREMUL; - } - else { - depth = 1; - vd->data_type = TEX_VD_INTENSITY; - } - - if (totres > 0) { - vd->dataset = (float *)MEM_mapallocN(sizeof(float) * depth * (totres), "hair volume texture data"); - - for (i = 0; i < totres; ++i) { - switch (vd->hair_type) { - case TEX_VD_HAIRDENSITY: - vd->dataset[i] = grid->verts[i].density; - break; - - case TEX_VD_HAIRRESTDENSITY: - vd->dataset[i] = 0.0f; // TODO - break; - - case TEX_VD_HAIRVELOCITY: { - vd->dataset[i + 0*totres] = grid->verts[i].velocity[0]; - vd->dataset[i + 1*totres] = grid->verts[i].velocity[1]; - vd->dataset[i + 2*totres] = grid->verts[i].velocity[2]; - vd->dataset[i + 3*totres] = len_v3(grid->verts[i].velocity); - break; - } - case TEX_VD_HAIRENERGY: - vd->dataset[i] = 0.0f; // TODO - break; - } - } - } - else { - vd->dataset = NULL; - } - - return true; -} |