ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/FastOpenGlDisplayer/soft/main.h
(Generate patch)

Comparing UserCode/FastOpenGlDisplayer/soft/main.h (file contents):
Revision 1.4 by querten, Thu Apr 17 07:30:17 2008 UTC vs.
Revision 1.67 by querten, Sat Nov 15 08:03:13 2008 UTC

# Line 1 | Line 1
1  
2 < // SimEvent.h: interface for the SimEvent class.
2 > // main.h
3   //
4   //////////////////////////////////////////////////////////////////////
5  
6   #ifndef _MAIN_H__
7   #define _MAIN_H__
8  
9 + #define FROG_VERSION 1.106
10 + #define FROG_AUTHORLIST "Loic.Quertenmont@cern.ch\nVincent.Roberfroid@cern.ch"
11  
12 + #include "Includes/GL/glew.h"
13   #ifdef linux
14 + #include "Includes/GL/glxew.h"
15   #include <GL/gl.h>
16   #include <GL/glu.h>
17 < #include "../interface/glut.h"
18 < #else
19 < #define _CRT_SECURE_NO_DEPRECATE 1
17 > #include "Includes/GLUT/glut.h"  
18 > #elif macos
19 > #include "Includes/GL/glxew.h"
20 > #include <OpenGL/gl.h>
21 > #include <OpenGL/glu.h>
22 > #include <GLUT/glut.h>
23 > #else
24   #include <windows.h>
25 + #include <atlconv.h>
26 + #include "Includes/GL/wglew.h"
27   #include <gl/gl.h>
28   #include <gl/glu.h>
29 < #include <gl/glut.h>
29 > #include <gl/glut.h>
30   #pragma comment (lib,"glaux.lib")
31   #pragma comment (lib,"glu32.lib")
32   #pragma comment (lib,"opengl32.lib")
33   #pragma comment (lib,"glut.lib")
34   #pragma comment (lib,"glut32.lib")
35 + #pragma comment (lib,"Includes/CURL/Lib/libcurl.lib")
36 + #pragma comment (lib,"Includes/ZLIB/Lib/zdll.lib")
37 +
38   #endif
39  
40 + bool SCREENSAVER = false;
41 + bool SHOOTER     = false;
42 +
43 + #include <time.h>
44 + time_t start;
45 + time_t end;
46 +
47   #include <stdio.h>
48   #include <math.h>
49  
50 < #include "../interface/SimEvent.h"
51 < #include "../interface/Geometry.h"
52 <
53 < #include "DrawPrimitive.h"
54 < #include "ScreenShot.h"
55 < #include "Logo.h"
56 < #include "Texture.h"
57 < #include "ReadCards.h"
58 < #include "FROG_Struct.h"
50 > #include "Includes/FROG/FROG_Objects.h"
51 > #include "Includes/FROG/FROG_Events.h"
52 > #include "Includes/FROG/FROG_Geometry.h"
53 >
54 > #include "Includes/FROG/FROG_Fonts.h"
55 > #include "Includes/FROG/FROG_Element_Tools.h"
56 >
57 > #include "Includes/FROG/FROG_Texture.h"
58 > #include "Includes/FROG/FROG_ReadCards.h"
59 > #include "Includes/FROG/FROG_Net_Tools.h"
60 > #include "Includes/FROG/FROG_View_Tools.h"
61 >
62 > FROG_Fonts* Fonts;
63 > FROG_ReadCards* Card;
64 > FROG_Objects_Extended* frogObjects_;
65 >
66 > std::vector<FROG_View*> ActiveViews;
67 > FROG_View_Screen* ViewScreen;
68 > FROG_View* ViewMain;
69 > FROG_View_Menu* ViewMenu;
70  
71   int SAVE_WINDOW_W = 800;
72   int SAVE_WINDOW_H = 600;
73   int SAVE_WINDOW_X = 10;
74   int SAVE_WINDOW_Y = 10;
75  
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 float EHCAL_CUTOFF = 4.0;
62 float EECAL_CUTOFF = 4.0;
76  
77 < bool MouseStates[3];
77 > bool  FULLSCREEN        = false;
78 > int   WINDOW_WIDTH      = 800;
79 > int   WINDOW_HEIGHT     = 600;
80 > int   SCREENSHOT        = 0;
81 > char  SCREENSHOT_FORMAT[255] = {"png"};
82  
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;
83  
74 GLuint LogoTexture;
84  
85 < double t = 0;
85 > int TEMP_I = 0;
86 > bool MouseStates[3];
87 >
88 > GLuint LogoTexture;
89 > GLuint LogoTxtTexture;
90  
91 + std::string inputConfig = "config.txt";
92   std::string inputVisFile;
93 < std::string inputTrackerGeom;
94 < std::string inputEcalGeom;
95 < std::string inputHcalGeom;
96 <
97 < MySimEvent*  event;
98 < MySimEvents* events;
99 <
100 < Geometry* geom;
101 <
102 < char gTracker   = 0;
103 < char gEcal      = 0;
104 < char gHcal      = 0;
105 < char gSim       = 2;
106 < char gReco      = 7;
93 > std::string inputVisFileFromCard;
94 > std::vector<std::string> inputGeom;
95 >
96 > // MultiThreading Variables
97 > #ifdef linux
98 >   pthread_t Thread_H;
99 > #elif macos
100 >   pthread_t Thread_H;
101 > #else
102 >   HANDLE Thread_H   = NULL;
103 >   DWORD  Thread_Id  = 0;
104 > #endif
105 > bool   Thread_Run = false;
106 >
107 > float SelectedObject_color[4] = {1,1,1,1};
108 > int   SelectedObject_Counter  = 0;
109 > //bool  SelectedObject_DrawFlag = true;
110  
111 < int   mTrackI   = -1;
111 > bool Geometry_WireFrame = false;
112 >
113 > int updateVisFileTime = -1;
114 >
115 > FROG_Events* events;
116 > FROG_Element_Event* event;
117 >
118 > FROG_Geometry* geom;
119 >
120 > char gSim       = 0;
121 > char gReco      = 15;
122 >
123 > //unsigned int mCLicked_DetId = (unsigned int) -1;
124 > bool mDisplayMother  = false;
125   bool mLoading   = true;
126   int  mLoading_I = 0;
127 + bool mEventChanging = true;
128 +
129 + unsigned int mAutomaticShooter_LastEvent = 0;
130 + bool mAutomaticShooter = false;
131 +
132  
133   int eventNumber = 0;
134 + int eventTime   = 5;
135  
136   bool  mHelpScreen= false;
101 bool  mRotate    = true;
102 float mDt                = 0.005f;
137  
138 + bool stateChanged = false;
139  
140 < GLint Menu_Geom_Tracker = 0;
141 < GLint Menu_Geom_Ecal    = 0;
142 < GLint Menu_Geom_Hcal    = 0;
143 < GLint Menu_Geom         = 0;
144 < GLint Menu_SimEvent     = 0;
145 < GLint Menu_RecoEvent    = 0;
146 < GLint Menu_Main         = 0;
147 <
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};
140 > bool print_FrameWork = false;
141 >
142 > float BackGround_Color[4] = {0.0 , 0.0 , 0.0 , 1.0};
143 > float Txt_Color[4]        = {0.0 , 1.0 , 1.0 , 1.0};
144 > float Framework_Color[4]  = {1.0 , 0.5 , 1.0 , 0.3};
145 > float Framework_Thickness =  1.0;
146 > float ZAxis_Color[4]      = {1.0 , 0.5 , 1.0 , 0.3};
147 > float ZAxis_Thickness     =  3;
148  
120 void DrawTrack(MySimTrack* track, MySimVertex* vertex1, MySimVertex* vertex2);
149   void reshape (int w, int h);
150   void display();
151 < void initGeomTracker();
152 < void initGeomTrackerInEvent();
153 < void initGeomEcal();
154 < void initGeomEcalInEvent();
127 < void initGeomHcal();
128 < void initGeomHcalInEvent();
129 < void initSimTrack();
130 < void init();
131 < void menu_callback(int value);
132 < void menu_create();
151 > void display2();
152 > void displayForScreenShot();
153 > void displaytext();
154 >
155   void LoadCard(const char* inputCard );
156 + void gl_select(int x, int y);
157 + void list_hits(GLint hits, GLuint *names);
158 +
159 + void AutomaticEventChanging (int Extra);
160 +
161 +
162 + void updateEventsFile();
163 +
164  
165   #endif
166  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines