ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
Revision: 1.4
Committed: Thu Apr 17 07:30:17 2008 UTC (17 years ago) by querten
Content type: text/plain
Branch: MAIN
CVS Tags: Version_0_22
Changes since 1.3: +4 -1 lines
Log Message:
Add Geometry in the config file

File Contents

# User Rev Content
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    
10     #ifdef linux
11     #include <GL/gl.h>
12     #include <GL/glu.h>
13     #include "../interface/glut.h"
14     #else
15     #define _CRT_SECURE_NO_DEPRECATE 1
16     #include <windows.h>
17     #include <gl/gl.h>
18     #include <gl/glu.h>
19     #include <gl/glut.h>
20     #pragma comment (lib,"glaux.lib")
21     #pragma comment (lib,"glu32.lib")
22     #pragma comment (lib,"opengl32.lib")
23     #pragma comment (lib,"glut.lib")
24     #pragma comment (lib,"glut32.lib")
25     #endif
26    
27     #include <stdio.h>
28     #include <math.h>
29    
30     #include "../interface/SimEvent.h"
31     #include "../interface/Geometry.h"
32    
33     #include "DrawPrimitive.h"
34     #include "ScreenShot.h"
35     #include "Logo.h"
36     #include "Texture.h"
37     #include "ReadCards.h"
38     #include "FROG_Struct.h"
39    
40     int SAVE_WINDOW_W = 800;
41     int SAVE_WINDOW_H = 600;
42     int SAVE_WINDOW_X = 10;
43     int SAVE_WINDOW_Y = 10;
44    
45     bool FULLSCREEN = false;
46     int WINDOW_WIDTH = 800;
47     int WINDOW_HEIGHT = 600;
48     int SCREENSHOT = 0;
49    
50     float CAM_R = 700;
51     float CAM_tx = 0.0;
52     float CAM_ty = 0.0;
53    
54     int CMS_TRACKER_RADIUS = 129;
55     int CMS_TRACKER_LENGTH = 280;
56    
57     int TRACKING_RADIUS = 129;//295;
58     int TRACKING_LENGTH = 280;//645;
59    
60     float PT_CUTOFF = 1.0;
61 roberfro 1.3 float EHCAL_CUTOFF = 4.0;
62     float EECAL_CUTOFF = 4.0;
63 querten 1.1
64     bool MouseStates[3];
65    
66     std::vector<GLuint> theSimTracks;
67     GLuint theGeomTracker[6];
68     GLuint theGeomTrackerInEvent;
69     GLuint theGeomEcal[3];
70     GLuint theGeomEcalInEvent;
71     GLuint theGeomHcal[4];
72     GLuint theGeomHcalInEvent;
73    
74     GLuint LogoTexture;
75    
76     double t = 0;
77    
78 querten 1.4 std::string inputVisFile;
79     std::string inputTrackerGeom;
80     std::string inputEcalGeom;
81     std::string inputHcalGeom;
82 querten 1.1
83     MySimEvent* event;
84     MySimEvents* events;
85    
86     Geometry* geom;
87    
88     char gTracker = 0;
89     char gEcal = 0;
90     char gHcal = 0;
91 roberfro 1.3 char gSim = 2;
92     char gReco = 7;
93 querten 1.1
94     int mTrackI = -1;
95     bool mLoading = true;
96     int mLoading_I = 0;
97    
98     int eventNumber = 0;
99    
100     bool mHelpScreen= false;
101     bool mRotate = true;
102     float mDt = 0.005f;
103    
104    
105     GLint Menu_Geom_Tracker = 0;
106     GLint Menu_Geom_Ecal = 0;
107     GLint Menu_Geom_Hcal = 0;
108     GLint Menu_Geom = 0;
109     GLint Menu_SimEvent = 0;
110     GLint Menu_RecoEvent = 0;
111     GLint Menu_Main = 0;
112    
113     WidthAndColor WaC_BackGround = {1.0 , 0.0 , 1.0 , 0.0 , 1.0};
114     WidthAndColor WaC_Txt = {1.0 , 0.0 , 1.0 , 1.0 , 1.0};
115     WidthAndColor WaC_CMS_Framework = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
116     WidthAndColor WaC_LHC_Axis = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
117     WidthAndColor WaC_Default_SimTrack = {2.0 , 0.0 , 1.0 , 1.0 , 1.0};
118     WidthAndColor WaC_Selected_SimTrack = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
119    
120     void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
121     void reshape (int w, int h);
122     void display();
123     void initGeomTracker();
124     void initGeomTrackerInEvent();
125     void initGeomEcal();
126     void initGeomEcalInEvent();
127     void initGeomHcal();
128     void initGeomHcalInEvent();
129     void initSimTrack();
130     void init();
131     void menu_callback(int value);
132     void menu_create();
133     void LoadCard(const char* inputCard );
134    
135 querten 1.2 #endif
136