diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:35:18 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-06-26 14:50:48 +0300 |
commit | f1e49038543cf75766f4a220f62cdc6cdbc0e27d (patch) | |
tree | 0cec2c64739a6a4ca246fe26bed6fe629ea315cb /source/blender/modifiers/intern/MOD_screw.c | |
parent | fae5a907d4d1380f087f1226ebbd65d9d0718cc6 (diff) |
Cleanup: full sentences in comments, improve comment formatting
Diffstat (limited to 'source/blender/modifiers/intern/MOD_screw.c')
-rw-r--r-- | source/blender/modifiers/intern/MOD_screw.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/modifiers/intern/MOD_screw.c b/source/blender/modifiers/intern/MOD_screw.c index b236e0896b7..9c577be1b77 100644 --- a/source/blender/modifiers/intern/MOD_screw.c +++ b/source/blender/modifiers/intern/MOD_screw.c @@ -518,7 +518,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } } else { - /*printf("\n\n\n\n\nStarting Modifier\n");*/ + // printf("\n\n\n\n\nStarting Modifier\n"); /* set edge users */ med_new = medge_new; mv_new = mvert_new; @@ -539,7 +539,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] + vc->co[other_axis_2] * vc->co[other_axis_2]; - /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/ + // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist); } } else { @@ -556,7 +556,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * vc->dist = vc->co[other_axis_1] * vc->co[other_axis_1] + vc->co[other_axis_2] * vc->co[other_axis_2]; - /* printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist);*/ + // printf("location %f %f %f -- %f\n", vc->co[0], vc->co[1], vc->co[2], vc->dist); } } @@ -606,43 +606,43 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* compiler complains if not initialized, but it should be initialized below */ bool ed_loop_flip = false; - /*printf("Loop on connected vert: %i\n", i);*/ + // printf("Loop on connected vert: %i\n", i); for (j = 0; j < 2; j++) { - /*printf("\tSide: %i\n", j);*/ + // printf("\tSide: %i\n", j); screwvert_iter_init(<_iter, vert_connect, i, j); if (j == 1) { screwvert_iter_step(<_iter); } while (lt_iter.v_poin) { - /*printf("\t\tVERT: %i\n", lt_iter.v);*/ + // printf("\t\tVERT: %i\n", lt_iter.v); if (lt_iter.v_poin->flag) { - /*printf("\t\t\tBreaking Found end\n");*/ + // printf("\t\t\tBreaking Found end\n"); // endpoints[0] = endpoints[1] = SV_UNUSED; ed_loop_closed = 1; /* circle */ break; } lt_iter.v_poin->flag = 1; vc_tot_linked++; - /*printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist);*/ + // printf("Testing 2 floats %f : %f\n", fl, lt_iter.v_poin->dist); if (fl <= lt_iter.v_poin->dist) { fl = lt_iter.v_poin->dist; v_best = lt_iter.v; - /*printf("\t\t\tVERT BEST: %i\n", v_best);*/ + // printf("\t\t\tVERT BEST: %i\n", v_best); } screwvert_iter_step(<_iter); if (!lt_iter.v_poin) { - /*printf("\t\t\tFound End Also Num %i\n", j);*/ - /*endpoints[j] = lt_iter.v_other;*/ /* other is still valid */ + // printf("\t\t\tFound End Also Num %i\n", j); + // endpoints[j] = lt_iter.v_other; /* other is still valid */ break; } } } - /* now we have a collection of used edges. flip their edges the right way*/ - /*if (v_best != SV_UNUSED) - */ + /* Now we have a collection of used edges. flip their edges the right way. */ + /* if (v_best != SV_UNUSED) - */ - /*printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked);*/ + // printf("Done Looking - vc_tot_linked: %i\n", vc_tot_linked); if (vc_tot_linked > 1) { float vf_1, vf_2, vf_best; @@ -654,8 +654,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* edge connects on each side! */ if (SV_IS_VALID(vc_tmp->v[0]) && SV_IS_VALID(vc_tmp->v[1])) { - /*printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/ - /* find out which is higher */ + // printf("Verts on each side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]); + /* Find out which is higher. */ vf_1 = tmpf1[ltmd->axis]; vf_2 = tmpf2[ltmd->axis]; @@ -682,8 +682,8 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } } } - else if (SV_IS_VALID(vc_tmp->v[0])) { /*vertex only connected on 1 side */ - /*printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]);*/ + else if (SV_IS_VALID(vc_tmp->v[0])) { /* Vertex only connected on 1 side. */ + // printf("Verts on ONE side (%i %i)\n", vc_tmp->v[0], vc_tmp->v[1]); if (tmpf1[ltmd->axis] < vc_tmp->co[ltmd->axis]) { /* best is above */ ed_loop_flip = 1; } @@ -697,7 +697,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } #endif - /*printf("flip direction %i\n", ed_loop_flip);*/ + // printf("flip direction %i\n", ed_loop_flip); /* Switch the flip option if set * NOTE: flip is now done at face level so copying group slices is easier. */ @@ -713,10 +713,10 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * /* if its closed, we only need 1 loop */ for (j = ed_loop_closed; j < 2; j++) { - /*printf("Ordering Side J %i\n", j);*/ + // printf("Ordering Side J %i\n", j); screwvert_iter_init(<_iter, vert_connect, v_best, j); - /*printf("\n\nStarting - Loop\n");*/ + // printf("\n\nStarting - Loop\n"); lt_iter.v_poin->flag = 1; /* so a non loop will traverse the other side */ /* If this is the vert off the best vert and @@ -727,13 +727,13 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } while (lt_iter.v_poin && lt_iter.v_poin->flag != 2) { - /*printf("\tOrdering Vert V %i\n", lt_iter.v);*/ + // printf("\tOrdering Vert V %i\n", lt_iter.v); lt_iter.v_poin->flag = 2; if (lt_iter.e) { if (lt_iter.v == lt_iter.e->v1) { if (ed_loop_flip == 0) { - /*printf("\t\t\tFlipping 0\n");*/ + // printf("\t\t\tFlipping 0\n"); SWAP(uint, lt_iter.e->v1, lt_iter.e->v2); } #if 0 @@ -744,7 +744,7 @@ static Mesh *modifyMesh(ModifierData *md, const ModifierEvalContext *ctx, Mesh * } else if (lt_iter.v == lt_iter.e->v2) { if (ed_loop_flip == 1) { - /*printf("\t\t\tFlipping 1\n");*/ + // printf("\t\t\tFlipping 1\n"); SWAP(uint, lt_iter.e->v1, lt_iter.e->v2); } #if 0 |