Changeset 688 for trunk/geant4/visualization/OpenGL/src
- Timestamp:
- Jan 15, 2008, 2:19:33 PM (17 years ago)
- Location:
- trunk/geant4/visualization/OpenGL/src
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc
r673 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLImmediateQtViewer.cc,v 1. 3 2007/11/15 18:24:28 lgarnier Exp $27 // $Id: G4OpenGLImmediateQtViewer.cc,v 1.4 2008/01/15 11:05:08 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc
r631 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLImmediateSceneHandler.cc,v 1.2 7 2007/04/04 16:50:26allison Exp $27 // $Id: G4OpenGLImmediateSceneHandler.cc,v 1.28 2008/01/04 22:07:01 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 130 130 131 131 void G4OpenGLImmediateSceneHandler::BeginPrimitives 132 (const G4Transform3D& objectTransformation) { 132 (const G4Transform3D& objectTransformation) 133 { 133 134 G4OpenGLSceneHandler::BeginPrimitives (objectTransformation); 135 136 G4OpenGLTransform3D oglt (objectTransformation); 137 134 138 glPushMatrix(); 135 G4OpenGLTransform3D oglt (objectTransformation);136 139 137 140 /*************************** Check matrix. … … 158 161 } 159 162 160 void G4OpenGLImmediateSceneHandler::BeginPrimitives2D() 161 { 162 G4OpenGLSceneHandler::BeginPrimitives2D(); 163 void G4OpenGLImmediateSceneHandler::BeginPrimitives2D 164 (const G4Transform3D& objectTransformation) 165 { 166 G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation); 163 167 164 168 // Push current 3D world matrices and load identity to define screen … … 171 175 glPushMatrix(); 172 176 glLoadIdentity(); 177 G4OpenGLTransform3D oglt (objectTransformation); 178 glMultMatrixd (oglt.GetGLMatrix ()); 173 179 } 174 180 -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc
r657 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLQtExportDialog.cc,v 1. 4 2007/11/13 17:48:51lgarnier Exp $27 // $Id: G4OpenGLQtExportDialog.cc,v 1.5 2008/01/15 11:05:08 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // 30 30 // 31 31 32 #define GEANT4_QT_DEBUG32 //#define GEANT4_QT_DEBUG 33 33 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER 34 34 -
trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc
r681 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLQtViewer.cc,v 1. 8 2007/11/30 14:47:30lgarnier Exp $27 // $Id: G4OpenGLQtViewer.cc,v 1.9 2008/01/15 11:05:08 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 36 36 #ifdef G4VIS_BUILD_OPENGLQT_DRIVER 37 37 38 #define GEANT4_QT_DEBUG38 //#define GEANT4_QT_DEBUG 39 39 40 40 #include "G4OpenGLQtViewer.hh" … … 590 590 591 591 #if QT_VERSION < 0x030200 592 // QAction *controlPanels = new QAction("&Control panels","&Control panels",CTRL+Key_C,mActions);593 // QAction *exitG4 = new QAction("&Exit to G4Vis >","&Exit to G4Vis >",CTRL+Key_E,mActions);594 592 QAction *createEPS = new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions); 595 593 #else 596 // QAction *controlPanels = new QAction("&Control panels",CTRL+Key_C,mActions);597 // QAction *exitG4 = new QAction("&Exit to G4Vis >",CTRL+Key_E,mActions);598 594 QAction *createEPS = new QAction("&Save as ...",CTRL+Key_S,mActions); 599 595 #endif 600 // controlPanels->addTo(mActions);601 // exitG4->addTo(mActions);602 596 createEPS->addTo(mActions); 603 // QObject ::connect(controlPanels,604 // SIGNAL(activated()),605 // this,606 // SLOT(actionControlPanels()));607 // QObject ::connect(exitG4,608 // SIGNAL(activated()),609 // this,610 // SLOT(actionExitG4()));611 597 QObject ::connect(createEPS, 612 598 SIGNAL(activated()), … … 617 603 // === Action Menu === 618 604 QMenu *mActions = fContextMenu->addMenu("&Actions"); 619 // QAction *controlPanels = mActions->addAction("Control panels");620 // QAction *exitG4 = mActions->addAction("Exit to G4Vis >");621 605 QAction *createEPS = mActions->addAction("Save as ..."); 622 // QObject ::connect(controlPanels,623 // SIGNAL(triggered()),624 // this,625 // SLOT(actionControlPanels()));626 // QObject ::connect(exitG4,627 // SIGNAL(triggered()),628 // this,629 // SLOT(actionExitG4()));630 606 QObject ::connect(createEPS, 631 607 SIGNAL(triggered()), … … 1188 1164 #endif 1189 1165 } 1190 1191 1192 // void G4OpenGLQtViewer::actionControlPanels() {1193 // #ifdef GEANT4_QT_DEBUG1194 // printf("G4OpenGLQtViewer::actionControlPanels \n");1195 // #endif1196 // }1197 1198 // void G4OpenGLQtViewer::actionExitG4() {1199 // #ifdef GEANT4_QT_DEBUG1200 // printf("G4OpenGLQtViewer::actionExitG4() \n");1201 // #endif1202 // }1203 1166 1204 1167 void G4OpenGLQtViewer::actionCreateEPS() { … … 1356 1319 } 1357 1320 1358 1359 1321 /** 1360 1322 @param pos_x mouse x position … … 1366 1328 void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::ButtonState mButtons) 1367 1329 #else 1368 1330 void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::MouseButtons mButtons) 1369 1331 #endif 1370 1332 { … … 1611 1573 int size = width*height; 1612 1574 1613 1614 1575 if (depth == 1) 1615 1576 size = (width+7)/8*height; -
trunk/geant4/visualization/OpenGL/src/G4OpenGLSceneHandler.cc
r631 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLSceneHandler.cc,v 1.5 1 2007/05/25 15:41:38allison Exp $27 // $Id: G4OpenGLSceneHandler.cc,v 1.52 2008/01/04 22:07:01 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 72 72 G4VSceneHandler (system, id, name), 73 73 fPickName(0), 74 fProcessing2D (false), 74 75 fProcessingPolymarker(false) 75 76 {} … … 124 125 } 125 126 126 void G4OpenGLSceneHandler::BeginPrimitives2D () 127 { 128 G4VSceneHandler::BeginPrimitives2D (); 127 void G4OpenGLSceneHandler::BeginPrimitives2D 128 (const G4Transform3D& objectTransformation) 129 { 130 G4VSceneHandler::BeginPrimitives2D (objectTransformation); 131 fProcessing2D = true; 129 132 } 130 133 131 134 void G4OpenGLSceneHandler::EndPrimitives2D () 132 135 { 136 fProcessing2D = false; 133 137 G4VSceneHandler::EndPrimitives2D (); 134 138 } … … 515 519 glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, materialColour); 516 520 } 517 glEnable (GL_LIGHTING);521 if (!fProcessing2D) glEnable (GL_LIGHTING); 518 522 break; 519 523 case (G4ViewParameters::wireframe): … … 605 609 glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP); 606 610 if (drawing_style == G4ViewParameters::hlhsr) { 607 glEnable (GL_LIGHTING);611 if (!fProcessing2D) glEnable (GL_LIGHTING); 608 612 } 609 613 glEnable (GL_DEPTH_TEST); … … 759 763 case (G4ViewParameters::hsr): 760 764 { 761 glEnable (GL_LIGHTING);765 if (!fProcessing2D) glEnable (GL_LIGHTING); 762 766 glEnable (GL_DEPTH_TEST); 763 767 glEnable (GL_AUTO_NORMAL); -
trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc
r682 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredQtViewer.cc,v 1. 6 2007/11/15 18:24:28 lgarnier Exp $27 // $Id: G4OpenGLStoredQtViewer.cc,v 1.8 2008/01/15 11:05:08 lgarnier Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // -
trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc
r631 r688 25 25 // 26 26 // 27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.3 4 2007/04/04 16:50:27allison Exp $27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.35 2008/01/04 22:07:01 allison Exp $ 28 28 // GEANT4 tag $Name: $ 29 29 // … … 60 60 fMemoryForDisplayLists (true), 61 61 fAddPrimitivePreambleNestingDepth (0), 62 fTopPODL (0), 63 fProcessing2D (false) 62 fTopPODL (0) 64 63 {} 65 64 … … 138 137 glPushMatrix(); 139 138 glLoadIdentity(); 139 G4OpenGLTransform3D oglt (*fpObjectTransformation); 140 glMultMatrixd (oglt.GetGLMatrix ()); 141 glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ()); 140 142 } 141 143 } … … 239 241 } 240 242 241 void G4OpenGLStoredSceneHandler::BeginPrimitives2D ()242 { 243 G4OpenGLSceneHandler::BeginPrimitives2D(); 244 fProcessing2D = true;243 void G4OpenGLStoredSceneHandler::BeginPrimitives2D 244 (const G4Transform3D& objectTransformation) 245 { 246 G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation); 245 247 } 246 248 247 249 void G4OpenGLStoredSceneHandler::EndPrimitives2D () 248 250 { 249 fProcessing2D = false;250 251 G4OpenGLSceneHandler::EndPrimitives2D (); 251 252 } -
trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredViewer.cc
r636 r688 142 142 } 143 143 144 if (fG4OpenGLStoredSceneHandler.fTopPODL) {144 if (fG4OpenGLStoredSceneHandler.fTopPODL) 145 145 glCallList (fG4OpenGLStoredSceneHandler.fTopPODL); 146 } 146 147 147 for (size_t i = 0; i < fG4OpenGLStoredSceneHandler.fTOList.size(); ++i) { 148 148 G4OpenGLStoredSceneHandler::TO& to = -
trunk/geant4/visualization/OpenGL/src/G4OpenGLViewer.cc
r678 r688 26 26 // 27 27 // $Id: G4OpenGLViewer.cc,v 1.34 2007/05/24 18:27:13 allison Exp $ 28 // GEANT4 tag $Name: $28 // GEANT4 tag $Name: HEAD $ 29 29 // 30 30 // … … 313 313 void G4OpenGLViewer::Pick(GLdouble x, GLdouble y) 314 314 { 315 printf("G4OpenGLViewer::Pick\n");316 315 //G4cout << "X: " << x << ", Y: " << y << G4endl; 317 316 const G4int BUFSIZE = 512;
Note: See TracChangeset
for help on using the changeset viewer.