1 /*
2  * go-matrix3x3.h
3  *
4  * Copyright (C) 2007 Jean Brefort (jean.brefort@normalesup.org)
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
19  * USA
20  */
21 
22 #ifndef GO_MATRIX3X3_H
23 #define GO_MATRIX3X3_H
24 
25 #include <glib.h>
26 
27 G_BEGIN_DECLS
28 
29 typedef struct {
30 	gdouble a11, a12, a13, a21, a22, a23, a31, a32, a33;
31 } GOMatrix3x3;
32 
33 void go_matrix3x3_transform (GOMatrix3x3 *mat,
34 				double xo, double yo, double zo,
35 				double *x, double *y, double *z);
36 
37 void go_matrix3x3_from_euler (GOMatrix3x3 *mat,
38 				double Psi, double Theta, double Phi);
39 
40 void go_matrix3x3_from_euler_transposed (GOMatrix3x3 *mat,
41 				double Psi, double Theta, double Phi);
42 
43 void go_matrix3x3_to_euler (GOMatrix3x3 const *mat,
44 				double *Psi, double *Theta, double *Phi);
45 
46 void go_matrix3x3_multiply (GOMatrix3x3 *dest,
47 				GOMatrix3x3 const *src1, GOMatrix3x3 const *src2);
48 
49 G_END_DECLS
50 
51 #endif /* GO_MATRIX3X3_H */
52