00001
00002 #ifndef __DECOMPOSE__H__
00003 #define __DECOMPOSE__H__
00004 typedef struct {float x, y, z, w;} Quat;
00005 enum QuatPart {X, Y, Z, W};
00006 typedef Quat HVect;
00007 typedef float HMatrix[4][4];
00008 typedef struct {
00009 HVect t;
00010 Quat q;
00011 Quat u;
00012 HVect k;
00013 float f;
00014 } AffineParts;
00015 float polar_decomp(HMatrix M, HMatrix Q, HMatrix S);
00016 HVect spect_decomp(HMatrix S, HMatrix U);
00017 Quat snuggle(Quat q, HVect *k);
00018 void decomp_affine(HMatrix A, AffineParts *parts);
00019 void invert_affine(AffineParts *parts, AffineParts *inverse);
00020 #endif