1 #include <GL/glut.h> // needed before pu.h
2 #include <plib/pu.h> // plib include
4 #include <Main/globals.hxx>
5 #include <Main/fg_init.hxx>
6 #include <Main/fg_props.hxx>
12 extern void fgReshape(int, int);
14 // FOR MOUSE VIEW MODE
15 // stashed trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
16 static float _quat0[4];
21 // To apply our mouse rotation quat to VIEW
22 // sgPreMultMat4( VIEW, GuiQuat_mat);
23 // This is here temporarily should be in views.hxx
24 float GuiQuat_mat[4][4];
27 curGuiQuat[0] = _quat0[0];
28 curGuiQuat[1] = _quat0[1];
29 curGuiQuat[2] = _quat0[2];
30 curGuiQuat[3] = _quat0[3];
33 void initMouseQuat(void) {
34 trackball(_quat0, 0.0, 0.0, 0.0, 0.0);
36 build_rotmatrix(GuiQuat_mat, curGuiQuat);
40 void reInit(puObject *cb)
45 // in case user has changed window size as
46 // restoreInitialState() overwrites these
47 int xsize = fgGetInt("/sim/startup/xsize");
48 int ysize = fgGetInt("/sim/startup/ysize");
50 build_rotmatrix(GuiQuat_mat, curGuiQuat);
51 /* check */ globals->restoreInitialState();
55 fgReshape( xsize, ysize );