50 return m[r0][c0] * (m[r1][c1] * m[r2][c2] - m[r2][c1] * m[r1][c2]) -
51 m[r0][c1] * (m[r1][c0] * m[r2][c2] - m[r2][c0] * m[r1][c2]) +
52 m[r0][c2] * (m[r1][c0] * m[r2][c1] - m[r2][c0] * m[r1][c1]);
173 GaVec3 result = v0 + t*(v1 - v0);
179 double theta_0 = acos(dot);
180 double theta = theta_0*t;
181 double sin_theta = sin(theta);
182 double sin_theta_0 = sin(theta_0);
184 double s0 = cos(theta) - dot * sin_theta / sin_theta_0;
185 double s1 = sin_theta / sin_theta_0;
187 return (s0 * v0) + (s1 * v1);
303 GaFloat fTrace = rot[0][0]+rot[1][1]+rot[2][2];
312 v.
x = (rot[2][1]-rot[1][2])*fRoot;
313 v.
y = (rot[0][2]-rot[2][0])*fRoot;
314 v.
z = (rot[1][0]-rot[0][1])*fRoot;
319 static GaUint s_iNext[3] = { 1, 2, 0 };
321 if ( rot[1][1] > rot[0][0] )
323 if ( rot[2][2] > rot[i][i] )
330 *apkQuat[i] = 0.5f*fRoot;
332 w = (rot[k][j]-rot[j][k])*fRoot;
333 *apkQuat[j] = (rot[j][i]+rot[i][j])*fRoot;
334 *apkQuat[k] = (rot[k][i]+rot[i][k])*fRoot;
GaExpInl GaFloat dotProduct(const GaVec3 &oth) const
static const GaExport GaFloat GaPi
GaFloat determinant() const
GaVec3 rotationTo(const Ga::GaVec3 &pos) const
GaExpInl GaFloat normalize()
GaFloat matrix_minor(const GaMat4x4 &m, GaUint r0, GaUint r1, GaUint r2, GaUint c0, GaUint c1, GaUint c2)
static GaFloat arcTangent(const GaFloat &r)
GaVec3 slerp(Ga::GaVec3 v0, Ga::GaVec3 v1, double t)
static GaFloat squareRoot(GaFloat f)
GaFloat angle(float ax, float ay, float bx, float by)
static const GaExport GaFloat GaDegreesInRadian
static GaFloat sine(const GaFloat &r)
static const GaExport GaFloat GaRadianInDegree
static GaFloat cosine(const GaFloat &r)