Changeset 688


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
Files:
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/interfaces/GAG/include/G4UIGAG.hh

    r593 r688  
    2626//
    2727// $Id: G4UIGAG.hh,v 1.7 2006/06/29 19:09:18 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030// G4UIGAG.hh
  • trunk/geant4/interfaces/GAG/include/G4UIGainServer.hh

    r593 r688  
    2626//
    2727// $Id: G4UIGainServer.hh,v 1.5 2006/06/29 19:09:21 gunter Exp $
    28 // $Name: geant4-09-00-ref-01 $
     28// $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/GNUmakefile

    r668 r688  
    1 # $Id: GNUmakefile,v 1.6 2004/06/03 13:55:20 gcosmo Exp $
     1# $Id: GNUmakefile,v 1.7 2008/01/15 11:04:26 lgarnier Exp $
    22# -----------------------------------------------------------------------
    33# GNUmakefile for interfaces.  John Allison, 5/7/98.
  • trunk/geant4/interfaces/History

    r632 r688  
    1 $Id: History,v 1.91 2007/11/30 14:28:49 lgarnier Exp $
     1$Id: History,v 1.93 2008/01/15 11:04:26 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    1818     ----------------------------------------------------------
    1919
     2015th Janvier 2007, Laurent Garnier
     21 - Fixed some layout problems
     22 - GNUmakefile : Added a macro for moc file
     23 - Moc files : Suppression of all theses files. They are now autogenerated
     24   thanks to config/common.gmk
     25
     2615 January 2007, Koichi Murakami (interfaces-V09-01-00)
     27 - G4UItcsh.cc: fixed the problem with Ctl-D termination for bash users.
     28
    202930 November 2007, Laurent Garnier
    2130 - G4UIQt : Some improvements for Qt3, corrections of some bugs
  • trunk/geant4/interfaces/basic/GNUmakefile

    r668 r688  
    1 # $Id: GNUmakefile,v 1.4 2007/10/29 18:49:45 asaim Exp $
     1# $Id: GNUmakefile,v 1.5 2008/01/15 11:04:26 lgarnier Exp $
    22# -------------------------------------------------------------
    33# GNUmakefile for interfaces/basic library.  John Allison, 6/7/98.
  • trunk/geant4/interfaces/basic/include/G4UIArrayString.hh

    r648 r688  
    2626//
    2727// $Id: G4UIArrayString.hh,v 1.3 2006/06/29 19:09:27 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/include/G4UIQt.hh

    r648 r688  
    2525//
    2626//
    27 // $Id: G4UIQt.hh,v 1.9 2007/11/30 13:32:47 lgarnier Exp $
     27// $Id: G4UIQt.hh,v 1.10 2008/01/15 11:04:26 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
  • trunk/geant4/interfaces/basic/include/G4UIWin32.hh

    r648 r688  
    2626//
    2727// $Id: G4UIWin32.hh,v 1.14 2006/06/29 19:09:29 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030#ifndef G4UIWin32_h
  • trunk/geant4/interfaces/basic/include/G4UIXaw.hh

    r648 r688  
    2626//
    2727// $Id: G4UIXaw.hh,v 1.6 2006/06/29 19:09:31 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030#ifndef G4UIXaw_h
  • trunk/geant4/interfaces/basic/include/G4UIXm.hh

    r648 r688  
    2626//
    2727// $Id: G4UIXm.hh,v 1.13 2006/06/29 19:09:33 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030#ifndef G4UIXm_h
  • trunk/geant4/interfaces/basic/include/G4UIcsh.hh

    r648 r688  
    2626//
    2727// $Id: G4UIcsh.hh,v 1.4 2006/06/29 19:09:35 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/include/G4UItcsh.hh

    r648 r688  
    2626//
    2727// $Id: G4UItcsh.hh,v 1.8 2007/06/14 05:44:58 kmura Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/include/G4UIterminal.hh

    r648 r688  
    2525//
    2626// $Id: G4UIterminal.hh,v 1.10 2007/05/22 01:51:05 kmura Exp $
    27 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// GEANT4 tag $Name: $
    2828//
    2929// ====================================================================
  • trunk/geant4/interfaces/basic/include/G4VUIshell.hh

    r648 r688  
    2626//
    2727// $Id: G4VUIshell.hh,v 1.7 2007/06/14 05:44:58 kmura Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/src/G4UIArrayString.cc

    r648 r688  
    2626//
    2727// $Id: G4UIArrayString.cc,v 1.8 2006/06/29 19:09:43 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/src/G4UIQt.cc

    r683 r688  
    2525//
    2626//
    27 // $Id: G4UIQt.cc,v 1.13 2007/11/30 14:28:50 lgarnier Exp $
     27// $Id: G4UIQt.cc,v 1.14 2008/01/15 11:04:26 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
  • trunk/geant4/interfaces/basic/src/G4UIWin32.cc

    r648 r688  
    2626//
    2727// $Id: G4UIWin32.cc,v 1.13 2006/06/29 19:09:45 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030// G.Barrand
  • trunk/geant4/interfaces/basic/src/G4UIXaw.cc

    r648 r688  
    2626//
    2727// $Id: G4UIXaw.cc,v 1.6 2006/06/29 19:09:47 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030// G.Barrand
  • trunk/geant4/interfaces/basic/src/G4UIXm.cc

    r648 r688  
    2626//
    2727// $Id: G4UIXm.cc,v 1.14 2006/06/29 19:09:49 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030// G.Barrand
  • trunk/geant4/interfaces/basic/src/G4UIcsh.cc

    r648 r688  
    2626//
    2727// $Id: G4UIcsh.cc,v 1.8 2006/06/29 19:09:51 gunter Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/interfaces/basic/src/G4UItcsh.cc

    r593 r688  
    2525//
    2626//
    27 // $Id: G4UItcsh.cc,v 1.15 2007/11/06 09:36:23 kmura Exp $
     27// $Id: G4UItcsh.cc,v 1.16 2008/01/15 08:13:34 kmura Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    560560      else if (commandLine.empty()) {
    561561        G4cout << G4endl;
     562        RestoreTerm();
    562563        exit(0);
    563564      } else DeleteCharacter();
  • trunk/geant4/interfaces/basic/src/G4VUIshell.cc

    r648 r688  
    2626//
    2727// $Id: G4VUIshell.cc,v 1.10 2007/06/14 05:44:58 kmura Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     28// GEANT4 tag $Name: $
    2929//
    3030
  • trunk/geant4/visualization/History

    r631 r688  
    1 $Id: History,v 1.418 2007/11/19 19:56:26 perl Exp $
     1$Id: History,v 1.419 2008/01/04 22:17:08 allison Exp $
    22-------------------------------------------------------------------
    33
     
    2424History file for visualization category
    2525---------------------------------------
     26
     274th January 2008  John Allison  (vis-V09-01-00 with greps-V09-01-00)
     28- Draw2D capability, already available for G4Text, extended to:
     29  G4Circle, G4Polyhedron, G4Polyline, G4Polymarker, G4Square.
     30  o modeling-V09-01-00: Adapted to new BeginPrimitives2D signature.
     31  o visman-V09-01-00: Implemented extended 2D interface.
     32  o opengl-V09-01-00: Implemented extended 2D interface.
     33  o vis-HepRep-V09-01-00: Adapted to new BeginPrimitives2D signature.
     34  o vistest-V09-01-00: MyEventAction: Added 2D polyhedron.
    2635
    273619th November 2007 Joseph Perl  (vis-V09-00-03)
  • 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;
  • trunk/geant4/visualization/management/History

    r632 r688  
    1 $Id: History,v 1.104 2007/11/30 14:47:30 lgarnier Exp $
     1$Id: History,v 1.105 2008/01/04 22:03:46 allison Exp $
    22
    33-------------------------------------------------------------------
     
    2626History file for visualization management sub-category
    2727------------------------------------------------------
     28
     294th January 2008  John Allison  (visman-V09-01-00)
     30- Implemented extended 2D interface.
    2831
    293230th November 2007  Laurent Garnier
  • trunk/geant4/visualization/management/include/G4VSceneHandler.hh

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VSceneHandler.hh,v 1.39 2007/01/11 16:38:14 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    164164  // }
    165165
    166   virtual void BeginPrimitives2D ();
     166  virtual void BeginPrimitives2D
     167  (const G4Transform3D& objectTransformation);
    167168  // The x,y coordinates of the primitives passed to AddPrimitive are
    168169  // intrepreted as screen coordinates, -1 < x,y < 1.  The
  • trunk/geant4/visualization/management/include/G4VisManager.hh

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VisManager.hh,v 1.67 2007/07/10 17:49:27 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VisManager.hh,v 1.68 2008/01/04 22:03:46 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    250250    const G4Transform3D& objectTransformation = G4Transform3D());
    251251
    252   void Draw2D (const G4Text&);
     252  virtual void Draw2D (const G4Circle&,
     253    const G4Transform3D& objectTransformation = G4Transform3D());
     254
     255  virtual void Draw2D (const G4NURBS&,
     256    const G4Transform3D& objectTransformation = G4Transform3D());
     257
     258  virtual void Draw2D (const G4Polyhedron&,
     259    const G4Transform3D& objectTransformation = G4Transform3D());
     260
     261  virtual void Draw2D (const G4Polyline&,
     262    const G4Transform3D& objectTransformation = G4Transform3D());
     263
     264  virtual void Draw2D (const G4Polymarker&,
     265    const G4Transform3D& objectTransformation = G4Transform3D());
     266
     267  virtual void Draw2D (const G4Square&,
     268    const G4Transform3D& objectTransformation = G4Transform3D());
     269
     270  virtual void Draw2D (const G4Text&,
     271    const G4Transform3D& objectTransformation = G4Transform3D());
    253272
    254273  ////////////////////////////////////////////////////////////////////
  • trunk/geant4/visualization/management/src/G4VSceneHandler.cc

    r593 r688  
    2525//
    2626//
    27 // $Id: G4VSceneHandler.cc,v 1.82 2007/05/16 15:47:44 allison Exp $
    28 // GEANT4 tag $Name: geant4-09-00-ref-01 $
     27// $Id: G4VSceneHandler.cc,v 1.83 2008/01/04 22:03:46 allison Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    159159}
    160160
    161 void G4VSceneHandler::BeginPrimitives2D () {
     161void G4VSceneHandler::BeginPrimitives2D
     162(const G4Transform3D& objectTransformation) {
    162163  fNestingDepth++;
    163164  if (fNestingDepth > 1)
    164165    G4Exception("G4VSceneHandler::BeginPrimitives2D: Nesting detected."
    165166                "\n  It is illegal to nest Begin/EndPrimitives.");
    166   // Not actually required for 2D operations but some drivers do an
    167   // initial transformation...
    168   fpObjectTransformation = &fIdentityTransformation;
     167  fpObjectTransformation = &objectTransformation;
    169168}
    170169
  • trunk/geant4/visualization/management/src/G4VisManager.cc

    r632 r688  
    2424// ********************************************************************
    2525//
    26 // $Id: G4VisManager.cc,v 1.114 2007/11/10 14:59:46 allison Exp $
     26// $Id: G4VisManager.cc,v 1.115 2008/01/04 22:03:46 allison Exp $
    2727// GEANT4 tag $Name:  $
    2828//
     
    505505}
    506506
    507 void G4VisManager::Draw2D (const G4Text& text)
     507void G4VisManager::Draw2D (const G4Circle& circle,
     508                           const G4Transform3D& objectTransform)
    508509{
    509510  if (IsValidView()) {
    510511    ClearTransientStoreIfMarked();
    511     fpSceneHandler -> BeginPrimitives2D();
     512    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     513    fpSceneHandler -> AddPrimitive(circle);
     514    fpSceneHandler -> EndPrimitives2D();
     515  }
     516}
     517
     518void G4VisManager::Draw2D (const G4NURBS& nurbs,
     519                           const G4Transform3D& objectTransform)
     520{
     521  if (IsValidView()) {
     522    ClearTransientStoreIfMarked();
     523    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     524    fpSceneHandler -> AddPrimitive(nurbs);
     525    fpSceneHandler -> EndPrimitives2D();
     526  }
     527}
     528
     529void G4VisManager::Draw2D (const G4Polyhedron& polyhedron,
     530                           const G4Transform3D& objectTransform)
     531{
     532  if (IsValidView()) {
     533    ClearTransientStoreIfMarked();
     534    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     535    fpSceneHandler -> AddPrimitive(polyhedron);
     536    fpSceneHandler -> EndPrimitives2D();
     537  }
     538}
     539
     540void G4VisManager::Draw2D (const G4Polyline& line,
     541                           const G4Transform3D& objectTransform)
     542{
     543  if (IsValidView()) {
     544    ClearTransientStoreIfMarked();
     545    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     546    fpSceneHandler -> AddPrimitive(line);
     547    fpSceneHandler -> EndPrimitives2D();
     548  }
     549}
     550
     551void G4VisManager::Draw2D (const G4Polymarker& polymarker,
     552                           const G4Transform3D& objectTransform)
     553{
     554  if (IsValidView()) {
     555    ClearTransientStoreIfMarked();
     556    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     557    fpSceneHandler -> AddPrimitive(polymarker);
     558    fpSceneHandler -> EndPrimitives2D();
     559  }
     560}
     561
     562void G4VisManager::Draw2D (const G4Square& square,
     563                           const G4Transform3D& objectTransform)
     564{
     565  if (IsValidView()) {
     566    ClearTransientStoreIfMarked();
     567    fpSceneHandler -> BeginPrimitives2D(objectTransform);
     568    fpSceneHandler -> AddPrimitive(square);
     569    fpSceneHandler -> EndPrimitives2D();
     570  }
     571}
     572
     573void G4VisManager::Draw2D (const G4Text& text,
     574                           const G4Transform3D& objectTransform)
     575{
     576  if (IsValidView()) {
     577    ClearTransientStoreIfMarked();
     578    fpSceneHandler -> BeginPrimitives2D(objectTransform);
    512579    fpSceneHandler -> AddPrimitive(text);
    513580    fpSceneHandler -> EndPrimitives2D();
Note: See TracChangeset for help on using the changeset viewer.