1 |
querten |
1.1 |
|
2 |
|
|
// SimEvent.h: interface for the SimEvent class.
|
3 |
|
|
//
|
4 |
|
|
//////////////////////////////////////////////////////////////////////
|
5 |
|
|
|
6 |
|
|
#ifndef _MAIN_H__
|
7 |
|
|
#define _MAIN_H__
|
8 |
|
|
|
9 |
|
|
#ifdef linux
|
10 |
|
|
#include <GL/gl.h>
|
11 |
|
|
#include <GL/glu.h>
|
12 |
querten |
1.19 |
#include "Includes/GLUT/glut.h"
|
13 |
querten |
1.12 |
#include <ext/hash_map>
|
14 |
|
|
using namespace __gnu_cxx;
|
15 |
|
|
typedef hash_map<unsigned int, char*, hash<unsigned int>, equal_to<unsigned int> > HASH_Map;
|
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.19 |
|
28 |
querten |
1.12 |
#include <hash_map>
|
29 |
|
|
using namespace stdext;
|
30 |
roberfro |
1.14 |
typedef hash_map<unsigned int, char*, hash_compare<unsigned int, std::less<unsigned int> > > HASH_Map;
|
31 |
querten |
1.1 |
#endif
|
32 |
querten |
1.35 |
|
33 |
|
|
bool SCREENSAVER = false;
|
34 |
querten |
1.1 |
|
35 |
querten |
1.12 |
HASH_Map test;
|
36 |
|
|
|
37 |
|
|
#include <time.h>
|
38 |
|
|
time_t start;
|
39 |
|
|
time_t end;
|
40 |
|
|
|
41 |
querten |
1.1 |
#include <stdio.h>
|
42 |
|
|
#include <math.h>
|
43 |
|
|
|
44 |
querten |
1.25 |
#include "Includes/FROG/FROG_Objects.h"
|
45 |
roberfro |
1.22 |
#include "Includes/FROG/FROG_Events.h"
|
46 |
|
|
#include "Includes/FROG/FROG_Geometry.h"
|
47 |
querten |
1.21 |
|
48 |
|
|
#include "Includes/FROG/FROG_Element_Tools.h"
|
49 |
querten |
1.1 |
|
50 |
querten |
1.19 |
#include "Includes/FROG/Logo.h"
|
51 |
|
|
#include "Includes/FROG/Texture.h"
|
52 |
querten |
1.27 |
#include "Includes/FROG/FROG_ReadCards.h"
|
53 |
querten |
1.19 |
#include "Includes/FROG/FROG_Struct.h"
|
54 |
|
|
#include "Includes/FROG/FROG_Camera.h"
|
55 |
roberfro |
1.31 |
#include "Includes/FROG/FROG_Net.h"
|
56 |
querten |
1.1 |
|
57 |
querten |
1.21 |
|
58 |
querten |
1.1 |
int SAVE_WINDOW_W = 800;
|
59 |
|
|
int SAVE_WINDOW_H = 600;
|
60 |
|
|
int SAVE_WINDOW_X = 10;
|
61 |
|
|
int SAVE_WINDOW_Y = 10;
|
62 |
|
|
|
63 |
querten |
1.21 |
|
64 |
querten |
1.19 |
bool FULLSCREEN = false;
|
65 |
|
|
int WINDOW_WIDTH = 800;
|
66 |
|
|
int WINDOW_HEIGHT = 600;
|
67 |
|
|
int SCREENSHOT = 0;
|
68 |
|
|
char* SCREENSHOT_FORMAT = new char[255];
|
69 |
querten |
1.1 |
|
70 |
querten |
1.7 |
int TEMP_I = 0;
|
71 |
|
|
|
72 |
querten |
1.16 |
FROG_Camera Cam;
|
73 |
querten |
1.1 |
|
74 |
|
|
bool MouseStates[3];
|
75 |
|
|
|
76 |
|
|
GLuint LogoTexture;
|
77 |
querten |
1.37 |
GLuint LogoTxtTexture;
|
78 |
querten |
1.1 |
|
79 |
|
|
double t = 0;
|
80 |
|
|
|
81 |
querten |
1.4 |
std::string inputVisFile;
|
82 |
roberfro |
1.36 |
std::string inputVisFileFromCard;
|
83 |
roberfro |
1.22 |
std::vector<std::string> inputGeom;
|
84 |
querten |
1.1 |
|
85 |
roberfro |
1.36 |
int updateVisFileTime = -1;
|
86 |
|
|
|
87 |
roberfro |
1.22 |
FROG_Events* events;
|
88 |
querten |
1.26 |
FROG_Element_Event* event;
|
89 |
querten |
1.1 |
|
90 |
querten |
1.25 |
FROG_Geometry* geom;
|
91 |
querten |
1.1 |
|
92 |
querten |
1.13 |
char gSim = 0;
|
93 |
querten |
1.7 |
char gReco = 15;
|
94 |
querten |
1.1 |
|
95 |
querten |
1.30 |
unsigned int mCLicked_DetId = (unsigned int) -1;
|
96 |
querten |
1.21 |
bool mDisplayMother = false;
|
97 |
querten |
1.1 |
bool mLoading = true;
|
98 |
|
|
int mLoading_I = 0;
|
99 |
|
|
|
100 |
|
|
int eventNumber = 0;
|
101 |
|
|
|
102 |
|
|
bool mHelpScreen= false;
|
103 |
|
|
bool mRotate = true;
|
104 |
roberfro |
1.15 |
|
105 |
querten |
1.17 |
|
106 |
roberfro |
1.15 |
bool stateChanged = false;
|
107 |
querten |
1.1 |
float mDt = 0.005f;
|
108 |
|
|
|
109 |
querten |
1.17 |
bool print_FrameWork = false;
|
110 |
querten |
1.16 |
|
111 |
querten |
1.1 |
WidthAndColor WaC_BackGround = {1.0 , 0.0 , 1.0 , 0.0 , 1.0};
|
112 |
|
|
WidthAndColor WaC_Txt = {1.0 , 0.0 , 1.0 , 1.0 , 1.0};
|
113 |
|
|
WidthAndColor WaC_CMS_Framework = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
|
114 |
|
|
WidthAndColor WaC_LHC_Axis = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
|
115 |
querten |
1.17 |
WidthAndColor WaC_Selected_Object = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
|
116 |
querten |
1.1 |
|
117 |
querten |
1.28 |
FROG_ReadCards* Card;
|
118 |
|
|
|
119 |
querten |
1.1 |
void reshape (int w, int h);
|
120 |
|
|
void display();
|
121 |
querten |
1.20 |
|
122 |
querten |
1.1 |
void LoadCard(const char* inputCard );
|
123 |
roberfro |
1.9 |
void gl_select(int x, int y);
|
124 |
|
|
void list_hits(GLint hits, GLuint *names);
|
125 |
querten |
1.1 |
|
126 |
querten |
1.39 |
void* DownLoadFile(void* inputFile);
|
127 |
roberfro |
1.36 |
void updateEventsFile();
|
128 |
|
|
|
129 |
querten |
1.38 |
#ifndef linux
|
130 |
|
|
DWORD WINAPI WinDownLoadFile( LPVOID lpParam );
|
131 |
|
|
#endif
|
132 |
|
|
|
133 |
roberfro |
1.36 |
|
134 |
querten |
1.2 |
#endif
|
135 |
|
|
|