ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
Revision: 1.2
Committed: Tue Apr 15 16:16:49 2008 UTC (17 years ago) by querten
Content type: text/plain
Branch: MAIN
Changes since 1.1: +2 -1 lines
Log Message:
fix main.h

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    
62     bool MouseStates[3];
63    
64     std::vector<GLuint> theSimTracks;
65     GLuint theGeomTracker[6];
66     GLuint theGeomTrackerInEvent;
67     GLuint theGeomEcal[3];
68     GLuint theGeomEcalInEvent;
69     GLuint theGeomHcal[4];
70     GLuint theGeomHcalInEvent;
71    
72     GLuint LogoTexture;
73    
74     double t = 0;
75    
76     std::string inputVisFile = "MinBias.vis";
77    
78     MySimEvent* event;
79     MySimEvents* events;
80    
81     Geometry* geom;
82    
83    
84     bool mPSimHit = false;
85     bool mSimTrack = true;
86     bool mSimVertex = true;
87     bool mRecoTrack = true;
88     bool mRecoEcalHit = true;
89     bool mRecoHcalHit = true;
90    
91     char gTracker = 0;
92     char gEcal = 0;
93     char gHcal = 0;
94    
95     int mTrackI = -1;
96     bool mLoading = true;
97     int mLoading_I = 0;
98    
99     int eventNumber = 0;
100    
101     bool mHelpScreen= false;
102     bool mRotate = true;
103     float mDt = 0.005f;
104    
105    
106     GLint Menu_Geom_Tracker = 0;
107     GLint Menu_Geom_Ecal = 0;
108     GLint Menu_Geom_Hcal = 0;
109     GLint Menu_Geom = 0;
110     GLint Menu_SimEvent = 0;
111     GLint Menu_RecoEvent = 0;
112     GLint Menu_Main = 0;
113    
114     WidthAndColor WaC_BackGround = {1.0 , 0.0 , 1.0 , 0.0 , 1.0};
115     WidthAndColor WaC_Txt = {1.0 , 0.0 , 1.0 , 1.0 , 1.0};
116     WidthAndColor WaC_CMS_Framework = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
117     WidthAndColor WaC_LHC_Axis = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
118     WidthAndColor WaC_Default_SimTrack = {2.0 , 0.0 , 1.0 , 1.0 , 1.0};
119     WidthAndColor WaC_Selected_SimTrack = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
120    
121     void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
122     void reshape (int w, int h);
123     void display();
124     void initGeomTracker();
125     void initGeomTrackerInEvent();
126     void initGeomEcal();
127     void initGeomEcalInEvent();
128     void initGeomHcal();
129     void initGeomHcalInEvent();
130     void initSimTrack();
131     void init();
132     void menu_callback(int value);
133     void menu_create();
134     void LoadCard(const char* inputCard );
135    
136 querten 1.2 #endif
137