Changeset 561 for trunk


Ignore:
Timestamp:
Aug 14, 2007, 12:27:44 PM (17 years ago)
Author:
garnier
Message:

r563@mac-90108: laurentgarnier | 2007-08-14 12:28:16 +0200
mise a jour suite au plantage de svk (cheksum error) suite au crash du DD en juin

Location:
trunk/geant4
Files:
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/geant4/N03/G4History.macro

    r487 r561  
    55/vis/sceneHandler/attach
    66/vis/viewer/create ! ! 600
    7 /vis/open OGLIX
    8 /vis/sceneHandler/create OGLIX
     7/vis/open OGLIQT
     8/vis/sceneHandler/create OGLIQT
    99/vis/sceneHandler/attach
    1010/vis/viewer/create ! ! 600
  • trunk/geant4/N03/exampleN03.cc

    r484 r561  
    113113  visManager->Initialize();
    114114#endif
    115    
     115     
    116116  // Set user action classes
    117117  //
  • trunk/geant4/N03/vis.mac

    r483 r561  
    2121#
    2222# Use this open statement instead for OpenGL in immediate mode.
    23 /vis/open OGLIX
     23/vis/open OGLSQT
     24#/vis/open OGLIX
    2425#
    2526# Use this open statement instead to get a HepRep version 1 file
  • trunk/geant4/N03/visTutor/exN03Vis12.mac

    r483 r561  
    11#######################################################################
    2 #  MACRO FILE NAME: exN03Vis12.mac                                    #
     2#  MACRO FILE NAME: exN03Vis12.mac                                     #
    33#                                                                     #
    4 #  AUTHOR(S): John Allison                                            #
     4#  AUTHOR(S): Laurent Garnier                                         #
    55#                                                                     #
    6 #  DATE: 16th August 2006                                             #
     6#  DATE: July 01, 2007                                                #
    77#                                                                     #
    8 #  CONTENTS: A basic macro for demonstrating time slicing             #
     8#  CONTENTS: A basic macro for demonstrating Inventor driver          #
    99#                                                                     #
    10 #  USAGE:  % $G4BINDIR/exampleN03  visTutor/exN03Vis12.mac             #
     10#  USAGE:  % $G4BINDIR/exampleN03  visTutor/exN03Vis12.mac            #
    1111#                                                                     #
    12 #  REQUIRED PLATFORMS & SOFTWARES: Mac/Unix with X-Windows, OpenGL    #
     12#  REQUIRED PLATFORMS & SOFTWARES: Unix, Motif, X-window, OpenGL,Qt   #
     13#                                  HEPVis                             #
     14#                                  Inventor (TGS or SoFree)           #
    1315#                                                                     #
     16#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR INSTALLATION:               #
     17#  (See geant4/source/visualization/README for details.)              #
     18#                                                                     #
     19#    % setenv G4VIS_BUILD_OIX_DRIVER       1                          #
     20#                                                                     #
     21#  ENVIRONMENTAL VARIABLES (C-MACROS) FOR COMPILATION:                #
     22#  (See geant4/source/visualization/README for details.)              #
     23#                                                                     #
     24#    % setenv G4VIS_USE_OIQT               1                          #
     25#                                                                     #
    1426#  ADDITIONAL NOTES:                                                  #
    1527#                                                                     #
    1628#######################################################################
    1729
     30# Create "scene-0"
     31/vis/scene/create
     32
     33# Invoke the OpenInventor driver
     34/vis/sceneHandler/create OGLIQT
     35/vis/viewer/create
     36
     37# Add the world volume to the current scene
     38/vis/scene/add/volume
     39#/vis/scene/add/volume Layer
     40# Name of the absorbers = name of their material (Lead) !
     41#/vis/scene/add/volume Lead
     42# Name of the gaps = name of their material (liquidArgon) !
     43#/vis/scene/add/volume liquidArgon
     44#/vis/scene/add/trajectories
     45/tracking/storeTrajectory 1
     46
     47# Bird-eye view of events
     48/vis/viewer/reset
     49/vis/viewer/set/viewpointThetaPhi   45 45
     50
     51/vis/scene/notifyHandlers
     52
    1853/control/verbose 2
    19 /vis/verbose confirmations
     54#######################################################################
     55#   Controls on an Inventor examiner viewer are :                     #
     56#  - in picking mode (cursor is the upper left arrow)                 #
     57#   Ctrl + pick a volume : see daughters.                             #
     58#   Shift + pick a volume : see mother.                               #
     59#  - in viewing mode (cursor is the hand)                             #
     60#   Left-button + pointer move : rotate.                              #
     61#   Ctrl+Left-button + pointer move : pane.                           #
     62#   Ctrl+Shift+Left-button + pointer move : scale.                    #
     63#   Middle-button + pointer move : pane.                              #
     64#                                                                     #
     65#######################################################################
    2066
    21 /vis/open OGLSX
    22 /vis/drawVolume
    23 /vis/scene/add/eventID
    24 /vis/scene/add/trajectories rich
     67/vis/viewer/update
    2568
    26 # Set up drawByCharge with time slicing
    27 /vis/modeling/trajectories/create/drawByCharge
    28 /vis/modeling/trajectories/drawByCharge-0/default/setDrawStepPts true
    29 /vis/modeling/trajectories/drawByCharge-0/default/setStepPtsSize 5
    30 /vis/modeling/trajectories/drawByCharge-0/default/setDrawAuxPts true
    31 /vis/modeling/trajectories/drawByCharge-0/default/setAuxPtsSize 5
    32 /vis/modeling/trajectories/drawByCharge-0/default/setTimeSliceInterval 0.001 ns
    33 /vis/modeling/trajectories/list
    34 #/N03/det/setField 5 T
    35 #/N03/det/update
    36 /run/beamOn
     69/run/beamOn 1
    3770
    38 # Configure OpenGL for display-by-time
    39 /vis/ogl/set/fade 1
    40 /vis/ogl/set/displayHeadTime true
    41 /control/alias timeRange 0.1
    42 /vis/verbose warnings
    43 /control/verbose 0
    44 /control/loop visTutor/exN03Vis12.loop startTime -{timeRange} 0.7 0.005
    45 /control/verbose 2
    46 /vis/verbose confirmations
    47 /vis/ogl/set/displayHeadTime false
    48 
    49 # Set up drawByParticleID with time slicing
    50 /vis/modeling/trajectories/create/drawByParticleID
    51 /vis/modeling/trajectories/drawByParticleID-0/set e- red
    52 /vis/modeling/trajectories/drawByParticleID-0/set e+ blue
    53 /vis/modeling/trajectories/drawByParticleID-0/set pi- cyan
    54 /vis/modeling/trajectories/drawByParticleID-0/set pi+ magenta
    55 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawStepPts true
    56 /vis/modeling/trajectories/drawByParticleID-0/default/setStepPtsSize 5
    57 #/vis/modeling/trajectories/drawByParticleID-0/default/setDrawAuxPts true
    58 /vis/modeling/trajectories/drawByParticleID-0/default/setAuxPtsSize 5
    59 /vis/modeling/trajectories/drawByParticleID-0/default/setTimeSliceInterval 0.001 ns
    60 /vis/modeling/trajectories/list
    61 
    62 # Remove gammas
    63 /vis/filtering/trajectories/create/particleFilter
    64 /vis/filtering/trajectories/particleFilter-0/add gamma
    65 /vis/filtering/trajectories/particleFilter-0/invert true
    66 
    67 /gun/energy 1 GeV
    68 /run/beamOn
    69 /control/alias timeRange 0.1
    70 /vis/ogl/set/displayHeadTime true
    71 /vis/ogl/set/displayLightFront true -90 0 0 mm
    72 /vis/verbose warnings
    73 /control/verbose 0
    74 /control/loop visTutor/exN03Vis12.loop startTime -{timeRange} 0.7 0.001
    75 /control/verbose 2
    76 /vis/verbose confirmations
    77 /vis/ogl/set/displayLightFront false
    78 /vis/ogl/set/displayHeadTime false
    79 
    80 # To see pi -> mu -> e decay.
    81 /gun/particle pi+
    82 /vis/filtering/trajectories/particleFilter-0/add anti_nu_mu
    83 /vis/filtering/trajectories/particleFilter-0/add nu_mu
    84 /vis/filtering/trajectories/particleFilter-0/add anti_nu_e
    85 /vis/filtering/trajectories/particleFilter-0/add nu_e
    86 # Accumulate several events for effect
    87 # /vis/scene/endOfEventAction accumulate
    88 /gun/energy 100 MeV
    89 #/vis/viewer/set/globalLineWidthScale 2
    90 /run/beamOn
    91 /control/alias timeRange 1000
    92 /vis/ogl/set/displayHeadTime true
    93 /vis/verbose warnings
    94 /control/verbose 0
    95 /control/loop visTutor/exN03Vis12.loop startTime -{timeRange} 3000 5
    96 /control/verbose 2
    97 /vis/verbose confirmations
  • trunk/geant4/N03/visTutor/gui.mac

    r474 r561  
    3333/gui/addButton vis Vis3(OGLSX) "/control/execute visTutor/exN03Vis3.mac"
    3434/gui/addButton vis Vis4(OGLIX) "/control/execute visTutor/exN03Vis4.mac"
     35/gui/addButton vis Vis12(OGLIQT) "/control/execute visTutor/exN03Vis12.mac"
     36/gui/addButton vis Vis14(OGLSQT) "/control/execute visTutor/exN03Vis14.mac"
    3537/gui/addButton vis Vis5(OIX)   "/control/execute visTutor/exN03Vis5.mac"
    3638/gui/addButton vis Vis6(VRML2FILE) "/control/execute visTutor/exN03Vis6.mac"
  • trunk/geant4/OpenGLQT_exemple/cmt/requirements

    r548 r561  
    77
    88#document moc moc_glwidget   FROM=../src/glwidget.h TO=../src/moc_glwidget.cpp
    9 #document moc moc_window   FROM=../src/window.h TO=../src/window.cpp
     9document moc moc_window   FROM=../src/window.h TO=../src/moc_window.cpp
    1010
    1111#application glwidget moc_window.cpp moc_glwidget.cpp window.cpp glwidget.cpp main.cpp
    12 application glwidget window.cpp glwidget.cpp main.cpp
     12application glwidget moc_window.cpp window.cpp glwidget.cpp main.cpp
     13
     14# DEBUG :
     15macro_append cflags  " -W -Wall -g" WIN32 "-W /ZI /Od"
     16macro_append cppflags  " -W -Wall -g" WIN32 " /ZI /Od"
     17macro_append cpplinkflags  " -W -Wall -g" WIN32 "/DEBUG /VERBOSE:LIB"
  • trunk/geant4/OpenGLQT_exemple/src/glwidget.cpp

    r549 r561  
    77
    88 GLWidget::GLWidget(QWidget *parent)
    9      : QGLWidget(parent)
     9     : QGLWidget()
    1010 {
    1111   printf("GLWidget::GLWidget \n");
     
    2020 }
    2121
     22 void  GLWidget::initialize() {
     23   printf("GLWidget::Initialise \n");
     24 }
     25
    2226 GLWidget::~GLWidget()
    2327 {
     
    2832 }
    2933
    30  QSize GLWidget::minimumSizeHint() const
    31  {
    32    printf("GLWidget::minimumSizeHint \n");
    33      return QSize(50, 50);
    34  }
    35 
    36  QSize GLWidget::sizeHint() const
    37  {
    38    printf("GLWidget::SizeHint \n");
    39      return QSize(400, 400);
    40  }
    41 
    42 //  void GLWidget::setXRotation(int angle)
     34//  QSize GLWidget::minimumSizeHint() const
    4335//  {
    44 //      normalizeAngle(&angle);
    45 //      if (angle != xRot) {
    46 //          xRot = angle;
    47 //          emit xRotationChanged(angle);
    48 //          updateGL();
    49 //      }
     36//    printf("GLWidget::minimumSizeHint \n");
     37//      return QSize(50, 50);
    5038//  }
    5139
    52 //  void GLWidget::setYRotation(int angle)
     40//  QSize GLWidget::sizeHint() const
    5341//  {
    54 //      normalizeAngle(&angle);
    55 //      if (angle != yRot) {
    56 //          yRot = angle;
    57 //          emit yRotationChanged(angle);
    58 //          updateGL();
    59 //      }
     42//    printf("GLWidget::SizeHint \n");
     43//      return QSize(400, 400);
    6044//  }
    6145
    62 //  void GLWidget::setZRotation(int angle)
    63 //  {
    64 //      normalizeAngle(&angle);
    65 //      if (angle != zRot) {
    66 //          zRot = angle;
    67 //          emit zRotationChanged(angle);
    68 //          updateGL();
    69 //      }
    70 //  }
     46 void GLWidget::setXRotation(int angle)
     47 {
     48     normalizeAngle(&angle);
     49     if (angle != xRot) {
     50         xRot = angle;
     51         //         emit xRotationChanged(angle);
     52         updateGL();
     53     }
     54 }
     55
     56 void GLWidget::setYRotation(int angle)
     57 {
     58     normalizeAngle(&angle);
     59     if (angle != yRot) {
     60         yRot = angle;
     61         //         emit yRotationChanged(angle);
     62         updateGL();
     63     }
     64 }
     65
     66 void GLWidget::setZRotation(int angle)
     67 {
     68     normalizeAngle(&angle);
     69     if (angle != zRot) {
     70         zRot = angle;
     71         //         emit zRotationChanged(angle);
     72         updateGL();
     73     }
     74 }
    7175
    7276 void GLWidget::initializeGL()
     
    8791     glLoadIdentity();
    8892     glTranslated(0.0, 0.0, -10.0);
    89      glRotated(xRot / 16.0, 1.0, 0.0, 0.0);
    90      glRotated(yRot / 16.0, 0.0, 1.0, 0.0);
    91      glRotated(zRot / 16.0, 0.0, 0.0, 1.0);
     93     glRotated(xRot / 16, 1.0, 0.0, 0.0);
     94     glRotated(yRot / 16, 0.0, 1.0, 0.0);
     95     glRotated(zRot / 16, 0.0, 0.0, 1.0);
    9296     glCallList(object);
    9397   printf("GLWidget::paintGL END\n");
     
    102106     glMatrixMode(GL_PROJECTION);
    103107     glLoadIdentity();
    104      glOrtho(-0.5, +0.5, +0.5, -0.5, 4.0, 15.0);
     108     glOrtho(-1., +1., -1., +1., -10., 15.0);
    105109     glMatrixMode(GL_MODELVIEW);
    106110   printf("GLWidget::resizeGL END\n");
    107111 }
    108112
    109 //  void GLWidget::mousePressEvent(QMouseEvent *event)
    110 //  {
    111 //      lastPos = event->pos();
    112 //  }
    113 
    114 //  void GLWidget::mouseMoveEvent(QMouseEvent *event)
    115 //  {
    116 //      int dx = event->x() - lastPos.x();
    117 //      int dy = event->y() - lastPos.y();
    118 
    119 //      if (event->buttons() & Qt::LeftButton) {
    120 //          setXRotation(xRot + 8 * dy);
    121 //          setYRotation(yRot + 8 * dx);
    122 //      } else if (event->buttons() & Qt::RightButton) {
    123 //          setXRotation(xRot + 8 * dy);
    124 //          setZRotation(zRot + 8 * dx);
    125 //      }
    126 //      lastPos = event->pos();
    127 //  }
     113 void GLWidget::mousePressEvent(QMouseEvent *event)
     114 {
     115   printf("GLWidget::mousePress \n");
     116     lastPos = event->pos();
     117   printf("GLWidget::mousePress END\n");
     118 }
     119
     120 void GLWidget::mouseMoveEvent(QMouseEvent *event)
     121 {
     122   printf("GLWidget::mouseEvent \n");
     123     int dx = event->x() - lastPos.x();
     124     int dy = event->y() - lastPos.y();
     125
     126     if (event->buttons() & Qt::LeftButton) {
     127   printf("GLWidget::mouseEvent Left 1\n");
     128         setXRotation(xRot + 8 * dy);
     129   printf("GLWidget::mouseEvent Left 2\n");
     130         setYRotation(yRot + 8 * dx);
     131   printf("GLWidget::mouseEvent Left 3\n");
     132     } else if (event->buttons() & Qt::RightButton) {
     133   printf("GLWidget::mouseEvent Right 1\n");
     134         setXRotation(xRot + 8 * dy);
     135   printf("GLWidget::mouseEvent Right 2\n");
     136         setZRotation(zRot + 8 * dx);
     137   printf("GLWidget::mouseEvent Right 3\n");
     138     }
     139     lastPos = event->pos();
     140   printf("GLWidget::mouseEvent END\n");
     141 }
    128142
    129143 GLuint GLWidget::makeObject()
  • trunk/geant4/OpenGLQT_exemple/src/glwidget.h

    r548 r561  
    1111     GLWidget(QWidget *parent = 0);
    1212     ~GLWidget();
     13     void initializeGL();
     14     void initialize();
     15     void resizeGL(int width, int height);
     16     void paintGL();
    1317
    14      QSize minimumSizeHint() const;
    15      QSize sizeHint() const;
     18/*      QSize minimumSizeHint() const; */
     19/*      QSize sizeHint() const; */
    1620
    17 /*  public slots: */
    18 /*      void setXRotation(int angle); */
    19 /*      void setYRotation(int angle); */
    20 /*      void setZRotation(int angle); */
     21 protected:
     22     void setXRotation(int angle);
     23     void setYRotation(int angle);
     24     void setZRotation(int angle);
    2125
    2226/*  signals: */
     
    2529/*      void zRotationChanged(int angle); */
    2630
    27  protected:
    28      void initializeGL();
    29      void paintGL();
    30      void resizeGL(int width, int height);
    31 /*      void mousePressEvent(QMouseEvent *event); */
    32 /*      void mouseMoveEvent(QMouseEvent *event); */
     31     void mousePressEvent(QMouseEvent*);
     32     void mouseMoveEvent(QMouseEvent*);
     33     void normalizeAngle(int *angle);
    3334
    3435 private:
     
    3738               GLdouble x3, GLdouble y3, GLdouble x4, GLdouble y4);
    3839     void extrude(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
    39      void normalizeAngle(int *angle);
    4040
    4141     GLuint object;
     
    4343     int yRot;
    4444     int zRot;
     45     float reelXRot;
     46     float realYRot;
     47     float realZRot;
    4548     QPoint lastPos;
    4649     QColor trolltechGreen;
  • trunk/geant4/OpenGLQT_exemple/src/window.cpp

    r549 r561  
    44 #include "window.h"
    55
    6  Window::Window()
     6Window::Window(): QDialog(0,Qt::Dialog)
    77 {
    88   printf("Window::Window 1\n");
     
    2222
    2323     QHBoxLayout *mainLayout = new QHBoxLayout;
     24
    2425     mainLayout->addWidget(glWidget);
    2526   printf("Window::Window 3\n");
     
    5152//      return slider;
    5253//  }
     54
     55void Window::mousePressEvent(QMouseEvent *event)
     56{
     57  printf("Window::mousePressEvent \n");
     58}
     59
     60void Window::mouseReleaseEvent(QMouseEvent *event)
     61{
     62  printf("Window::mouseReleaseEvent \n");
     63}
     64
     65void Window::mouseMoveEvent(QMouseEvent *event)
     66{
     67  printf("Window::mouseMoveEvent \n");
     68  //  int dx = event->x() - lastPos.x();
     69  //  int dy = event->y() - lastPos.y();
     70 
     71  //  if (event->buttons() & Qt::LeftButton) {
     72  //  } else if (event->buttons() & Qt::RightButton) {
     73  //  }
     74}
  • trunk/geant4/OpenGLQT_exemple/src/window.h

    r548 r561  
    33
    44 #include <QWidget>
     5 #include <QMenuBar>
     6 #include <QDialog>
    57
    68 class QSlider;
    79 class GLWidget;
    810
    9  class Window : public QWidget
     11 class Window : public QDialog
    1012 {
    11 /*      Q_OBJECT */
     13      Q_OBJECT
    1214
    1315 public:
     
    1517
    1618 private:
     19  void mousePressEvent(QMouseEvent*);
     20  void mouseReleaseEvent(QMouseEvent*);
     21  void mouseMoveEvent(QMouseEvent*);
    1722/*      QSlider *createSlider(); */
    1823
    19      GLWidget *glWidget;
     24  GLWidget *glWidget;
     25  QMenuBar *menuBar;
     26
    2027/*      QSlider *xSlider; */
    2128/*      QSlider *ySlider; */
  • trunk/geant4/config/G4UI_BUILD.gmk

    r502 r561  
    55# Include this *after*  architecture.gmk
    66# Include this *before* interactivity.gmk
    7 
    87
    98ifndef G4UI_NONE
  • trunk/geant4/specific-geant4.8.2.sh

    r486 r561  
    4141  export G4VIS_USE_OPENGLXM=1
    4242  export G4VIS_USE_OPENGLX=1
     43  unset G4VIS_BUILD_OPENGLXM_DRIVER
     44  unset G4VIS_BUILD_OPENGLX_DRIVER
     45  unset G4VIS_USE_OPENGLXM
     46  unset G4VIS_USE_OPENGLX
     47
     48  export G4VIS_BUILD_OPENGLQT_DRIVER=1
     49  export G4VIS_USE_OPENGLQT=1
    4350  #//////////////////////////////////////////////////////////
    4451  # Inventor :
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLImmediateQtViewer.hh

    r559 r561  
    4141#include "G4OpenGLQtViewer.hh"
    4242#include <QGLWidget>
    43 #include <QPaintEvent>
    4443
    4544#include "globals.hh"
     
    5756  void initializeGL ();
    5857  void DrawView ();
    59   void DrawView2 ();
    6058  void FinishView ();
    6159  void resizeGL(int width,int height);
    6260  void paintGL();
    63   void paintEvent(QPaintEvent*);
     61  void updateQWidget();
     62
    6463private :
    6564  int readyToPaint;
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLQtViewer.hh

    r541 r561  
    4242#include "G4OpenGLSceneHandler.hh"
    4343
     44#include <QObject>
    4445#include <QGLWidget>
    4546#include <QDialog>
     47#include <QContextMenuEvent>
     48#include <QMenu>
     49#include <QPoint>
    4650
    4751class G4OpenGLSceneHandler;
    4852
    49 class G4OpenGLQtViewer: virtual public G4OpenGLViewer {
     53class G4OpenGLQtViewer: public QObject, virtual public G4OpenGLViewer {
     54
     55  Q_OBJECT
    5056
    5157public:
     
    5460  void SetView ();
    5561  void ShowView ();
     62  virtual void DrawView()=0;
     63  virtual void updateQWidget()=0;
     64
    5665protected:
    57   //  void GetQtConnection ();
    5866  void CreateGLQtContext ();
    59   virtual void CreateMainWindow ();
    60   void CreateMainWindow (QGLWidget*);
     67  virtual void CreateMainWindow (QGLWidget*);
     68  void manageContextMenuEvent(QContextMenuEvent *e);
     69  void G4MousePressEvent(QPoint);
     70  void G4MouseMoveEvent(int, int, Qt::MouseButtons);
     71  void setXRotation(int angle);
     72  void setYRotation(int angle);
     73  void setZRotation(int angle);
     74  void normalizeAngle(int *angle);
     75  float getXRot();
     76  float getYRot();
     77  float getZRot();
     78
    6179protected:
    6280  G4int WinSize_x;
     
    6482  QGLWidget* fWindow;
    6583  QDialog* GLWindow;
     84
    6685private:
    67   //  static LRESULT CALLBACK WindowProc(HWND,UINT,WPARAM,LPARAM);
    68   //  static bool SetWindowPixelFormat(HDC);
    69 private:
    70   //  HGLRC fHGLRC;
     86  void createPopupMenu();
     87  void createRadioAction(QAction *,QAction *, const std::string&,unsigned int a=1);
     88  QMenu *fContextMenu;
     89  bool fMouseAction; // 1: rotate 0:move
     90  QPoint lastPos;
     91  float xRot;
     92  float yRot;
     93  float zRot;
     94  QAction *fDrawingWireframe;
     95  QAction *fDrawingLineRemoval;
     96  QAction *fDrawingSurfaceRemoval;
     97  QAction *fDrawingLineSurfaceRemoval;
     98
     99private slots :
     100  void actionDrawingWireframe();
     101  void actionDrawingLineRemoval();
     102  void actionDrawingSurfaceRemoval();
     103  void actionDrawingLineSurfaceRemoval();
     104  void toggleDrawingAction(int);
     105  void toggleMouseAction(bool);
     106  void toggleRepresentation(bool);
     107  void toggleBackground(bool);
     108  void toggleTransparency(bool);
     109  void toggleAntialiasing(bool);
     110  void toggleHaloing(bool);
     111  void toggleAux(bool);
     112  void toggleFullScreen(bool);
    71113};
    72114
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQt.hh

    r533 r561  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:18:04 $
     27// $Id: G4OpenGLStoredQt.hh,v 1.7 2007/06/25 21:17:44 $
    2828// GEANT4 tag $Name: geant4-08-01-patch-01 $
    2929//
  • trunk/geant4/visualization/OpenGL/include/G4OpenGLStoredQtViewer.hh

    r533 r561  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQtViewer.hh,v 1.7 2007/06/25 21:18:06 $
     27// $Id: G4OpenGLStoredQtViewer.hh,v 1.9 2007/06/25 21:17:46 $
    2828// GEANT4 tag $Name: geant4-08-01-patch-01 $
    2929//
     
    3434#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
    3535
    36 #ifndef G4OPENGLSTOREDQTVIEWER_HH
    37 #define G4OPENGLSTOREDQTVIEWER_HH
     36#ifndef G4OpenGLSTOREDQTVIEWER_HH
     37#define G4OpenGLSTOREDQTVIEWER_HH
    3838
    3939#include "G4VViewer.hh"
    4040#include "G4OpenGLStoredViewer.hh"
    4141#include "G4OpenGLQtViewer.hh"
     42#include <QGLWidget>
     43#include <QApplication>
     44#include <QMouseEvent>
     45#include <QContextMenuEvent>
    4246
    4347class G4OpenGLStoredSceneHandler;
    4448
    4549class G4OpenGLStoredQtViewer:
    46 public G4OpenGLQtViewer, public G4OpenGLStoredViewer{
     50  public G4OpenGLQtViewer, public G4OpenGLStoredViewer, public QGLWidget {
    4751 
    4852public:
    4953  G4OpenGLStoredQtViewer (G4OpenGLStoredSceneHandler& scene,
    50                              const G4String& name = "");
     54                                const G4String& name = "");
     55  ~G4OpenGLStoredQtViewer ();
    5156  void Initialise ();
     57  void initializeGL ();
    5258  void DrawView ();
    5359  void FinishView ();
     60  void resizeGL(int width,int height);
     61  void paintGL();
     62  void updateQWidget();
     63
     64protected:
     65  void mousePressEvent(QMouseEvent *event);
     66  void mouseMoveEvent(QMouseEvent *event);
     67  void contextMenuEvent(QContextMenuEvent *e);
     68
     69private :
     70  bool hasToRepaint;
     71  bool readyToPaint;
     72  int nbPaint;
    5473};
    5574
     
    5776
    5877#endif
    59 
  • trunk/geant4/visualization/management/include/G4VisExecutive.icc

    r537 r561  
    105105  RegisterGraphicsSystem (new G4VRML1File);
    106106  RegisterGraphicsSystem (new G4VRML2File);
     107
    107108  // Graphics systems needing external packages or libraries...
    108109
  • trunk/geant4/visualization/management/src/G4VSceneHandler.cc

    r542 r561  
    566566      if (events) nKeptEvents = events->size();
    567567      if (runManager) {
     568          printf("G4VSceneHandler::ProcessScene 4 : run manager OK\n");
    568569        if (fpScene->GetRefreshAtEndOfEvent()) {
    569 
    570           printf("G4VSceneHandler::ProcessScene 4 : fpScene->GetRefreshAtEndOfEvent()\n");
    571 //        if (verbosity >= G4VisManager::confirmations) {
    572 //          G4cout << "Refreshing event..." << G4endl;
    573 //        }
    574 //        const G4Event* event = 0;
    575 //        if (events && events->size()) event = events->back();
    576 //        if (event) DrawEvent(event);
    577 
    578 //      } else {  // Accumulating events.
    579 //   printf("G4VSceneHandler::ProcessScene 7\n");
    580 
    581 //        if (verbosity >= G4VisManager::confirmations) {
    582 //          G4cout << "Refreshing events in run..." << G4endl;
    583 //        }
    584 //        for (size_t i = 0; i < nKeptEvents; ++i) {
    585 //          const G4Event* event = (*events)[i];
    586 //          if (event) DrawEvent(event);
    587 //        }
    588 
    589 //        if (!fpScene->GetRefreshAtEndOfRun()) {
    590 //          if (verbosity >= G4VisManager::warnings) {
    591 //            G4cout <<
    592 //              "WARNING: Cannot refresh events accumulated over more"
    593 //              "\n  than one runs.  Refreshed just the last run..."
    594 //                   << G4endl;
    595 //          }
    596 //        }
     570          printf("G4VSceneHandler::ProcessScene 5 : fpScene->GetRefreshAtEndOfEvent()\n");
     571
     572          if (verbosity >= G4VisManager::confirmations) {
     573            G4cout << "Refreshing event..." << G4endl;
     574          }
     575          const G4Event* event = 0;
     576          if (events && events->size()) event = events->back();
     577          if (event) DrawEvent(event);
     578
     579        } else {  // Accumulating events.
     580  printf("G4VSceneHandler::ProcessScene 7\n");
     581
     582          if (verbosity >= G4VisManager::confirmations) {
     583            G4cout << "Refreshing events in run..." << G4endl;
     584          }
     585          for (size_t i = 0; i < nKeptEvents; ++i) {
     586            const G4Event* event = (*events)[i];
     587            if (event) DrawEvent(event);
     588          }
     589
     590          if (!fpScene->GetRefreshAtEndOfRun()) {
     591            if (verbosity >= G4VisManager::warnings) {
     592              G4cout <<
     593                "WARNING: Cannot refresh events accumulated over more"
     594                "\n  than one runs.  Refreshed just the last run..."
     595                     << G4endl;
     596            }
     597          }
    597598        }
    598599      }
     
    607608void G4VSceneHandler::DrawEvent(const G4Event* event)
    608609{
     610  printf("G4VSceneHandler::DrawEvent \n");
    609611  const std::vector<G4VModel*>& EOEModelList =
    610612    fpScene -> GetEndOfEventModelList ();
  • trunk/geant4/visualization/management/src/G4VisStateDependent.cc

    r531 r561  
    4646  }
    4747  else if (previousState == G4State_EventProc &&  requestedState == G4State_GeomClosed) {
     48    printf("G4VisStateDependent::EndOfEvent \n");
    4849    fpVisManager -> EndOfEvent ();
    4950  }
Note: See TracChangeset for help on using the changeset viewer.