Changeset 866


Ignore:
Timestamp:
Oct 15, 2008, 2:48:57 PM (16 years ago)
Author:
garnier
Message:

see history

Location:
trunk/source/visualization/OpenGL
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/visualization/OpenGL/History

    r862 r866  
    1 $Id: History,v 1.117 2008/10/02 08:56:45 lgarnier Exp $
     1$Id: History,v 1.118 2008/10/15 10:33:27 lgarnier Exp $
    22-------------------------------------------------------------------
    33
     
    2020History file for visualization/OpenGL
    2121-------------------------------------
     22
     2312th October Laurent Garnier
     24 - G4OpenGLQtExportDialog : improvments for Qt3"
     25 - G4OpenGLQtViewer,G4OpenGLImmediateQtViewer,G4OpenGLStoreQtViewer : Add the name on OpenGlQt viewers
     26 - G4OpenGLStoredQtViewer,G4OpenGLImmediateQt, G4OpenGLStoredQt : Change OGLSQT and OGLIQT by OGLSQt and OGLIQt
    2227
    23282 October Laurent Garnier
  • trunk/source/visualization/OpenGL/include/G4OpenGLQtExportDialog.hh

    r704 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLQtExportDialog.hh,v 1.5 2008/01/30 10:54:13 lgarnier Exp $
     27// $Id: G4OpenGLQtExportDialog.hh,v 1.6 2008/10/15 10:16:17 lgarnier Exp $
    2828// GEANT4 tag $Name:
    2929//
     
    3636
    3737#include <qdialog.h>
     38#include <qobject.h>
    3839
    3940class QButtonGroup;
  • trunk/source/visualization/OpenGL/include/G4OpenGLQtMovieDialog.hh

    r863 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLQtMovieDialog.hh,v 1.3 2008/10/07 01:03:04 lgarnier Exp $
     27// $Id: G4OpenGLQtMovieDialog.hh,v 1.4 2008/10/07 05:36:11 lgarnier Exp $
    2828// GEANT4 tag $Name:
    2929//
     
    7979
    8080public slots :
    81   void checkAllParameters();
    8281  void stopFinishClose();
    8382  void save();
  • trunk/source/visualization/OpenGL/include/G4OpenGLQtViewer.hh

    r857 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLQtViewer.hh,v 1.10 2008/06/20 13:55:06 lgarnier Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4OpenGLQtViewer.hh,v 1.12 2008/10/15 10:24:04 lgarnier Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    105105protected:
    106106  void CreateGLQtContext ();
    107   virtual void CreateMainWindow (QGLWidget*);
     107  virtual void CreateMainWindow (QGLWidget*,QString);
    108108  void manageContextMenuEvent(QContextMenuEvent *e);
    109109#if QT_VERSION < 0x040000
  • trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQt.cc

    r850 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLImmediateQt.cc,v 1.2 2007/11/15 18:24:28 lgarnier Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4OpenGLImmediateQt.cc,v 1.3 2008/10/15 10:26:25 lgarnier Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    4343G4OpenGLImmediateQt::G4OpenGLImmediateQt ():
    4444  G4VGraphicsSystem ("OpenGLImmediateQt",
    45                      "OGLIQT",
     45                     "OGLIQt",
    4646                     G4VisFeaturesOfOpenGLIQt (),
    4747                     G4VGraphicsSystem::threeD)
  • trunk/source/visualization/OpenGL/src/G4OpenGLImmediateQtViewer.cc

    r850 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLImmediateQtViewer.cc,v 1.4 2008/01/15 11:05:08 lgarnier Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4OpenGLImmediateQtViewer.cc,v 1.5 2008/10/15 10:24:04 lgarnier Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    7575#endif
    7676
    77   CreateMainWindow (this);
     77   CreateMainWindow (this,QString(fName));
    7878#ifdef GEANT4_QT_DEBUG
    7979  printf("G4OpenGLImmediateQtViewer::Initialise () 3\n");
  • trunk/source/visualization/OpenGL/src/G4OpenGLQtViewer.cc

    r863 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLQtViewer.cc,v 1.24 2008/06/20 13:55:06 lgarnier Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4OpenGLQtViewer.cc,v 1.26 2008/10/07 03:39:47 lgarnier Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    167167void G4OpenGLQtViewer::CreateMainWindow (
    168168 QGLWidget* glWidget
     169 ,QString name
    169170)
    170171//////////////////////////////////////////////////////////////////////////////
     
    235236
    236237#if QT_VERSION < 0x040000
    237   GLWindow->setCaption( tr( "QGl Viewer" ));
     238  GLWindow->setCaption(name );
    238239#else
    239240  GLWindow->setLayout(mainLayout);
    240   GLWindow->setWindowTitle(tr("QGl Viewer"));
    241 #endif
    242   GLWindow->resize(300, 300);
     241  GLWindow->setWindowTitle( name);
     242#endif
     243  GLWindow->resize(fVP.GetWindowSizeHintX(), fVP.GetWindowSizeHintY());
    243244  GLWindow->move(900,300);
    244245  GLWindow->show();
     
    10571058  } else  if (fMouseAction == STYLE3) { //pick
    10581059    G4cout << "Click and pick " << G4endl;
     1060  } else {
     1061    G4cout << "Move camera point of view with mouse" << G4endl;
     1062    G4cout << "Press left/right arrows to move volume left/right" << G4endl;
     1063    G4cout << "Press up/down arrows to move volume up/down" << G4endl;
     1064    G4cout << "Press ALT+up/down arrows to move volume toward/forward" << G4endl;
     1065    G4cout << "Press SHIFT+left/right arrows to rotate volume left/right" << G4endl;
     1066    G4cout << "Press SHIFT+up/down arrows to rotate volume up/down" << G4endl;
     1067    G4cout << "Press +/- to zoom into volume" << G4endl;
     1068    G4cout << "Press ALT+/- to slow/speed auto rotation/move" << G4endl;
     1069    G4cout << "In video mode : " << G4endl;
     1070    G4cout << " Press SPACE to Start/Pause video recording " << G4endl;
     1071    G4cout << " Press RETURN to Stop video recording " << G4endl;
    10591072  }
    10601073
     
    18851898#else
    18861899    bool alpha = aImage.hasAlphaChannel();
     1900#endif
    18871901    for(int y=height-1; y >=0 ; y--) {
    18881902      QRgb * s = (QRgb*)(aImage.scanLine(y));
     
    19041918      fprintf (fp, "\n");
    19051919    }
    1906 #endif
    19071920
    19081921  }
     
    27692782
    27702783  setRecordingInfos("Parameter file "+fParameterFileName+" generated in "+fMovieTempFolderPath);
    2771   printf("Parameter file %s  generated in %s\n",fParameterFileName.toStdString().c_str(),fMovieTempFolderPath.toStdString().c_str());
    27722784  setRecordingStatus(READY_TO_ENCODE);
    27732785  return true;
  • trunk/source/visualization/OpenGL/src/G4OpenGLStoredQt.cc

    r864 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQt.cc,v 1.6 2008/10/07 05:28:49 lgarnier Exp $
     27// $Id: G4OpenGLStoredQt.cc,v 1.7 2008/10/15 10:26:25 lgarnier Exp $
    2828// GEANT4 tag $Name:  $
    2929//
     
    4545G4OpenGLStoredQt::G4OpenGLStoredQt ():
    4646  G4VGraphicsSystem ("OpenGLStoredQt",
    47                      "OGLSQT",
     47                     "OGLSQt",
    4848                     G4VisFeaturesOfOpenGLSQt (),
    4949                     G4VGraphicsSystem::threeD)
  • trunk/source/visualization/OpenGL/src/G4OpenGLStoredQtViewer.cc

    r863 r866  
    2525//
    2626//
    27 // $Id: G4OpenGLStoredQtViewer.cc,v 1.15 2008/06/20 13:55:06 lgarnier Exp $
    28 // GEANT4 tag $Name: HEAD $
     27// $Id: G4OpenGLStoredQtViewer.cc,v 1.18 2008/10/15 10:29:39 lgarnier Exp $
     28// GEANT4 tag $Name: $
    2929//
    3030//
     
    5252{
    5353  // if no scene...
    54   if (fSceneHandler.GetScene() == 0) {
    55     G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... "
    56            << G4endl;
    57     return;
    58   }
     54//   if (fSceneHandler.GetScene() == 0) {
     55//     G4cerr << "G4OpenGLStoredQtViewer: Creating a Viewer without a scene is not allowed. \nPlease use /vis/scene/create before /vis/open/.... "
     56//         << G4endl;
     57//     return;
     58//   }
    5959
    6060  //set true to picking
     
    9393  printf("G4OpenGLStoredQtViewer::Initialise () 2\n");
    9494#endif
    95   CreateMainWindow (this);
     95  CreateMainWindow (this,QString(fName));
    9696#ifdef GEANT4_QT_DEBUG
    9797  printf("G4OpenGLStoredQtViewer::Initialise () 3\n");
     
    121121  glDepthMask (GL_TRUE);
    122122
    123   hasToRepaint =true;
     123  if (fSceneHandler.GetScene() == 0) {
     124    hasToRepaint =false;
     125  } else {
     126    hasToRepaint =true;
     127  }
    124128
    125129#ifdef GEANT4_QT_DEBUG
  • trunk/source/visualization/OpenGL/src/G4OpenGLStoredSceneHandler.cc

    r850 r866  
    104104  if (fMemoryForDisplayLists) {
    105105    fDisplayListId = glGenLists (1);
    106     if (!fDisplayListId) {  // Could pre-allocate?
     106    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could pre-allocate?
    107107      G4cout <<
    108108        "********************* WARNING! ********************"
     
    172172  }
    173173
     174  if ((glGetError() == GL_TABLE_TOO_LARGE) || (glGetError() == GL_OUT_OF_MEMORY)) {  // Could close?
     175    G4cout <<
     176      "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
     177      "  display List for fTopPODL - try OpenGL Immediated mode."
     178           << G4endl;
     179  }
    174180  if (fMemoryForDisplayLists) {
    175181    glEndList();
     182    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could close?
     183      G4cout <<
     184        "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
     185        "  display List for fTopPODL - try OpenGL Immediated mode."
     186             << G4endl;
     187    }
    176188  }
    177189  if (fReadyForTransients || !fMemoryForDisplayLists) {
     
    283295  // Make a List which calls the other lists.
    284296  fTopPODL = glGenLists (1);
    285   if (!fTopPODL) {
     297  if (glGetError() == GL_OUT_OF_MEMORY) {  // Could pre-allocate?
    286298    G4cout <<
    287299      "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
     
    301313    }
    302314    glEndList ();
     315    if (glGetError() == GL_OUT_OF_MEMORY) {  // Could close?
     316      G4cout <<
     317        "ERROR: G4OpenGLStoredSceneHandler::EndModeling: Failure to allocate"
     318        "  display List for fTopPODL - try OpenGL Immediated mode."
     319             << G4endl;
     320    }
    303321  }
    304322
Note: See TracChangeset for help on using the changeset viewer.