1 |
querten |
1.1 |
|
2 |
querten |
1.40 |
// main.h
|
3 |
querten |
1.1 |
//
|
4 |
|
|
//////////////////////////////////////////////////////////////////////
|
5 |
|
|
|
6 |
|
|
#ifndef _MAIN_H__
|
7 |
|
|
#define _MAIN_H__
|
8 |
|
|
|
9 |
querten |
1.44 |
#define FROG_VERSION 1.05
|
10 |
|
|
#define FROG_AUTHORLIST "Loic.Quertenmont@uclouvain.be\nVincent.Roberfroid@uclouvain.be"
|
11 |
|
|
|
12 |
querten |
1.1 |
#ifdef linux
|
13 |
|
|
#include <GL/gl.h>
|
14 |
|
|
#include <GL/glu.h>
|
15 |
querten |
1.41 |
#include "Includes/GLUT/glut.h"
|
16 |
roberfro |
1.22 |
#else
|
17 |
querten |
1.19 |
#include <windows.h>
|
18 |
querten |
1.1 |
#include <gl/gl.h>
|
19 |
|
|
#include <gl/glu.h>
|
20 |
|
|
#include <gl/glut.h>
|
21 |
|
|
#pragma comment (lib,"glaux.lib")
|
22 |
|
|
#pragma comment (lib,"glu32.lib")
|
23 |
|
|
#pragma comment (lib,"opengl32.lib")
|
24 |
|
|
#pragma comment (lib,"glut.lib")
|
25 |
|
|
#pragma comment (lib,"glut32.lib")
|
26 |
querten |
1.34 |
#pragma comment (lib,"Includes/CURL/Lib/libcurl.lib")
|
27 |
querten |
1.1 |
#endif
|
28 |
querten |
1.35 |
|
29 |
|
|
bool SCREENSAVER = false;
|
30 |
querten |
1.1 |
|
31 |
querten |
1.12 |
#include <time.h>
|
32 |
|
|
time_t start;
|
33 |
|
|
time_t end;
|
34 |
|
|
|
35 |
querten |
1.1 |
#include <stdio.h>
|
36 |
|
|
#include <math.h>
|
37 |
|
|
|
38 |
querten |
1.25 |
#include "Includes/FROG/FROG_Objects.h"
|
39 |
roberfro |
1.22 |
#include "Includes/FROG/FROG_Events.h"
|
40 |
|
|
#include "Includes/FROG/FROG_Geometry.h"
|
41 |
querten |
1.21 |
|
42 |
querten |
1.44 |
#include "Includes/FROG/FROG_Font.h"
|
43 |
querten |
1.21 |
#include "Includes/FROG/FROG_Element_Tools.h"
|
44 |
querten |
1.1 |
|
45 |
querten |
1.40 |
#include "Includes/FROG/FROG_Logo.h"
|
46 |
|
|
#include "Includes/FROG/FROG_Texture.h"
|
47 |
querten |
1.27 |
#include "Includes/FROG/FROG_ReadCards.h"
|
48 |
querten |
1.19 |
#include "Includes/FROG/FROG_Camera.h"
|
49 |
roberfro |
1.31 |
#include "Includes/FROG/FROG_Net.h"
|
50 |
querten |
1.40 |
#include "Includes/FROG/FROG_Net_Tools.h"
|
51 |
querten |
1.41 |
#include "Includes/FROG/FROG_View_Tools.h"
|
52 |
|
|
|
53 |
querten |
1.44 |
FROG_Font* frog_Font;
|
54 |
|
|
FROG_Font* frog_Font_10;
|
55 |
querten |
1.41 |
FROG_ReadCards* Card;
|
56 |
|
|
FROG_Objects_Extended* frogObjects_;
|
57 |
|
|
|
58 |
|
|
std::vector<FROG_View*> ActiveViews;
|
59 |
querten |
1.42 |
FROG_View_Screen* ViewScreen;
|
60 |
querten |
1.41 |
FROG_View* ViewMain;
|
61 |
|
|
|
62 |
querten |
1.43 |
unsigned int shadowMapTexture;
|
63 |
querten |
1.1 |
|
64 |
querten |
1.21 |
|
65 |
querten |
1.1 |
int SAVE_WINDOW_W = 800;
|
66 |
|
|
int SAVE_WINDOW_H = 600;
|
67 |
|
|
int SAVE_WINDOW_X = 10;
|
68 |
|
|
int SAVE_WINDOW_Y = 10;
|
69 |
|
|
|
70 |
querten |
1.21 |
|
71 |
querten |
1.41 |
|
72 |
|
|
|
73 |
querten |
1.19 |
bool FULLSCREEN = false;
|
74 |
|
|
int WINDOW_WIDTH = 800;
|
75 |
|
|
int WINDOW_HEIGHT = 600;
|
76 |
|
|
int SCREENSHOT = 0;
|
77 |
querten |
1.40 |
char SCREENSHOT_FORMAT[255] = {"png"};
|
78 |
querten |
1.1 |
|
79 |
querten |
1.7 |
int TEMP_I = 0;
|
80 |
querten |
1.1 |
bool MouseStates[3];
|
81 |
|
|
|
82 |
|
|
GLuint LogoTexture;
|
83 |
querten |
1.37 |
GLuint LogoTxtTexture;
|
84 |
querten |
1.1 |
|
85 |
querten |
1.4 |
std::string inputVisFile;
|
86 |
roberfro |
1.36 |
std::string inputVisFileFromCard;
|
87 |
roberfro |
1.22 |
std::vector<std::string> inputGeom;
|
88 |
querten |
1.1 |
|
89 |
querten |
1.40 |
// MultiThreading Variables
|
90 |
|
|
#ifdef linux
|
91 |
|
|
pthread_t Thread_H;
|
92 |
|
|
#else
|
93 |
|
|
HANDLE Thread_H = NULL;
|
94 |
|
|
DWORD Thread_Id = 0;
|
95 |
|
|
#endif
|
96 |
|
|
bool Thread_Run = false;
|
97 |
|
|
|
98 |
|
|
|
99 |
|
|
|
100 |
roberfro |
1.36 |
int updateVisFileTime = -1;
|
101 |
|
|
|
102 |
roberfro |
1.22 |
FROG_Events* events;
|
103 |
querten |
1.26 |
FROG_Element_Event* event;
|
104 |
querten |
1.1 |
|
105 |
querten |
1.25 |
FROG_Geometry* geom;
|
106 |
querten |
1.1 |
|
107 |
querten |
1.13 |
char gSim = 0;
|
108 |
querten |
1.7 |
char gReco = 15;
|
109 |
querten |
1.1 |
|
110 |
querten |
1.30 |
unsigned int mCLicked_DetId = (unsigned int) -1;
|
111 |
querten |
1.21 |
bool mDisplayMother = false;
|
112 |
querten |
1.1 |
bool mLoading = true;
|
113 |
|
|
int mLoading_I = 0;
|
114 |
|
|
|
115 |
|
|
int eventNumber = 0;
|
116 |
|
|
|
117 |
|
|
bool mHelpScreen= false;
|
118 |
querten |
1.17 |
|
119 |
roberfro |
1.15 |
bool stateChanged = false;
|
120 |
querten |
1.1 |
|
121 |
querten |
1.17 |
bool print_FrameWork = false;
|
122 |
querten |
1.16 |
|
123 |
querten |
1.40 |
float BackGround_Color[4] = {0.0 , 0.0 , 0.0 , 1.0};
|
124 |
|
|
float Txt_Color[4] = {0.0 , 1.0 , 1.0 , 1.0};
|
125 |
|
|
float Framework_Color[4] = {1.0 , 0.5 , 1.0 , 0.3};
|
126 |
|
|
float Framework_Thickness = 1.0;
|
127 |
|
|
float ZAxis_Color[4] = {1.0 , 0.5 , 1.0 , 0.3};
|
128 |
|
|
float ZAxis_Thickness = 3;
|
129 |
querten |
1.1 |
|
130 |
querten |
1.41 |
|
131 |
querten |
1.28 |
|
132 |
querten |
1.1 |
void reshape (int w, int h);
|
133 |
|
|
void display();
|
134 |
querten |
1.43 |
void display2();
|
135 |
|
|
void displaytext();
|
136 |
querten |
1.20 |
|
137 |
querten |
1.1 |
void LoadCard(const char* inputCard );
|
138 |
roberfro |
1.9 |
void gl_select(int x, int y);
|
139 |
|
|
void list_hits(GLint hits, GLuint *names);
|
140 |
querten |
1.1 |
|
141 |
querten |
1.40 |
|
142 |
roberfro |
1.36 |
void updateEventsFile();
|
143 |
|
|
|
144 |
|
|
|
145 |
querten |
1.2 |
#endif
|
146 |
|
|
|