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 /source/blender/blenkernel/BKE_armature.h | |
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 'source/blender/blenkernel/BKE_armature.h')
-rw-r--r-- | source/blender/blenkernel/BKE_armature.h | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/source/blender/blenkernel/BKE_armature.h b/source/blender/blenkernel/BKE_armature.h index 7d0caa4b182..336ba823520 100644 --- a/source/blender/blenkernel/BKE_armature.h +++ b/source/blender/blenkernel/BKE_armature.h @@ -43,27 +43,29 @@ struct bConstraint; struct Object; struct MDeformVert; struct Mesh; -struct PoseChain; +struct PoseTree; struct ListBase; typedef struct PoseTarget { struct PoseTarget *next, *prev; - struct bConstraint *con; - int tip; + + struct bConstraint *con; /* the constrait of this target */ + int tip; /* index of tip pchan in PoseTree */ } PoseTarget; -typedef struct PoseChain +typedef struct PoseTree { - struct PoseChain *next, *prev; - struct bPoseChannel **pchanchain; - struct ListBase targets; - int totchannel; - int tree; // true or false - float (*basis_change)[3][3]; - float tolerance; - int iterations; -} PoseChain; + struct PoseTree *next, *prev; + + struct ListBase targets; /* list of targets of the tree */ + struct bPoseChannel **pchan; /* array of pose channels */ + int *parent; /* and their parents */ + int totchannel; /* number of pose channels */ + float (*basis_change)[3][3]; /* basis change result from solver */ + float tolerance; /* tolerance from the constraint */ + int iterations; /* iterations from the constraint */ +} PoseTree; /* Core armature functionality */ #ifdef __cplusplus @@ -91,13 +93,14 @@ void where_is_pose (struct Object *ob); /* get_objectspace_bone_matrix has to be removed still */ void get_objectspace_bone_matrix (struct Bone* bone, float M_accumulatedMatrix[][4], int root, int posed); void vec_roll_to_mat3(float *vec, float roll, float mat[][3]); +void mat3_to_vec_roll(float mat[][3], float *vec, float *roll); /* Animation functions */ -struct PoseChain *ik_chain_to_posechain (struct Object *ob, struct Bone *bone); -void solve_posechain (PoseChain *chain); -void free_posechain (PoseChain *chain); +struct PoseTree *ik_tree_to_posetree(struct Object *ob, struct Bone *bone); +void solve_posetree(PoseTree *tree); +void free_posetree(PoseTree *tree); /* Gameblender hacks */ void GB_init_armature_deform(struct ListBase *defbase, float premat[][4], float postmat[][4]); |