First draft for control bones repositioning.

All bones marked as no deform are repositioned after the retarget based on their "linked" bone (linked bone is constraint owner if control bone is a target, parent bone if not).

Arithb:
 Function to make a quat between two normalized vectors
This commit is contained in:
2008-07-22 17:44:06 +00:00
parent 25de501805
commit deccefc029
3 changed files with 215 additions and 162 deletions

View File

@@ -1335,6 +1335,18 @@ void NormalQuat(float *q)
}
}
void RotationBetweenVectorsToQuat(float *q, float v1[3], float v2[3])
{
float axis[3];
float angle;
Crossf(axis, v1, v2);
angle = NormalizedVecAngle2(v1, v2);
AxisAngleToQuat(q, axis, angle);
}
void AxisAngleToQuat(float *q, float *axis, float angle)
{
float nor[3];