Ignore:
Timestamp:
Jan 15, 2008, 2:19:33 PM (17 years ago)
Author:
garnier
Message:

mise a jour par rapport au commit sur cvs de geant4

Location:
trunk/geant4/visualization/OpenGL/src
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc

    r673 r688  
    2525//
    2626//
    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 $
    2828// GEANT4 tag $Name:  $
    2929//
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLImmediateSceneHandler.cc

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLImmediateSceneHandler.cc,v 1.27 2007/04/04 16:50:26 allison Exp $
     27// $Id: G4OpenGLImmediateSceneHandler.cc,v 1.28 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    130130
    131131void G4OpenGLImmediateSceneHandler::BeginPrimitives
    132 (const G4Transform3D& objectTransformation) {
     132(const G4Transform3D& objectTransformation)
     133{
    133134  G4OpenGLSceneHandler::BeginPrimitives (objectTransformation);
     135
     136  G4OpenGLTransform3D oglt (objectTransformation);
     137
    134138  glPushMatrix();
    135   G4OpenGLTransform3D oglt (objectTransformation);
    136139
    137140  /*************************** Check matrix.
     
    158161}
    159162
    160 void G4OpenGLImmediateSceneHandler::BeginPrimitives2D()
    161 {
    162   G4OpenGLSceneHandler::BeginPrimitives2D();
     163void G4OpenGLImmediateSceneHandler::BeginPrimitives2D
     164(const G4Transform3D& objectTransformation)
     165{
     166  G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation);
    163167
    164168  // Push current 3D world matrices and load identity to define screen
     
    171175  glPushMatrix();
    172176  glLoadIdentity();
     177  G4OpenGLTransform3D oglt (objectTransformation);
     178  glMultMatrixd (oglt.GetGLMatrix ());
    173179}
    174180
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtExportDialog.cc

    r657 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLQtExportDialog.cc,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
     27// $Id: G4OpenGLQtExportDialog.cc,v 1.5 2008/01/15 11:05:08 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
    3030//
    3131
    32 #define GEANT4_QT_DEBUG
     32//#define GEANT4_QT_DEBUG
    3333#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3434
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r681 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLQtViewer.cc,v 1.8 2007/11/30 14:47:30 lgarnier Exp $
     27// $Id: G4OpenGLQtViewer.cc,v 1.9 2008/01/15 11:05:08 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    3636#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3737
    38 #define GEANT4_QT_DEBUG
     38//#define GEANT4_QT_DEBUG
    3939
    4040#include "G4OpenGLQtViewer.hh"
     
    590590
    591591#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);
    594592  QAction *createEPS =  new QAction("&Save as ...","&Save as ...",CTRL+Key_S,mActions);
    595593#else
    596 //   QAction *controlPanels = new QAction("&Control panels",CTRL+Key_C,mActions);
    597 //   QAction *exitG4 =  new QAction("&Exit to G4Vis >",CTRL+Key_E,mActions);
    598594  QAction *createEPS =  new QAction("&Save as ...",CTRL+Key_S,mActions);
    599595#endif
    600 //   controlPanels->addTo(mActions);
    601 //   exitG4->addTo(mActions);
    602596  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()));
    611597  QObject ::connect(createEPS,
    612598                    SIGNAL(activated()),
     
    617603  // === Action Menu ===
    618604  QMenu *mActions = fContextMenu->addMenu("&Actions");
    619 //   QAction *controlPanels = mActions->addAction("Control panels");
    620 //   QAction *exitG4 = mActions->addAction("Exit to G4Vis >");
    621605  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()));
    630606  QObject ::connect(createEPS,
    631607                    SIGNAL(triggered()),
     
    11881164#endif
    11891165}
    1190 
    1191 
    1192 // void G4OpenGLQtViewer::actionControlPanels() {
    1193 // #ifdef GEANT4_QT_DEBUG
    1194 //   printf("G4OpenGLQtViewer::actionControlPanels \n");
    1195 // #endif
    1196 // }
    1197 
    1198 // void G4OpenGLQtViewer::actionExitG4() {
    1199 // #ifdef GEANT4_QT_DEBUG
    1200 //   printf("G4OpenGLQtViewer::actionExitG4() \n");
    1201 // #endif
    1202 // }
    12031166
    12041167void G4OpenGLQtViewer::actionCreateEPS() {
     
    13561319}
    13571320
    1358 
    13591321/**
    13601322   @param pos_x mouse x position
     
    13661328void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::ButtonState mButtons)
    13671329#else
    1368   void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::MouseButtons mButtons)
     1330void G4OpenGLQtViewer::G4MouseMoveEvent(int pos_x, int pos_y,Qt::MouseButtons mButtons)
    13691331#endif
    13701332{
     
    16111573  int size = width*height;
    16121574 
    1613 
    16141575  if (depth == 1)
    16151576    size = (width+7)/8*height;
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLSceneHandler.cc

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLSceneHandler.cc,v 1.51 2007/05/25 15:41:38 allison Exp $
     27// $Id: G4OpenGLSceneHandler.cc,v 1.52 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    7272  G4VSceneHandler (system, id, name),
    7373  fPickName(0),
     74  fProcessing2D (false),
    7475  fProcessingPolymarker(false)
    7576{}
     
    124125}
    125126
    126 void G4OpenGLSceneHandler::BeginPrimitives2D ()
    127 {
    128   G4VSceneHandler::BeginPrimitives2D ();
     127void G4OpenGLSceneHandler::BeginPrimitives2D
     128(const G4Transform3D& objectTransformation)
     129{
     130  G4VSceneHandler::BeginPrimitives2D (objectTransformation);
     131  fProcessing2D = true;
    129132}
    130133
    131134void G4OpenGLSceneHandler::EndPrimitives2D ()
    132135{
     136  fProcessing2D = false;
    133137  G4VSceneHandler::EndPrimitives2D ();
    134138}
     
    515519      glMaterialfv (GL_FRONT, GL_AMBIENT_AND_DIFFUSE, materialColour);
    516520    }
    517     glEnable (GL_LIGHTING);
     521    if (!fProcessing2D) glEnable (GL_LIGHTING);
    518522    break;
    519523  case (G4ViewParameters::wireframe):
     
    605609      glStencilOp (GL_KEEP, GL_KEEP, GL_KEEP);
    606610      if (drawing_style == G4ViewParameters::hlhsr) {
    607         glEnable (GL_LIGHTING);
     611        if (!fProcessing2D) glEnable (GL_LIGHTING);
    608612      }
    609613      glEnable (GL_DEPTH_TEST);
     
    759763  case (G4ViewParameters::hsr):
    760764    {
    761       glEnable (GL_LIGHTING);
     765      if (!fProcessing2D) glEnable (GL_LIGHTING);
    762766      glEnable (GL_DEPTH_TEST);
    763767      glEnable (GL_AUTO_NORMAL);
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc

    r682 r688  
    2525//
    2626//
    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 $
    2828// GEANT4 tag $Name:  $
    2929//
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredSceneHandler.cc,v 1.34 2007/04/04 16:50:27 allison Exp $
     27// $Id: G4OpenGLStoredSceneHandler.cc,v 1.35 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    6060fMemoryForDisplayLists (true),
    6161fAddPrimitivePreambleNestingDepth (0),
    62 fTopPODL (0),
    63 fProcessing2D (false)
     62fTopPODL (0)
    6463{}
    6564
     
    138137    glPushMatrix();
    139138    glLoadIdentity();
     139    G4OpenGLTransform3D oglt (*fpObjectTransformation);
     140    glMultMatrixd (oglt.GetGLMatrix ());
     141    glColor3d (c.GetRed (), c.GetGreen (), c.GetBlue ());
    140142  }
    141143}
     
    239241}
    240242
    241 void G4OpenGLStoredSceneHandler::BeginPrimitives2D()
    242 {
    243   G4OpenGLSceneHandler::BeginPrimitives2D();
    244   fProcessing2D = true;
     243void G4OpenGLStoredSceneHandler::BeginPrimitives2D
     244(const G4Transform3D& objectTransformation)
     245{
     246  G4OpenGLSceneHandler::BeginPrimitives2D(objectTransformation);
    245247}
    246248
    247249void G4OpenGLStoredSceneHandler::EndPrimitives2D ()
    248250{
    249   fProcessing2D = false;
    250251  G4OpenGLSceneHandler::EndPrimitives2D ();
    251252}
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLStoredViewer.cc

    r636 r688  
    142142    }
    143143
    144     if (fG4OpenGLStoredSceneHandler.fTopPODL) {
     144    if (fG4OpenGLStoredSceneHandler.fTopPODL)
    145145      glCallList (fG4OpenGLStoredSceneHandler.fTopPODL);
    146     }
     146
    147147    for (size_t i = 0; i < fG4OpenGLStoredSceneHandler.fTOList.size(); ++i) {
    148148      G4OpenGLStoredSceneHandler::TO& to =
  • trunk/geant4/visualization/OpenGL/src/G4OpenGLViewer.cc

    r678 r688  
    2626//
    2727// $Id: G4OpenGLViewer.cc,v 1.34 2007/05/24 18:27:13 allison Exp $
    28 // GEANT4 tag $Name: $
     28// GEANT4 tag $Name: HEAD $
    2929//
    3030//
     
    313313void G4OpenGLViewer::Pick(GLdouble x, GLdouble y)
    314314{
    315   printf("G4OpenGLViewer::Pick\n");
    316315  //G4cout << "X: " << x << ", Y: " << y << G4endl;
    317316  const G4int BUFSIZE = 512;
Note: See TracChangeset for help on using the changeset viewer.