ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
Revision: 1.9
Committed: Wed Apr 23 21:31:02 2008 UTC (17 years ago) by roberfro
Content type: text/plain
Branch: MAIN
Changes since 1.8: +6 -0 lines
Log Message:
Picking of objects with mouse

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 roberfro 1.9 #include "ObjectInfo.h"
40 querten 1.1
41     int SAVE_WINDOW_W = 800;
42     int SAVE_WINDOW_H = 600;
43     int SAVE_WINDOW_X = 10;
44     int SAVE_WINDOW_Y = 10;
45    
46     bool FULLSCREEN = false;
47     int WINDOW_WIDTH = 800;
48     int WINDOW_HEIGHT = 600;
49     int SCREENSHOT = 0;
50    
51 querten 1.7 int TEMP_I = 0;
52    
53 querten 1.1 float CAM_R = 700;
54     float CAM_tx = 0.0;
55     float CAM_ty = 0.0;
56    
57     int CMS_TRACKER_RADIUS = 129;
58 querten 1.6 int CMS_TRACKER_LENGTH = 300;
59 querten 1.1
60     int TRACKING_RADIUS = 129;//295;
61 querten 1.6 int TRACKING_LENGTH = 300;//645;
62 querten 1.1
63     float PT_CUTOFF = 1.0;
64 querten 1.7 double EECAL_CUTOFF[3] = {0.2,0.6,0.0001};
65     double EHCAL_CUTOFF[4] = {1.5,1.5,0.5,5.0};
66 querten 1.1
67     bool MouseStates[3];
68    
69     std::vector<GLuint> theSimTracks;
70 querten 1.5 GLuint theGeomMuon[3];
71 querten 1.6 GLuint theGeomMuonInEvent;
72 querten 1.1 GLuint theGeomTracker[6];
73     GLuint theGeomTrackerInEvent;
74     GLuint theGeomEcal[3];
75     GLuint theGeomEcalInEvent;
76     GLuint theGeomHcal[4];
77     GLuint theGeomHcalInEvent;
78    
79     GLuint LogoTexture;
80    
81     double t = 0;
82    
83 querten 1.4 std::string inputVisFile;
84     std::string inputTrackerGeom;
85     std::string inputEcalGeom;
86     std::string inputHcalGeom;
87 querten 1.5 std::string inputMuonGeom;
88 querten 1.1
89     MySimEvent* event;
90     MySimEvents* events;
91    
92     Geometry* geom;
93    
94     char gTracker = 0;
95     char gEcal = 0;
96     char gHcal = 0;
97 querten 1.5 char gMuon = 0;
98 roberfro 1.3 char gSim = 2;
99 querten 1.7 char gReco = 15;
100 querten 1.1
101     int mTrackI = -1;
102     bool mLoading = true;
103     int mLoading_I = 0;
104    
105     int eventNumber = 0;
106    
107     bool mHelpScreen= false;
108     bool mRotate = true;
109     float mDt = 0.005f;
110    
111    
112     GLint Menu_Geom_Tracker = 0;
113     GLint Menu_Geom_Ecal = 0;
114     GLint Menu_Geom_Hcal = 0;
115 querten 1.5 GLint Menu_Geom_Muon = 0;
116 querten 1.1 GLint Menu_Geom = 0;
117     GLint Menu_SimEvent = 0;
118     GLint Menu_RecoEvent = 0;
119     GLint Menu_Main = 0;
120    
121     WidthAndColor WaC_BackGround = {1.0 , 0.0 , 1.0 , 0.0 , 1.0};
122     WidthAndColor WaC_Txt = {1.0 , 0.0 , 1.0 , 1.0 , 1.0};
123     WidthAndColor WaC_CMS_Framework = {1.0 , 1.0 , 0.5 , 1.0 , 0.3};
124     WidthAndColor WaC_LHC_Axis = {3.0 , 1.0 , 0.5 , 1.0 , 0.3};
125     WidthAndColor WaC_Default_SimTrack = {2.0 , 0.0 , 1.0 , 1.0 , 1.0};
126     WidthAndColor WaC_Selected_SimTrack = {2.0 , 1.0 , 1.0 , 0.0 , 1.0};
127    
128 querten 1.8 std::vector<IdAndWidthAndColor*> WaC_SimTracks;
129    
130 roberfro 1.9 std::vector<ObjectInfo> objInfos;
131     int kObjName = 0;
132    
133 querten 1.1 void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
134     void reshape (int w, int h);
135     void display();
136 querten 1.5 void initGeomMuon();
137 querten 1.6 void initGeomMuonInEvent();
138 querten 1.1 void initGeomTracker();
139     void initGeomTrackerInEvent();
140     void initGeomEcal();
141     void initGeomEcalInEvent();
142     void initGeomHcal();
143     void initGeomHcalInEvent();
144 querten 1.5
145 querten 1.1 void initSimTrack();
146     void init();
147     void menu_callback(int value);
148     void menu_create();
149     void LoadCard(const char* inputCard );
150 roberfro 1.9 void gl_select(int x, int y);
151     void list_hits(GLint hits, GLuint *names);
152 querten 1.1
153 querten 1.2 #endif
154