diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2005-09-01 02:09:44 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2005-09-01 02:09:44 +0400 |
commit | 0535d26e6de0973a4be832601686108a4d31c648 (patch) | |
tree | 040d114385fd750cb94a1b49445f45eed451645a /intern/iksolver/extern | |
parent | c005095ea8e1087948bd1ef6805822abd36e1ad5 (diff) |
- Changed xz limit drawing to use same formulas as the limiting in the IK
module -- the previous method could be off pretty far.
- Added drawing of transparent surface for it, instead of just the border.
- Added "stretch IK", allowing bones not only to rotate, but also scale.
The "Stretch" value below the DoF buttons is used to enabled this.
- Some code tweaking: slightly simplified computation of transform for IK,
renamed chain to tree, removed unused pchan->ik_mat, ..
Internal IK module work:
- Do damping per DoF also based on stiffness, hopefully makes it converge
faster with very stiff joints.
- Instead of having two joints types (translational and rotational), now
all 6 DoF's can be enabled for one joint.
- Added limits for translational joints.
Diffstat (limited to 'intern/iksolver/extern')
-rw-r--r-- | intern/iksolver/extern/IK_solver.h | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/intern/iksolver/extern/IK_solver.h b/intern/iksolver/extern/IK_solver.h index 78633fb0d9a..8626ca22beb 100644 --- a/intern/iksolver/extern/IK_solver.h +++ b/intern/iksolver/extern/IK_solver.h @@ -84,14 +84,13 @@ extern "C" { * - free all segments */ - /** * IK_Segment defines a single segment of an IK tree. * - Individual segments are always defined in local coordinates. * - The segment is assumed to be oriented in the local - * y-direction. + * y-direction. * - start is the start of the segment relative to the end - * of the parent segment. + * of the parent segment. * - rest_basis is a column major matrix defineding the rest * position (w.r.t. which the limits are defined), must * be a pure rotation @@ -100,15 +99,12 @@ extern "C" { * - length is the length of the bone. * * - basis_change and translation_change respectively define - * the change in rotation or translation for rotational joints - * and translational joints. basis_change is a column major 3x3 - * matrix. + * the change in rotation or translation. basis_change is a + * column major 3x3 matrix. * - * For rotational joints the local transformation is then defined as: - * start*rest_basis*basis*basis_change*translate(0,length,0) + * The local transformation is then defined as: + * start * rest_basis * basis * basis_change * translation_change * translate(0,length,0) * - * For translational joints: - * start*rest_basis*basis*translation_change*translate(0,length,0) */ typedef void IK_Segment; @@ -117,13 +113,18 @@ enum IK_SegmentFlag { IK_XDOF = 1, IK_YDOF = 2, IK_ZDOF = 4, - IK_TRANSLATIONAL = 8 + IK_TRANS_XDOF = 8, + IK_TRANS_YDOF = 16, + IK_TRANS_ZDOF = 32 }; typedef enum IK_SegmentAxis { - IK_X, - IK_Y, - IK_Z + IK_X = 0, + IK_Y = 1, + IK_Z = 2, + IK_TRANS_X = 3, + IK_TRANS_Y = 4, + IK_TRANS_Z = 5 } IK_SegmentAxis; extern IK_Segment *IK_CreateSegment(int flag); |