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

mise a jour par rapport au commit sur cvs de geant4

Location:
trunk/geant4/visualization/OpenGL
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/visualization/OpenGL/GNUmakefile

    r668 r688  
    1 # $Id: GNUmakefile,v 1.6 2004/06/03 11:40:13 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.7 2008/01/15 11:05:08 lgarnier Exp $
    22
    33name := G4OpenGL
  • trunk/geant4/visualization/OpenGL/History

    r632 r688  
    1 $Id: History,v 1.104 2007/11/30 14:47:30 lgarnier Exp $
     1$Id: History,v 1.106 2008/01/15 11:05:08 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    2020History file for visualization/OpenGL
    2121-------------------------------------
     22
     2315th Janvier 2007, Laurent Garnier
     24 - Fixed some layout problems on export dialog box
     25 - Some improvements on exports formats
     26 - Fix a bug in the help command : The clic callback on a item was not
     27   working on windows
     28 - Fix a crash at exit when launched on a MAC.
     29 - EPS export format is now ready for Qt3
     30 - Add Vectoriel EPS export format
     31 - Fix an aspect ratio deformation when resize the widget
     32 - Fix a crash at launch with leopard
     33 - When selecting the "move" mouse action, this action was set even when
     34   mouse button was released. Fixed : Now we should clic to have the move action
     35 - GNUmakefile : Added a macro for moc file
     36 - Moc files : Suppression of all theses files. They are now autogenerated
     37   thanks to config/common.gmk
     38
     394th January 2008  John Allison  (opengl-V09-01-00)
     40- Implemented extended 2D interface.
    2241
    234230th November 2007  Laurent Garnier
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateSceneHandler.hh

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLImmediateSceneHandler.hh,v 1.13 2007/04/04 16:50:26 allison Exp $
     27// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.14 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5454  void BeginPrimitives (const G4Transform3D& objectTransformation);
    5555  void EndPrimitives ();
    56   void BeginPrimitives2D ();
     56  void BeginPrimitives2D (const G4Transform3D& objectTransformation);
    5757  void EndPrimitives2D ();
    5858  void BeginModeling ();
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh

    r657 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLQtExportDialog.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
     27// $Id: G4OpenGLQtExportDialog.hh,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
    2828// GEANT4 tag $Name:
    2929//
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh

    r681 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLQtViewer.hh,v 1.5 2007/11/30 14:47:30 lgarnier Exp $
     27// $Id: G4OpenGLQtViewer.hh,v 1.6 2008/01/15 11:05:08 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    135135  void actionDrawingSurfaceRemoval();
    136136  void actionDrawingLineSurfaceRemoval();
    137 //   void actionControlPanels();
    138 //   void actionExitG4();
    139137  void actionCreateEPS();
    140138
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLSceneHandler.hh

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLSceneHandler.hh,v 1.23 2007/04/04 16:50:26 allison Exp $
     27// $Id: G4OpenGLSceneHandler.hh,v 1.24 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5858  virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
    5959  virtual void EndPrimitives ();
    60   virtual void BeginPrimitives2D ();
     60  virtual void BeginPrimitives2D (const G4Transform3D& objectTransformation);
    6161  virtual void EndPrimitives2D ();
    6262  void AddPrimitive (const G4Polyline&);
     
    9595  const G4Polyhedron* CreateCutawayPolyhedron ();
    9696
     97  void ClearAndDestroyAtts();  // Destroys att holders and clears pick map.
     98
    9799  GLuint fPickName;
    98100  std::map<GLuint, G4AttHolder*> fPickMap;  // For picking.
    99   void ClearAndDestroyAtts();  // Destroys att holders and clears pick map.
     101
     102  G4bool fProcessing2D;
    100103
    101104private:
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh

    r673 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
     27// $Id: G4OpenGLStoredQtViewer.hh,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    7777  QPoint beginZoom;
    7878  QPoint endZoom;
    79   QImage glBufferImage;
     79  //  QImage glBufferImage;
    8080};
    8181
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredSceneHandler.hh

    r631 r688  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredSceneHandler.hh,v 1.24 2007/04/04 16:50:26 allison Exp $
     27// $Id: G4OpenGLStoredSceneHandler.hh,v 1.25 2008/01/04 22:07:01 allison Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    5858  void BeginPrimitives (const G4Transform3D& objectTransformation);
    5959  void EndPrimitives ();
    60   void BeginPrimitives2D ();
     60  void BeginPrimitives2D (const G4Transform3D& objectTransformation);
    6161  void EndPrimitives2D ();
    6262  void BeginModeling ();
     
    111111  // A proper implementation would use geometry hierarchy.
    112112  std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap;
    113 
    114 private:
    115   G4bool fProcessing2D;
    116113};
    117114
  • 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.