Import Geant4 9.2.0 source tree
This commit is contained in:
@@ -23,8 +23,8 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGL.hh,v 1.6 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGL.hh,v 1.7 2008/04/04 13:32:22 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// G.Barrand.
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
|
||||
#define G4OPENGL_DBL_MAX 1.e308
|
||||
#define G4OPENGL_FLT_BIG 1.e20
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLBitMapStore.hh,v 1.2 2007/11/15 10:14:23 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// John Allison 6th January 2007
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGLFontBaseStore.hh,v 1.3 2006/06/29 21:17:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
// J.Allison Apr 2005.
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateQt.hh,v 1.1 2007/09/28 14:44:13 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateQt graphics system factory.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLImmediateQtViewer.hh,v 1.4 2008/11/06 13:43:44 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateQtViewer : a class derived from
|
||||
@@ -60,10 +60,19 @@ public:
|
||||
void resizeGL(int width,int height);
|
||||
void paintGL();
|
||||
void updateQWidget();
|
||||
void ShowView ();
|
||||
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void keyPressEvent (QKeyEvent * event);
|
||||
private:
|
||||
void ComputeView ();
|
||||
|
||||
private :
|
||||
int readyToPaint;
|
||||
int nbPaint;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.13 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLImmediateSceneHandler.hh,v 1.14 2008/01/04 22:07:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
virtual ~G4OpenGLImmediateSceneHandler ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginPrimitives2D ();
|
||||
void BeginPrimitives2D (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives2D ();
|
||||
void BeginModeling ();
|
||||
void EndModeling ();
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateViewer.hh,v 1.9 2006/09/04 12:07:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32.hh,v 1.7 2006/06/29 21:17:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// OpenGLImmediateWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateWin32Viewer.hh,v 1.9 2006/06/29 21:17:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLImmediateWin32Viewer : a class derived from
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateX.hh,v 1.7 2006/06/29 21:17:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXViewer.hh,v 1.9 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXm.hh,v 1.7 2006/06/29 21:17:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLImmediateXmViewer.hh,v 1.9 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtExportDialog.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// $Id: G4OpenGLQtExportDialog.hh,v 1.6 2008/10/15 10:16:17 lgarnier Exp $
|
||||
// GEANT4 tag $Name:
|
||||
//
|
||||
//
|
||||
@@ -35,6 +35,7 @@
|
||||
#define G4OPENGLQTEXPORTDIALOG_HH
|
||||
|
||||
#include <qdialog.h>
|
||||
#include <qobject.h>
|
||||
|
||||
class QButtonGroup;
|
||||
class QPushButton;
|
||||
@@ -45,21 +46,25 @@ class QComboBox;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
class QGroupBox;
|
||||
#endif
|
||||
|
||||
/** The G4OpenGLQtExportDialog class provide a Dialog displaying differents options
|
||||
for each file format
|
||||
*/
|
||||
for each file format
|
||||
*/
|
||||
class G4OpenGLQtExportDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
public:
|
||||
/** Construct a G4OpenGLQtExportDialog
|
||||
@param parent : parent widget
|
||||
@param name : name of the saved file with extention
|
||||
@param format : format of save file in lower case
|
||||
@param height : height of the original file
|
||||
@param width : width of the original file
|
||||
*/
|
||||
G4OpenGLQtExportDialog(QWidget* parent, QString name, int height =0, int width=0);
|
||||
G4OpenGLQtExportDialog(QWidget* parent, QString format, int height =0, int width=0);
|
||||
|
||||
/** Destroys G4OpenGLQtExportDialog */
|
||||
~G4OpenGLQtExportDialog();
|
||||
@@ -67,24 +72,34 @@ public:
|
||||
/** @return the value of the slider if format has a slider widget, instead return -1 */
|
||||
int getSliderValue();
|
||||
|
||||
/** return the new width for file if format has a width widget, instead return -1 */
|
||||
/** return the new width for file if format has a width widget, instead return
|
||||
the original value */
|
||||
int getWidth();
|
||||
|
||||
/** return the new height for file if format has a height widget, instead return -1 */
|
||||
/** return the new height for file if format has a height widget, instead return
|
||||
the original value */
|
||||
int getHeight();
|
||||
|
||||
/** return the value of the transparency if format has a transparency, instead return -1 */
|
||||
bool getTransparency();
|
||||
int getTransparency();
|
||||
|
||||
/** return the numbers of colors in the picture if format has a BW/Color widget, instead return -1 */
|
||||
int getNbColor();
|
||||
|
||||
public slots:
|
||||
/** return if vector EPS is checked, if button does'nt exist, return 0 */
|
||||
bool getVectorEPS();
|
||||
|
||||
/** Called by a clic on modify/original size button.This will
|
||||
invert buttons and hide/unhide size
|
||||
*/
|
||||
void changeSizeBox(bool);
|
||||
public slots:
|
||||
|
||||
/** Called by a clic on modify/original size button.This will
|
||||
invert buttons and hide/unhide size
|
||||
*/
|
||||
void changeSizeBox();
|
||||
|
||||
/** Called by a clic on vectorEPS check box.If vectorEPS checkBox is checked,
|
||||
it will enable change size buttons. Else it will disable them.
|
||||
*/
|
||||
void changeVectorEPS();
|
||||
|
||||
/** Called by changing value in height lineEdit. If ratio is keep, will also change the width
|
||||
*/
|
||||
@@ -94,13 +109,18 @@ public slots:
|
||||
*/
|
||||
void textHeightChanged(const QString &);
|
||||
|
||||
private:
|
||||
private:
|
||||
QString f_name, f_type, f_dir;
|
||||
QLabel* qualityLabel;
|
||||
bool expAll;
|
||||
QPushButton* buttonOk;
|
||||
QPushButton* buttonCancel;
|
||||
QCheckBox* transparencyEPS,*boxTransparency;
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
QGroupBox * sizeGroupBox;
|
||||
#endif
|
||||
|
||||
QCheckBox* transparencyEPS,*boxTransparency,*vectorEPSCheckBox;
|
||||
QCheckBox* ratioCheckBox;
|
||||
QSlider * qualitySlider;
|
||||
QLabel *formatLabel;
|
||||
@@ -110,7 +130,7 @@ private:
|
||||
QWidget* heightWidget,* widthWidget;
|
||||
int originalWidth;
|
||||
int originalHeight;
|
||||
|
||||
bool isChangingSize;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
//
|
||||
// ********************************************************************
|
||||
// * License and Disclaimer *
|
||||
// * *
|
||||
// * The Geant4 software is copyright of the Copyright Holders of *
|
||||
// * the Geant4 Collaboration. It is provided under the terms and *
|
||||
// * conditions of the Geant4 Software License, included in the file *
|
||||
// * LICENSE and available at http://cern.ch/geant4/license . These *
|
||||
// * include a list of copyright holders. *
|
||||
// * *
|
||||
// * Neither the authors of this software system, nor their employing *
|
||||
// * institutes,nor the agencies providing financial support for this *
|
||||
// * work make any representation or warranty, express or implied, *
|
||||
// * regarding this software system or assume any liability for its *
|
||||
// * use. Please see the license in the file LICENSE and URL above *
|
||||
// * for the full disclaimer and the limitation of liability. *
|
||||
// * *
|
||||
// * This code implementation is the result of the scientific and *
|
||||
// * technical work of the GEANT4 collaboration. *
|
||||
// * By using, copying, modifying or distributing the software (or *
|
||||
// * any work based on the software) you agree to acknowledge its *
|
||||
// * use in resulting scientific publications, and indicate your *
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtMovieDialog.hh,v 1.4 2008/10/07 05:36:11 lgarnier Exp $
|
||||
// GEANT4 tag $Name:
|
||||
//
|
||||
//
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
|
||||
#ifndef G4OPENGLQTMOVIEDIALOG_HH
|
||||
#define G4OPENGLQTMOVIEDIALOG_HH
|
||||
|
||||
#include <qdialog.h>
|
||||
|
||||
class QPushButton;
|
||||
class QLabel;
|
||||
class QLineEdit;
|
||||
class G4OpenGLQtViewer;
|
||||
|
||||
#if QT_VERSION >= 0x040000
|
||||
class QGroupBox;
|
||||
#endif
|
||||
|
||||
/** The G4OpenGLQtMovieDialog class provide a Dialog displaying differents options
|
||||
for each file format
|
||||
*/
|
||||
class G4OpenGLQtMovieDialog : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
/** Construct a G4OpenGLQtMovieDialog
|
||||
@param parent : parent widget
|
||||
*/
|
||||
G4OpenGLQtMovieDialog(G4OpenGLQtViewer*,QWidget*);
|
||||
|
||||
/** Destroys G4OpenGLQtMovieDialog */
|
||||
~G4OpenGLQtMovieDialog();
|
||||
void setRecordingStatus(QString);
|
||||
void setRecordingInfos(QString);
|
||||
|
||||
private :
|
||||
QLineEdit* fEncoderPath;
|
||||
QLineEdit* fTempFolderPath;
|
||||
QLineEdit* fSaveFileName;
|
||||
G4OpenGLQtViewer *fParentViewer;
|
||||
QLabel *fEncoderStatus;
|
||||
QLabel *fTempFolderStatus;
|
||||
QLabel *fSaveFileStatus;
|
||||
QLabel *fRecordingStatus;
|
||||
QLabel *fRecordingInfos;
|
||||
QPushButton *fButtonStopFinishClose;
|
||||
QPushButton *fButtonSave;
|
||||
QPushButton *fButtonStartPause;
|
||||
|
||||
public slots :
|
||||
void stopFinishClose();
|
||||
void save();
|
||||
bool checkEncoderSwParameters();
|
||||
bool checkSaveFileNameParameters();
|
||||
bool checkTempFolderParameters();
|
||||
|
||||
private slots :
|
||||
void selectEncoderPathAction();
|
||||
void selectTempPathAction();
|
||||
void selectSaveFileNameAction();
|
||||
void resetRecording();
|
||||
void enabledApplyButton();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtViewer.hh,v 1.4 2007/11/13 17:48:51 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLQtViewer.hh,v 1.13 2008/11/06 13:43:44 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLQtViewer : Class to provide WindowsNT specific
|
||||
@@ -54,8 +54,14 @@ class QMenu;
|
||||
#endif
|
||||
class QImage;
|
||||
class QAction;
|
||||
class QMouseEvent;
|
||||
class QKeyEvent;
|
||||
class QWheelEvent;
|
||||
class QProcess;
|
||||
class QTime;
|
||||
|
||||
class G4OpenGLSceneHandler;
|
||||
class G4OpenGLQtMovieDialog;
|
||||
|
||||
class G4OpenGLQtViewer: public QObject, virtual public G4OpenGLViewer {
|
||||
|
||||
@@ -65,19 +71,51 @@ public:
|
||||
G4OpenGLQtViewer (G4OpenGLSceneHandler& scene);
|
||||
virtual ~G4OpenGLQtViewer ();
|
||||
void SetView ();
|
||||
void ShowView ();
|
||||
virtual void updateQWidget()=0;
|
||||
void setupViewport(int, int);
|
||||
QString setEncoderPath(QString path);
|
||||
QString getEncoderPath();
|
||||
QString setTempFolderPath(QString path);
|
||||
QString getTempFolderPath();
|
||||
QString setSaveFileName(QString path);
|
||||
QString getSaveFileName();
|
||||
bool isRecording();
|
||||
bool isStopped();
|
||||
bool isPaused();
|
||||
bool isEncoding();
|
||||
bool isWaiting();
|
||||
bool isFailed();
|
||||
void setWaiting();
|
||||
bool isBadEncoder();
|
||||
bool isBadOutput();
|
||||
bool isBadTmp();
|
||||
bool isSuccess();
|
||||
void setBadTmp();
|
||||
void setBadOutput();
|
||||
void setBadEncoder();
|
||||
bool isReadyToEncode();
|
||||
void resetRecording();
|
||||
void encodeVideo();
|
||||
void stopVideo();
|
||||
void saveVideo();
|
||||
bool generateMpegEncoderParameters();
|
||||
void displayRecordingStatus();
|
||||
|
||||
protected:
|
||||
void CreateGLQtContext ();
|
||||
virtual void CreateMainWindow (QGLWidget*);
|
||||
void manageContextMenuEvent(QContextMenuEvent *e);
|
||||
void G4MousePressEvent(QPoint);
|
||||
#if QT_VERSION < 0x040000
|
||||
void G4MouseMoveEvent(int, int, Qt::ButtonState);
|
||||
#else
|
||||
void G4MouseMoveEvent(int, int, Qt::MouseButtons);
|
||||
#endif
|
||||
virtual void CreateMainWindow (QGLWidget*,QString);
|
||||
void G4resizeGL(int, int);
|
||||
void G4manageContextMenuEvent(QContextMenuEvent *e);
|
||||
void G4MousePressEvent(QMouseEvent *event);
|
||||
void G4MouseReleaseEvent();
|
||||
void G4MouseDoubleClickEvent();
|
||||
void G4MouseMoveEvent(QMouseEvent *event);
|
||||
void G4wheelEvent (QWheelEvent * event);
|
||||
void G4keyPressEvent (QKeyEvent * event);
|
||||
void rotateQtScene(float, float);
|
||||
void rotateQtCamera(float, float);
|
||||
void moveScene(float, float, float,bool);
|
||||
void FinishView();
|
||||
|
||||
|
||||
protected:
|
||||
@@ -85,53 +123,126 @@ protected:
|
||||
G4int WinSize_y;
|
||||
QGLWidget* fWindow;
|
||||
QDialog* GLWindow;
|
||||
bool hasPendingEvents();
|
||||
void savePPMToTemp();
|
||||
int fRecordFrameNumber;
|
||||
float fRotationAngleX;
|
||||
float fRotationAngleY;
|
||||
float fRotationAngleZ;
|
||||
float fDeltaRotationAngleX;
|
||||
float fDeltaRotationAngleY;
|
||||
float fDeltaRotationAngleZ;
|
||||
|
||||
bool hasToRepaint;
|
||||
bool readyToPaint;
|
||||
bool zoomAction;
|
||||
QPoint beginZoom;
|
||||
QPoint endZoom;
|
||||
|
||||
private:
|
||||
enum mouseActions {STYLE1,STYLE2,STYLE3,STYLE4};
|
||||
enum RECORDING_STEP {WAIT,START,PAUSE,CONTINUE,STOP,READY_TO_ENCODE,ENCODING,FAILED,SUCCESS,BAD_ENCODER,BAD_OUTPUT,BAD_TMP,SAVE};
|
||||
|
||||
void createPopupMenu();
|
||||
void createRadioAction(QAction *,QAction *, const std::string&,unsigned int a=1);
|
||||
void rescaleImage(int, int);
|
||||
bool generateEPS(QString,int,QImage);
|
||||
bool generateVectorEPS (QString,int,int,QImage);
|
||||
bool generatePS_PDF(QString,int,QImage);
|
||||
void showMovieParametersDialog();
|
||||
void initMovieParameters();
|
||||
QString createTempFolder();
|
||||
QString removeTempFolder();
|
||||
void setRecordingStatus(RECORDING_STEP);
|
||||
void setRecordingInfos(QString);
|
||||
QString getProcessErrorMsg();
|
||||
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
QPopupMenu *fContextMenu;
|
||||
#else
|
||||
QMenu *fContextMenu;
|
||||
#endif
|
||||
bool fMouseAction; // 1: rotate 0:move
|
||||
QPoint lastPos;
|
||||
#if QT_VERSION < 0x040000
|
||||
QPopupMenu *fDrawingWireframe;
|
||||
QPopupMenu *fDrawingLineRemoval;
|
||||
QPopupMenu *fDrawingSurfaceRemoval;
|
||||
QPopupMenu *fDrawingLineSurfaceRemoval;
|
||||
#else
|
||||
|
||||
mouseActions fMouseAction; // 1: rotate 2:move 3:pick 4:shortcuts
|
||||
QPoint fLastPos1;
|
||||
QPoint fLastPos2;
|
||||
QPoint fLastPos3;
|
||||
/** delta of scene rotation. This delta is put in degree */
|
||||
G4double fDeltaRotation;
|
||||
/** delta of scene translation. This delta is put in % of the scene view */
|
||||
G4double fDeltaSceneTranslation;
|
||||
/** delta of depth move. This delta is put in % of the scene view */
|
||||
G4double fDeltaDepth;
|
||||
/** delta of zoom move. This delta is put in % of the scene view */
|
||||
G4double fDeltaZoom;
|
||||
/** delta of auto move/rotation. This delta is put in % of the move/rotation param */
|
||||
G4double fDeltaMove;
|
||||
/** To ensure key event are keep one by one */
|
||||
bool fHoldKeyEvent;
|
||||
/** To ensure move event are keep one by one */
|
||||
bool fHoldMoveEvent;
|
||||
/** To ensure rotate event are keep one by one */
|
||||
bool fHoldRotateEvent;
|
||||
bool fAutoMove;
|
||||
QString fEncoderPath;
|
||||
QString fTempFolderPath;
|
||||
QString fMovieTempFolderPath;
|
||||
QString fSaveFileName;
|
||||
QString fParameterFileName;
|
||||
QAction *fRotateAction;
|
||||
QAction *fMoveAction;
|
||||
QAction *fPickAction;
|
||||
QAction *fFullScreenOn;
|
||||
QAction *fFullScreenOff;
|
||||
QAction *fDrawingWireframe;
|
||||
QAction *fDrawingLineRemoval;
|
||||
QAction *fDrawingSurfaceRemoval;
|
||||
QAction *fDrawingLineSurfaceRemoval;
|
||||
#endif
|
||||
G4OpenGLQtMovieDialog* fMovieParametersDialog;
|
||||
RECORDING_STEP fRecordingStep;
|
||||
QProcess *fProcess;
|
||||
QTime *fLastEventTime;
|
||||
int fSpinningDelay;
|
||||
int fLaunchSpinDelay;
|
||||
|
||||
signals:
|
||||
void rotateTheta(int);
|
||||
void rotatePhi(int);
|
||||
void moveX(int);
|
||||
void moveY(int);
|
||||
void moveZ(int);
|
||||
|
||||
public slots :
|
||||
void startPauseVideo();
|
||||
|
||||
private slots :
|
||||
void actionMouseRotate();
|
||||
void actionMouseMove();
|
||||
void actionMousePick();
|
||||
void actionDrawingWireframe();
|
||||
void actionDrawingLineRemoval();
|
||||
void actionDrawingSurfaceRemoval();
|
||||
void actionDrawingLineSurfaceRemoval();
|
||||
void actionControlPanels();
|
||||
void actionExitG4();
|
||||
void actionCreateEPS();
|
||||
void actionSaveImage();
|
||||
void actionMovieParameters();
|
||||
|
||||
void showShortcuts();
|
||||
void toggleDrawingAction(int);
|
||||
void toggleMouseAction(bool);
|
||||
void toggleMouseAction(mouseActions);
|
||||
void toggleRepresentation(bool);
|
||||
void toggleProjection(bool);
|
||||
void toggleBackground(bool);
|
||||
void toggleTransparency(bool);
|
||||
void toggleAntialiasing(bool);
|
||||
void toggleHaloing(bool);
|
||||
void toggleAux(bool);
|
||||
void toggleFullScreen(bool);
|
||||
|
||||
void dialogClosed();
|
||||
void processEncodeFinished();
|
||||
void processLookForFinished();
|
||||
void processEncodeStdout();
|
||||
// Only use for Qt>4.0
|
||||
// void dialogClosed();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.23 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLSceneHandler.hh,v 1.24 2008/01/04 22:07:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -57,7 +57,7 @@ class G4OpenGLSceneHandler: public G4VSceneHandler {
|
||||
public:
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives ();
|
||||
virtual void BeginPrimitives2D ();
|
||||
virtual void BeginPrimitives2D (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives2D ();
|
||||
void AddPrimitive (const G4Polyline&);
|
||||
void AddPrimitive (const G4Polymarker&);
|
||||
@@ -94,9 +94,12 @@ protected:
|
||||
const G4Polyhedron* CreateSectionPolyhedron ();
|
||||
const G4Polyhedron* CreateCutawayPolyhedron ();
|
||||
|
||||
void ClearAndDestroyAtts(); // Destroys att holders and clears pick map.
|
||||
|
||||
GLuint fPickName;
|
||||
std::map<GLuint, G4AttHolder*> fPickMap; // For picking.
|
||||
void ClearAndDestroyAtts(); // Destroys att holders and clears pick map.
|
||||
|
||||
G4bool fProcessing2D;
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.icc,v 1.7 2006/06/29 21:17:58 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLSceneHandler.icc,v 1.8 2008/01/30 10:54:13 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredQt.hh,v 1.1 2007/09/28 14:44:13 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredQt graphics system factory.
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredQtViewer.hh,v 1.3 2007/11/09 15:03:21 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLStoredQtViewer.hh,v 1.7 2008/11/06 13:43:44 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredQtViewer : a class derived from
|
||||
@@ -43,6 +43,7 @@
|
||||
#include <qgl.h> // include qglwidget
|
||||
|
||||
class QMouseEvent;
|
||||
class QWheelEvent;
|
||||
class QContextMenuEvent;
|
||||
|
||||
class G4OpenGLStoredSceneHandler;
|
||||
@@ -57,20 +58,23 @@ public:
|
||||
void Initialise ();
|
||||
void initializeGL ();
|
||||
void DrawView ();
|
||||
void FinishView ();
|
||||
void resizeGL(int width,int height);
|
||||
void paintGL();
|
||||
void updateQWidget();
|
||||
void ShowView ();
|
||||
|
||||
protected:
|
||||
void wheelEvent(QWheelEvent *event);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void mouseMoveEvent(QMouseEvent *event);
|
||||
void mouseDoubleClickEvent(QMouseEvent *event);
|
||||
void mouseReleaseEvent(QMouseEvent *event);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
void keyPressEvent (QKeyEvent * event);
|
||||
private:
|
||||
void ComputeView ();
|
||||
|
||||
private :
|
||||
bool hasToRepaint;
|
||||
bool readyToPaint;
|
||||
int nbPaint;
|
||||
// QImage glBufferImage;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.24 2007/04/04 16:50:26 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLStoredSceneHandler.hh,v 1.27 2008/04/28 16:19:40 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
virtual ~G4OpenGLStoredSceneHandler ();
|
||||
void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives ();
|
||||
void BeginPrimitives2D ();
|
||||
void BeginPrimitives2D (const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives2D ();
|
||||
void BeginModeling ();
|
||||
void EndModeling ();
|
||||
@@ -86,8 +86,7 @@ protected:
|
||||
// PODL = Persistent Object Display List.
|
||||
GLint fTopPODL; // List which calls the other PODLs.
|
||||
struct PO {
|
||||
PO(G4int id, const G4Transform3D& tr = G4Transform3D()):
|
||||
fDisplayListId(id), fTransform(tr), fPickName(0) {}
|
||||
PO(G4int id, const G4Transform3D& tr = G4Transform3D());
|
||||
G4int fDisplayListId;
|
||||
G4Transform3D fTransform;
|
||||
GLuint fPickName;
|
||||
@@ -96,9 +95,7 @@ protected:
|
||||
|
||||
// TO = Transparent Object.
|
||||
struct TO {
|
||||
TO(G4int id, const G4Transform3D& tr = G4Transform3D()):
|
||||
fDisplayListId(id), fTransform(tr), fPickName(0),
|
||||
fStartTime(-G4OPENGL_DBL_MAX), fEndTime(G4OPENGL_DBL_MAX) {}
|
||||
TO(G4int id, const G4Transform3D& tr = G4Transform3D());
|
||||
G4int fDisplayListId;
|
||||
G4Transform3D fTransform;
|
||||
GLuint fPickName;
|
||||
@@ -110,9 +107,6 @@ protected:
|
||||
// Stop-gap solution of structure re-use.
|
||||
// A proper implementation would use geometry hierarchy.
|
||||
std::map <const G4VSolid*, G4int, std::less <const G4VSolid*> > fSolidMap;
|
||||
|
||||
private:
|
||||
G4bool fProcessing2D;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredViewer.hh,v 1.9 2006/06/29 21:18:02 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32.hh,v 1.7 2006/06/29 21:18:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// OpenGLStoredWin32 graphics system factory.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredWin32Viewer.hh,v 1.7 2006/06/29 21:18:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Class G4OpenGLStoredWin32Viewer : a class derived from
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredX.hh,v 1.7 2006/06/29 21:18:08 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXViewer.hh,v 1.7 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXm.hh,v 1.6 2006/06/29 21:18:12 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLStoredXmViewer.hh,v 1.7 2006/07/03 16:38:13 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLTransform3D.hh,v 1.7 2006/06/29 21:18:16 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 24th October 1996
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.hh,v 1.21 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// $Id: G4OpenGLViewer.hh,v 1.23 2008/06/20 13:55:06 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -66,12 +66,16 @@ protected:
|
||||
void Pick(GLdouble x, GLdouble y);
|
||||
virtual void CreateFontLists () {}
|
||||
virtual void print();
|
||||
void rotateScene (G4double dx, G4double dy,G4double delta);
|
||||
//////////////////////////////Vectored PostScript production functions///
|
||||
void printBuffer(GLint, GLfloat*);
|
||||
GLfloat* spewPrimitiveEPS (FILE*, GLfloat*);
|
||||
void spewSortedFeedback (FILE*, GLint, GLfloat*);
|
||||
void spewWireframeEPS (FILE*, GLint, GLfloat*, const char*);
|
||||
void print3DcolorVertex(GLint, GLint*, GLfloat*);
|
||||
GLdouble getSceneNearWidth();
|
||||
GLdouble getSceneFarWidth();
|
||||
GLdouble getSceneDepth();
|
||||
G4float pointSize;
|
||||
char print_string[50];
|
||||
G4bool print_colour;
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewerMessenger.hh,v 1.5 2007/05/08 11:04:11 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#ifndef G4OPENGLVIEWERMESSENGER_HH
|
||||
#define G4OPENGLVIEWERMESSENGER_HH
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLWin32Viewer.hh,v 1.14 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// G4OpenGLWin32Viewer : Class to provide WindowsNT specific
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXViewer.hh,v 1.28 2007/11/10 14:50:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 7th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmBox.hh,v 1.7 2006/06/29 21:18:24 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Box container class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFourArrowButtons.hh,v 1.6 2006/06/29 21:18:26 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Four arrow buttons class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmFramedBox.hh,v 1.7 2006/06/29 21:18:28 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Framed box container class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmPushButton.hh,v 1.7 2006/06/29 21:18:30 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Push button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmRadioButton.hh,v 1.7 2006/06/29 21:18:32 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Radio button class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmResources.hh,v 1.5 2006/06/29 21:18:34 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Default resources file for GEANT4 OpenGL Motif windows.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSeparator.hh,v 1.6 2006/06/29 21:18:36 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Separator class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmSliderBar.hh,v 1.7 2006/06/29 21:18:38 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Slider bar class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTextField.hh,v 1.7 2006/06/29 21:18:40 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Text field class. Inherits from G4OpenGLXmVWidgetComponent
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmTopLevelShell.hh,v 1.6 2006/06/29 21:18:42 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Top level shell class
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetComponent.hh,v 1.6 2006/06/29 21:18:44 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif component widgets
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetContainer.hh,v 1.6 2006/06/29 21:18:46 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif container widgets
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetObject.hh,v 1.6 2006/06/29 21:18:48 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Virtual base class for all Motif widgets.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmVWidgetShell.hh,v 1.6 2006/06/29 21:18:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
//Base class for all Motif window widgets (shells)
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewer.hh,v 1.10 2006/06/29 21:18:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 10th February 1997
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLXmViewerMessenger.hh,v 1.4 2006/06/29 21:18:54 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-01 $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
|
||||
|
||||
Reference in New Issue
Block a user