]> git.mxchange.org Git - flightgear.git/blob - src/GUI/gui_local.cxx
Integrated FGOptions with the property manager (by David Megginson)
[flightgear.git] / src / GUI / gui_local.cxx
1 #include <GL/glut.h>            // needed before pu.h
2 #include <plib/pu.h>            // plib include
3
4
5 #include <Main/fg_init.hxx>
6
7 #include "gui.h"
8 #include "trackball.h"
9
10 // FOR MOUSE VIEW MODE
11 // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
12 static float _quat0[4];
13
14 float lastGuiQuat[4];
15 float curGuiQuat[4];
16
17 // To apply our mouse rotation quat to VIEW
18 // sgPreMultMat4( VIEW, GuiQuat_mat);
19 // This is here temporarily should be in views.hxx
20 float GuiQuat_mat[4][4];
21
22 void Quat0( void ) {
23         curGuiQuat[0] = _quat0[0];
24         curGuiQuat[1] = _quat0[1];
25         curGuiQuat[2] = _quat0[2];
26         curGuiQuat[3] = _quat0[3];
27 }
28
29 void initMouseQuat(void) {
30         trackball(_quat0, 0.0, 0.0, 0.0, 0.0);  
31         Quat0();
32         build_rotmatrix(GuiQuat_mat, curGuiQuat);
33 }
34
35
36 void reInit(puObject *cb)
37 {
38         BusyCursor(0);
39         Quat0();
40         build_rotmatrix(GuiQuat_mat, curGuiQuat);
41         fgReInitSubsystems();
42         BusyCursor(1);
43 }
44