29 #include "../precompiled.h"
47 static int next[3] = { 1, 2, 0 };
49 trace =
mat[0 * 4 + 0] +
mat[1 * 4 + 1] +
mat[2 * 4 + 2];
57 jq.
q[0] = ( mat[1 * 4 + 2] - mat[2 * 4 + 1] ) * s;
58 jq.
q[1] = ( mat[2 * 4 + 0] - mat[0 * 4 + 2] ) * s;
59 jq.
q[2] = ( mat[0 * 4 + 1] - mat[1 * 4 + 0] ) * s;
64 if ( mat[1 * 4 + 1] > mat[0 * 4 + 0] ) {
67 if ( mat[2 * 4 + 2] > mat[i * 4 + i] ) {
73 t = ( mat[i * 4 +
i] - ( mat[j * 4 +
j] + mat[k * 4 + k] ) ) + 1.0f;
77 jq.
q[3] = ( mat[j * 4 + k] - mat[k * 4 +
j] ) * s;
78 jq.
q[
j] = ( mat[i * 4 +
j] + mat[j * 4 +
i] ) * s;
79 jq.
q[k] = ( mat[i * 4 + k] + mat[k * 4 +
i] ) * s;
82 jq.
t[0] = mat[0 * 4 + 3];
83 jq.
t[1] = mat[1 * 4 + 3];
84 jq.
t[2] = mat[2 * 4 + 3];
idJointQuat ToJointQuat(void) const
static float InvSqrt(float x)