From f1e49038543cf75766f4a220f62cdc6cdbc0e27d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 26 Jun 2021 21:35:18 +1000 Subject: Cleanup: full sentences in comments, improve comment formatting --- source/blender/simulation/intern/SIM_mass_spring.cpp | 8 +++++--- source/blender/simulation/intern/hair_volume.cpp | 4 ++-- source/blender/simulation/intern/implicit_blender.c | 8 ++++---- 3 files changed, 11 insertions(+), 9 deletions(-) (limited to 'source/blender/simulation/intern') diff --git a/source/blender/simulation/intern/SIM_mass_spring.cpp b/source/blender/simulation/intern/SIM_mass_spring.cpp index 3a82c1c2e4e..cf654ebff07 100644 --- a/source/blender/simulation/intern/SIM_mass_spring.cpp +++ b/source/blender/simulation/intern/SIM_mass_spring.cpp @@ -277,10 +277,12 @@ static void cloth_setup_constraints(ClothModifierData *clmd) } } -/* computes where the cloth would be if it were subject to perfectly stiff edges +/** + * Computes where the cloth would be if it were subject to perfectly stiff edges * (edge distance constraints) in a lagrangian solver. then add forces to help * guide the implicit solver to that state. this function is called after - * collisions*/ + * collisions. + */ static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), ClothModifierData *clmd, float (*initial_cos)[3], @@ -352,7 +354,7 @@ static int UNUSED_FUNCTION(cloth_calc_helper_forces)(Object *UNUSED(ob), for (i = 0; i < cloth->mvert_num; i++, cv++) { float vec[3]; - /*compute forces*/ + /* Compute forces. */ sub_v3_v3v3(vec, cos[i], cv->tx); mul_v3_fl(vec, cv->mass * dt * 20.0f); add_v3_v3(cv->tv, vec); diff --git a/source/blender/simulation/intern/hair_volume.cpp b/source/blender/simulation/intern/hair_volume.cpp index 08af2344bc4..d954d9b5fff 100644 --- a/source/blender/simulation/intern/hair_volume.cpp +++ b/source/blender/simulation/intern/hair_volume.cpp @@ -722,7 +722,7 @@ bool SIM_hair_volume_solve_divergence(HairGrid *grid, const float flowfac = grid->cellsize; const float inv_flowfac = 1.0f / grid->cellsize; - /*const int num_cells = hair_grid_size(grid->res);*/ + // const int num_cells = hair_grid_size(grid->res); const int res[3] = {grid->res[0], grid->res[1], grid->res[2]}; const int resA[3] = {grid->res[0] + 2, grid->res[1] + 2, grid->res[2] + 2}; @@ -891,7 +891,7 @@ bool SIM_hair_volume_solve_divergence(HairGrid *grid, neighbor_hi_index[neighbors_hi++] = u + strideA2; } - /*int liquid_neighbors = neighbors_lo + neighbors_hi;*/ + // int liquid_neighbors = neighbors_lo + neighbors_hi; non_solid_neighbors = 6; for (n = 0; n < neighbors_lo; n++) { diff --git a/source/blender/simulation/intern/implicit_blender.c b/source/blender/simulation/intern/implicit_blender.c index cf092d7716a..4c01fd3aee0 100644 --- a/source/blender/simulation/intern/implicit_blender.c +++ b/source/blender/simulation/intern/implicit_blender.c @@ -168,7 +168,7 @@ DO_INLINE void zero_lfvector(float (*to)[3], unsigned int verts) { memset(to, 0.0f, verts * sizeof(lfVector)); } -/* multiply long vector with scalar*/ +/* Multiply long vector with scalar. */ DO_INLINE void mul_lfvectorS(float (*to)[3], float (*fLongVector)[3], float scalar, @@ -180,7 +180,7 @@ DO_INLINE void mul_lfvectorS(float (*to)[3], mul_fvector_S(to[i], fLongVector[i], scalar); } } -/* multiply long vector with scalar*/ +/* Multiply long vector with scalar. */ /* A -= B * float */ DO_INLINE void submul_lfvectorS(float (*to)[3], float (*fLongVector)[3], @@ -613,7 +613,7 @@ DO_INLINE void initdiag_bfmatrix(fmatrix3x3 *matrix, float m3[3][3]) } } -/* SPARSE SYMMETRIC multiply big matrix with long vector*/ +/* SPARSE SYMMETRIC multiply big matrix with long vector. */ /* STATUS: verified */ DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector *fLongVector) { @@ -644,7 +644,7 @@ DO_INLINE void mul_bfmatrix_lfvector(float (*to)[3], fmatrix3x3 *from, lfVector del_lfvector(temp); } -/* SPARSE SYMMETRIC sub big matrix with big matrix*/ +/* SPARSE SYMMETRIC sub big matrix with big matrix. */ /* A -= B * float + C * float --> for big matrix */ /* VERIFIED */ DO_INLINE void subadd_bfmatrixS_bfmatrixS( -- cgit v1.2.3