Fixed some transforms, move to 3d and quaternion math in progress...
[ne.git] / src / phys / conversion.h
blob36c077f99213f7d900a31053f5f57adb4d5ed676
1 /************************************************************************
2 This file is part of NE.
4 NE is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
9 NE is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with NE. If not, see <http://www.gnu.org/licenses/>.
16 ************************************************************************/
18 #ifndef CONVERSION_H_
19 #define CONVERSION_H_
21 #include <ode/ode.h>
22 #include <GL/gl.h>
24 inline const dReal *Matrix_GL_to_ODE(const GLfloat *m)
26 static dReal r[12];
27 r[0] = m[0];
28 r[4] = m[1];
29 r[8] = m[2];
31 r[1] = m[4];
32 r[5] = m[5];
33 r[9] = m[6];
35 r[2] = m[8];
36 r[6] = m[9];
37 r[10]= m[10];
39 r[3] = 0.0;
40 r[7] = 0.0;
41 r[11]= 0.0;
43 return r;
46 #endif /* CONVERSION_H_ */