diff options
Diffstat (limited to 'source/blender/blenkernel/intern/softbody.c')
-rw-r--r-- | source/blender/blenkernel/intern/softbody.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/blenkernel/intern/softbody.c b/source/blender/blenkernel/intern/softbody.c index 9d871777c61..e4e2ed94b41 100644 --- a/source/blender/blenkernel/intern/softbody.c +++ b/source/blender/blenkernel/intern/softbody.c @@ -901,7 +901,7 @@ static void free_softbody_baked(SoftBody *sb) static void free_scratch(SoftBody *sb) { if (sb->scratch) { - /* todo make sure everything is cleaned up nicly */ + /* TODO: make sure everything is cleaned up nicely. */ if (sb->scratch->colliderhash) { BLI_ghash_free(sb->scratch->colliderhash, NULL, @@ -973,7 +973,7 @@ static void free_softbody_intern(SoftBody *sb) * and need to tell their neighbors exactly what happens via spring forces * unless sbObjectStep( .. ) is called on sub frame timing level * BTW that also questions the use of a 'implicit' solvers on softbodies - * since that would only valid for 'slow' moving collision targets and dito particles + * since that would only valid for 'slow' moving collision targets and ditto particles. */ /* +++ dependency information functions. */ @@ -1907,7 +1907,7 @@ static void sb_spring_force( #endif } else { - /* TODO make this debug option */ + /* TODO: make this debug option. */ CLOG_WARN(&LOG, "bodypoint <bpi> is not attached to spring <*bs>"); return; } @@ -1994,12 +1994,12 @@ static int _softbody_calc_forces_slice_in_a_thread(Scene *scene, return 999; } - /* debugerin */ + /* Debugging. */ if (sb->totpoint < ifirst) { printf("Aye 998"); return 998; } - /* debugerin */ + /* Debugging. */ bp = &sb->bpoint[ifirst]; for (bb = number_of_points_here; bb > 0; bb--, bp++) { @@ -2413,9 +2413,9 @@ static void softbody_apply_forces(Object *ob, float forcetime, int mode, float * copy_v3_v3(dx, bp->vec); } - /* so here is (x)'= v(elocity) */ - /* the euler step for location then becomes */ - /* x(t + dt) = x(t) + v(t~) * dt */ + /* So here is: `(x)'= v(elocity)`. + * The euler step for location then becomes: + * `x(t + dt) = x(t) + v(t~) * dt` */ mul_v3_fl(dx, forcetime); /* the freezer coming sooner or later */ @@ -2644,7 +2644,7 @@ static void interpolate_exciter(Object *ob, int timescale, int time) */ /* Resetting a Mesh SB object's springs */ -/* Spring length are caculted from'raw' mesh vertices that are NOT altered by modifier stack. */ +/* Spring length are calculated from 'raw' mesh vertices that are NOT altered by modifier stack. */ static void springs_from_mesh(Object *ob) { SoftBody *sb; @@ -2704,8 +2704,8 @@ static void mesh_to_softbody(Object *ob) bp = sb->bpoint; defgroup_index = me->dvert ? (sb->vertgroup - 1) : -1; - defgroup_index_mass = me->dvert ? BKE_object_defgroup_name_index(ob, sb->namedVG_Mass) : -1; - defgroup_index_spring = me->dvert ? BKE_object_defgroup_name_index(ob, sb->namedVG_Spring_K) : + defgroup_index_mass = me->dvert ? BKE_id_defgroup_name_index(&me->id, sb->namedVG_Mass) : -1; + defgroup_index_spring = me->dvert ? BKE_id_defgroup_name_index(&me->id, sb->namedVG_Spring_K) : -1; for (a = 0; a < me->totvert; a++, bp++) { @@ -2934,8 +2934,8 @@ static void lattice_to_softbody(Object *ob) bp = sb->bpoint; defgroup_index = lt->dvert ? (sb->vertgroup - 1) : -1; - defgroup_index_mass = lt->dvert ? BKE_object_defgroup_name_index(ob, sb->namedVG_Mass) : -1; - defgroup_index_spring = lt->dvert ? BKE_object_defgroup_name_index(ob, sb->namedVG_Spring_K) : + defgroup_index_mass = lt->dvert ? BKE_id_defgroup_name_index(<->id, sb->namedVG_Mass) : -1; + defgroup_index_spring = lt->dvert ? BKE_id_defgroup_name_index(<->id, sb->namedVG_Spring_K) : -1; /* same code used as for mesh vertices */ @@ -3009,7 +3009,7 @@ static void curve_surf_to_softbody(Object *ob) for (nu = cu->nurb.first; nu; nu = nu->next) { if (nu->bezt) { - /* Bezier case; this is nicly said naive; who ever wrote this part, + /* Bezier case; this is nicely said naive; who ever wrote this part, * it was not me (JOW) :). * * a: never ever make tangent handles (sub) and or (ob)ject to collision. @@ -3086,7 +3086,7 @@ static void softbody_to_object(Object *ob, float (*vertexCos)[3], int numVerts, if (sb->solverflags & SBSO_ESTIMATEIPO) { SB_estimate_transform(ob, sb->lcom, sb->lrot, sb->lscale); } - /* inverse matrix is not uptodate... */ + /* Inverse matrix is not up to date. */ invert_m4_m4(ob->imat, ob->obmat); for (a = 0; a < numVerts; a++, bp++) { |