From 89a963fb7fdff543b77de790355b9dac3019bd33 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 9 Mar 2012 18:28:30 +0000 Subject: style cleanup: comment blocks --- source/blender/ikplugin/intern/iksolver_plugin.c | 8 ++-- source/blender/ikplugin/intern/itasc_plugin.cpp | 53 ++++++++++++------------ 2 files changed, 30 insertions(+), 31 deletions(-) (limited to 'source/blender/ikplugin') diff --git a/source/blender/ikplugin/intern/iksolver_plugin.c b/source/blender/ikplugin/intern/iksolver_plugin.c index 34656daaa19..7a96edeaf5f 100644 --- a/source/blender/ikplugin/intern/iksolver_plugin.c +++ b/source/blender/ikplugin/intern/iksolver_plugin.c @@ -230,7 +230,7 @@ static void where_is_ik_bone(bPoseChannel *pchan, float ik_mat[][3]) // nr = t /* called from within the core where_is_pose loop, all animsystems and constraints -were executed & assigned. Now as last we do an IK pass */ + * were executed & assigned. Now as last we do an IK pass */ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) { float R_parmat[3][3], identity[3][3]; @@ -349,8 +349,8 @@ static void execute_posetree(struct Scene *scene, Object *ob, PoseTree *tree) pchan= tree->pchan[0]; if (pchan->parent) /* transform goal by parent mat, so this rotation is not part of the - segment's basis. otherwise rotation limits do not work on the - local transform of the segment itself. */ + * segment's basis. otherwise rotation limits do not work on the + * local transform of the segment itself. */ copy_m4_m4(rootmat, pchan->parent->pose_mat); else unit_m4(rootmat); @@ -539,7 +539,7 @@ void iksolver_execute_tree(struct Scene *scene, struct Object *ob, struct bPose execute_posetree(scene, ob, tree); /* 6. apply the differences to the channels, - we need to calculate the original differences first */ + * we need to calculate the original differences first */ for(a=0; atotchannel; a++) { make_dmats(tree->pchan[a]); } diff --git a/source/blender/ikplugin/intern/itasc_plugin.cpp b/source/blender/ikplugin/intern/itasc_plugin.cpp index 42a3aace775..5385366f075 100644 --- a/source/blender/ikplugin/intern/itasc_plugin.cpp +++ b/source/blender/ikplugin/intern/itasc_plugin.cpp @@ -890,33 +890,32 @@ static int convert_channels(IK_Scene *ikscene, PoseTree *tree) flag |= IK_TRANSY; } /* - Logic to create the segments: - RX,RY,RZ = rotational joints with no length - RY(tip) = rotational joints with a fixed length arm = (0,length,0) - TY = translational joint on Y axis - F(pos) = fixed joint with an arm at position pos - Conversion rule of the above flags: - - ==> F(tip) - X ==> RX(tip) - Y ==> RY(tip) - Z ==> RZ(tip) - XY ==> RX+RY(tip) - XZ ==> RX+RZ(tip) - YZ ==> RZ+RY(tip) - XYZ ==> full spherical unless there are limits, in which case RX+RZ+RY(tip) - In case of stretch, tip=(0,0,0) and there is an additional TY joint - The frame at last of these joints represents the tail of the bone. - The head is computed by a reverse translation on Y axis of the bone length - or in case of TY joint, by the frame at previous joint. - In case of separation of bones, there is an additional F(head) joint - - Computing rest pose and length is complicated: the solver works in world space - Here is the logic: - rest position is computed only from bone->bone_mat. - bone length is computed from bone->length multiplied by the scaling factor of - the armature. Non-uniform scaling will give bad result! - - */ + * Logic to create the segments: + * RX,RY,RZ = rotational joints with no length + * RY(tip) = rotational joints with a fixed length arm = (0,length,0) + * TY = translational joint on Y axis + * F(pos) = fixed joint with an arm at position pos + * Conversion rule of the above flags: + * - ==> F(tip) + * X ==> RX(tip) + * Y ==> RY(tip) + * Z ==> RZ(tip) + * XY ==> RX+RY(tip) + * XZ ==> RX+RZ(tip) + * YZ ==> RZ+RY(tip) + * XYZ ==> full spherical unless there are limits, in which case RX+RZ+RY(tip) + * In case of stretch, tip=(0,0,0) and there is an additional TY joint + * The frame at last of these joints represents the tail of the bone. + * The head is computed by a reverse translation on Y axis of the bone length + * or in case of TY joint, by the frame at previous joint. + * In case of separation of bones, there is an additional F(head) joint + * + * Computing rest pose and length is complicated: the solver works in world space + * Here is the logic: + * rest position is computed only from bone->bone_mat. + * bone length is computed from bone->length multiplied by the scaling factor of + * the armature. Non-uniform scaling will give bad result! + */ switch (flag & (IK_XDOF|IK_YDOF|IK_ZDOF)) { default: -- cgit v1.2.3