7typedef struct {
float x, y, z,
w;}
QuatX;
26#define EulFrm(ord) ((unsigned)(ord)&1)
29#define EulRep(ord) (((unsigned)(ord)>>1)&1)
32#define EulPar(ord) (((unsigned)(ord)>>2)&1)
33#define EulSafe "\000\001\002\000"
34#define EulNext "\001\002\000\001"
35#define EulAxI(ord) ((int)(EulSafe[(((unsigned)(ord)>>3)&3)]))
36#define EulAxJ(ord) ((int)(EulNext[EulAxI(ord)+(EulPar(ord)==EulParOdd)]))
37#define EulAxK(ord) ((int)(EulNext[EulAxI(ord)+(EulPar(ord)!=EulParOdd)]))
38#define EulAxH(ord) ((EulRep(ord)==EulRepNo)?EulAxK(ord):EulAxI(ord))
40#define EulGetOrd(ord,i,j,k,h,n,s,f) {unsigned o=ord;f=o&1;o>>=1;s=o&1;o>>=1;\
41 n=o&1;o>>=1;i=EulSafe[o&3];j=EulNext[i+n];k=EulNext[i+1-n];h=s?k:i;}
43#define EulOrd(i,p,r,f) (((((((i)<<1)+(p))<<1)+(r))<<1)+(f))
45#define EulOrdXYZs EulOrd(X,EulParEven,EulRepNo,EulFrmS)
46#define EulOrdXYXs EulOrd(X,EulParEven,EulRepYes,EulFrmS)
47#define EulOrdXZYs EulOrd(X,EulParOdd,EulRepNo,EulFrmS)
48#define EulOrdXZXs EulOrd(X,EulParOdd,EulRepYes,EulFrmS)
49#define EulOrdYZXs EulOrd(Y,EulParEven,EulRepNo,EulFrmS)
50#define EulOrdYZYs EulOrd(Y,EulParEven,EulRepYes,EulFrmS)
51#define EulOrdYXZs EulOrd(Y,EulParOdd,EulRepNo,EulFrmS)
52#define EulOrdYXYs EulOrd(Y,EulParOdd,EulRepYes,EulFrmS)
53#define EulOrdZXYs EulOrd(Z,EulParEven,EulRepNo,EulFrmS)
54#define EulOrdZXZs EulOrd(Z,EulParEven,EulRepYes,EulFrmS)
55#define EulOrdZYXs EulOrd(Z,EulParOdd,EulRepNo,EulFrmS)
56#define EulOrdZYZs EulOrd(Z,EulParOdd,EulRepYes,EulFrmS)
58#define EulOrdZYXr EulOrd(X,EulParEven,EulRepNo,EulFrmR)
59#define EulOrdXYXr EulOrd(X,EulParEven,EulRepYes,EulFrmR)
60#define EulOrdYZXr EulOrd(X,EulParOdd,EulRepNo,EulFrmR)
61#define EulOrdXZXr EulOrd(X,EulParOdd,EulRepYes,EulFrmR)
62#define EulOrdXZYr EulOrd(Y,EulParEven,EulRepNo,EulFrmR)
63#define EulOrdYZYr EulOrd(Y,EulParEven,EulRepYes,EulFrmR)
64#define EulOrdZXYr EulOrd(Y,EulParOdd,EulRepNo,EulFrmR)
65#define EulOrdYXYr EulOrd(Y,EulParOdd,EulRepYes,EulFrmR)
66#define EulOrdYXZr EulOrd(Z,EulParEven,EulRepNo,EulFrmR)
67#define EulOrdZXZr EulOrd(Z,EulParEven,EulRepYes,EulFrmR)
68#define EulOrdXYZr EulOrd(Z,EulParOdd,EulRepNo,EulFrmR)
69#define EulOrdZYZr EulOrd(Z,EulParOdd,EulRepYes,EulFrmR)
QuatX Eul_ToQuat(EulerAngles ea)
EulerAngles Eul_FromHMatrix(HMatrix M, int order)
float HMatrix[4][4]
Definition euler.h:9
QuatPart
Definition euler.h:8
void Eul_ToHMatrix(EulerAngles ea, HMatrix M)
EulerAngles Eul_FromQuat(QuatX q, int order)
QuatX EulerAngles
Definition euler.h:10
EulerAngles Eul_(float ai, float aj, float ah, int order)
float w
Definition euler.h:7