Import Geant4 10.3.0 source tree
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
// * acceptance of all terms of the Geant4 Software license. *
|
||||
// ********************************************************************
|
||||
//
|
||||
// $Id: G4OpenGL.hh 85263 2014-10-27 08:58:31Z gcosmo $
|
||||
// $Id: G4OpenGL.hh 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
//
|
||||
// G.Barrand.
|
||||
|
||||
@@ -40,12 +40,28 @@
|
||||
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLX_DRIVER
|
||||
# include <GL/gl.h>
|
||||
#endif
|
||||
#ifndef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
# include <GL/gl.h>
|
||||
#else
|
||||
#ifdef __MACH__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLXM_DRIVER
|
||||
# include <GL/gl.h>
|
||||
#endif
|
||||
#ifndef G4VIS_BUILD_OPENGLQT_DRIVER
|
||||
# include <GL/gl.h>
|
||||
#else
|
||||
#ifdef __MACH__
|
||||
#include <OpenGL/gl.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef G4VIS_BUILD_OPENGLWIN32_DRIVER
|
||||
# include <GL/gl.h>
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLQtViewer.hh 91686 2015-07-31 09:40:08Z gcosmo $
|
||||
// $Id: G4OpenGLQtViewer.hh 101105 2016-11-07 08:09:26Z gcosmo $
|
||||
//
|
||||
//
|
||||
// G4OpenGLQtViewer : Class to provide WindowsNT specific
|
||||
@@ -111,7 +111,9 @@ private:
|
||||
G4OpenGLQtViewer& operator= (const G4OpenGLQtViewer&);
|
||||
public:
|
||||
virtual void updateQWidget()=0;
|
||||
void updateSceneTreeComponentTreeWidgetInfos();
|
||||
void updateSceneTreeWidget();
|
||||
void updateViewerPropertiesTableWidget();
|
||||
void updatePickInfosWidget(int, int);
|
||||
QString setEncoderPath(QString path);
|
||||
QString getEncoderPath();
|
||||
QString setTempFolderPath(QString path);
|
||||
@@ -178,6 +180,7 @@ protected:
|
||||
// such as /vis/viewer/set/all and /vis/viewer/save...
|
||||
const std::vector<G4ModelingParameters::VisAttributesModifier>*
|
||||
GetPrivateVisAttributesModifiers() const;
|
||||
bool isCurrentWidget();
|
||||
|
||||
protected:
|
||||
QWidget* fGLWidget;
|
||||
@@ -190,6 +193,12 @@ protected:
|
||||
bool fQGLWidgetInitialiseCompleted;
|
||||
bool fPaintEventLock;
|
||||
|
||||
// Flag to indicate that action was initiated by interaction (mouse
|
||||
// click) on the scene tree. It is used and reset in
|
||||
// G4OpenGLStoredQtViewer::CompareForKernelVisit to prevent rebuild
|
||||
// in this case.
|
||||
bool fMouseOnSceneTree;
|
||||
|
||||
private:
|
||||
enum RECORDING_STEP {WAIT,START,PAUSE,CONTINUE,STOP,READY_TO_ENCODE,ENCODING,FAILED,SUCCESS,BAD_ENCODER,BAD_OUTPUT,BAD_TMP,SAVE};
|
||||
|
||||
@@ -213,8 +222,9 @@ private:
|
||||
int currentPVPOIndex);
|
||||
void setCheckComponent(QTreeWidgetItem* item,bool check);
|
||||
void createSceneTreeComponent();
|
||||
void createViewerPropertiesComponent();
|
||||
void createPickingComponent();
|
||||
void createSceneTreeWidget();
|
||||
void createViewerPropertiesWidget();
|
||||
void createPickInfosWidget();
|
||||
bool parseAndCheckVisibility(QTreeWidgetItem * treeNode,int POindex);
|
||||
QTreeWidgetItem* createTreeWidgetItem(const PVPath& fullPath,
|
||||
const QString& name,
|
||||
@@ -263,6 +273,7 @@ private:
|
||||
QPoint fLastPos1;
|
||||
QPoint fLastPos2;
|
||||
QPoint fLastPos3;
|
||||
QPoint fLastPickPoint;
|
||||
|
||||
// delta of depth move. This delta is put in % of the scene view
|
||||
G4double fDeltaDepth;
|
||||
@@ -301,31 +312,29 @@ private:
|
||||
int fNbMaxFramesPerSec;
|
||||
float fNbMaxAnglePerSec;
|
||||
int fLaunchSpinDelay;
|
||||
QTabWidget* fUISceneTreeComponentsTBWidget;
|
||||
QWidget* fUISceneTreeWidget;
|
||||
QWidget* fUIViewerPropertiesWidget;
|
||||
QWidget* fUIPickInfosWidget;
|
||||
bool fNoKeyPress;
|
||||
bool fAltKeyPress;
|
||||
bool fControlKeyPress;
|
||||
bool fShiftKeyPress;
|
||||
bool fBatchMode;
|
||||
bool fCheckSceneTreeComponentSignalLock;
|
||||
bool fViewerPropertiesTableWidgetIsInit;
|
||||
QTreeWidget* fSceneTreeComponentTreeWidget;
|
||||
// This is only use to hold the old "expand" value, see file:///Developer/Documentation/Qt/html/qtreewidgetitem.html#setExpanded
|
||||
QTreeWidget* fOldSceneTreeComponentTreeWidget;
|
||||
QWidget* fSceneTreeWidget;
|
||||
bool fPVRootNodeCreate;
|
||||
QLineEdit* fFilterOutput;
|
||||
QString fFileSavePath;
|
||||
QPushButton* fSceneTreeViewerButton;
|
||||
QPushButton* fViewerPropertiesButton;
|
||||
QPushButton* fViewerPickingButton;
|
||||
int fNbRotation ;
|
||||
int fTimeRotation;
|
||||
QString fTouchableVolumes;
|
||||
QDialog* fShortcutsDialog;
|
||||
QTableWidget *fSceneTreeComponentTreeWidgetInfos;
|
||||
QWidget* fSceneTreeComponentPickingInfos;
|
||||
QWidget* fSceneTreeViewerInfos;
|
||||
QScrollArea* fSceneTreeComponentPickingScrollArea;
|
||||
QTableWidget *fViewerPropertiesTableWidget;
|
||||
QWidget* fPickInfosWidget;
|
||||
QScrollArea* fPickInfosScrollArea;
|
||||
int fTreeWidgetInfosIgnoredCommands;
|
||||
QPushButton * fSceneTreeButtonApply;
|
||||
QTextEdit *fShortcutsDialogInfos;
|
||||
@@ -400,11 +409,9 @@ private Q_SLOTS :
|
||||
void processLookForFinished();
|
||||
void processEncodeStdout();
|
||||
void sceneTreeComponentItemChanged(QTreeWidgetItem* item, int id);
|
||||
void toggleSceneTreeViewerInfos();
|
||||
void toggleSceneTreeComponentTreeWidgetInfos();
|
||||
void toggleSceneTreeComponentPickingInfos();
|
||||
void toggleSceneTreeComponentPickingCout(int);
|
||||
void togglePicking();
|
||||
void currentTabActivated(int);
|
||||
|
||||
// action trigger by a click on a component scene tree
|
||||
void sceneTreeComponentSelected();
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.hh 96733 2016-05-02 11:52:48Z gcosmo $
|
||||
// $Id: G4OpenGLSceneHandler.hh 99440 2016-09-22 08:34:04Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -77,15 +77,33 @@ public:
|
||||
void AddSolid (const G4Torus&);
|
||||
void AddSolid (const G4Polycone&);
|
||||
void AddSolid (const G4Polyhedra&);
|
||||
void AddSolid (const G4Orb&);
|
||||
void AddSolid (const G4Ellipsoid&);
|
||||
void AddSolid (const G4VSolid&);
|
||||
void AddCompound (const G4VTrajectory&);
|
||||
void AddCompound (const G4VHit&);
|
||||
void AddCompound (const G4VDigi&);
|
||||
void AddCompound (const G4THitsMap<G4double>&);
|
||||
void AddCompound (const G4THitsMap<G4StatDouble>&);
|
||||
|
||||
static G4int GetEventsDrawInterval() {return fEventsDrawInterval;}
|
||||
static void SetEventsDrawInterval(G4int interval) {fEventsDrawInterval = interval;}
|
||||
|
||||
// enum for /vis/ogl/flushAt.
|
||||
enum FlushAction {
|
||||
endOfEvent,
|
||||
endOfRun,
|
||||
eachPrimitive,
|
||||
NthPrimitive,
|
||||
NthEvent,
|
||||
never
|
||||
};
|
||||
static G4int GetEntitiesFlushInterval()
|
||||
{return fEntitiesFlushInterval;}
|
||||
static FlushAction GetFlushAction()
|
||||
{return fFlushAction;}
|
||||
static void SetEntitiesFlushInterval(G4int interval)
|
||||
{fEntitiesFlushInterval = interval;}
|
||||
static void SetFlushAction(FlushAction action)
|
||||
{fFlushAction = action;}
|
||||
|
||||
#ifdef G4OPENGL_VERSION_2
|
||||
private :
|
||||
// vertex vector to be given to the graphic card
|
||||
@@ -148,10 +166,9 @@ protected:
|
||||
// Shared code to wait until we make a single glFlush
|
||||
void ScaledFlush () ;
|
||||
// Static so that they apply to all OGL scene handlers...
|
||||
// Number of events to wait until we make a single glFlush
|
||||
static G4int fEventsDrawInterval;
|
||||
// Number of events waiting to be flushed
|
||||
static G4int fEventsWaitingToBeFlushed;
|
||||
static FlushAction fFlushAction;
|
||||
// Number of entities between flushes
|
||||
static G4int fEntitiesFlushInterval;
|
||||
|
||||
// True if caller of primitives is capable of processing three passes.
|
||||
G4bool fThreePassCapable;
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLSceneHandler.icc 66373 2012-12-18 09:41:34Z gcosmo $
|
||||
// $Id: G4OpenGLSceneHandler.icc 99076 2016-09-01 12:40:47Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 20th January 1998
|
||||
@@ -69,6 +69,14 @@ inline void G4OpenGLSceneHandler::AddSolid (const G4Polyhedra& polyhedra) {
|
||||
G4VSceneHandler::AddSolid (polyhedra);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddSolid (const G4Orb& orb) {
|
||||
G4VSceneHandler::AddSolid (orb);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddSolid (const G4Ellipsoid& ellipsoid) {
|
||||
G4VSceneHandler::AddSolid (ellipsoid);
|
||||
}
|
||||
|
||||
inline void G4OpenGLSceneHandler::AddSolid (const G4VSolid& vsolid) {
|
||||
G4VSceneHandler::AddSolid (vsolid);
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewer.hh 87695 2014-12-17 09:35:24Z gcosmo $
|
||||
// $Id: G4OpenGLViewer.hh 101714 2016-11-22 08:53:13Z gcosmo $
|
||||
//
|
||||
//
|
||||
// Andrew Walkden 27th March 1996
|
||||
@@ -180,6 +180,8 @@ protected:
|
||||
void addExportImageFormat(std::string format);
|
||||
// add a image format to the available export format list
|
||||
G4bool isGl2psWriting();
|
||||
G4bool isFramebufferReady();
|
||||
|
||||
void g4GluPickMatrix(GLdouble x, GLdouble y, GLdouble width, GLdouble height,
|
||||
GLint viewport[4]);
|
||||
// MESA implementation of gluPickMatrix
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4OpenGLViewerMessenger.hh 82764 2014-07-08 14:24:04Z gcosmo $
|
||||
// $Id: G4OpenGLViewerMessenger.hh 99440 2016-09-22 08:34:04Z gcosmo $
|
||||
|
||||
#ifndef G4OPENGLVIEWERMESSENGER_HH
|
||||
#define G4OPENGLVIEWERMESSENGER_HH
|
||||
@@ -63,6 +63,7 @@ private:
|
||||
G4UIcommand* fpCommandEndTime;
|
||||
G4UIcmdWithAnInteger* fpCommandEventsDrawInterval;
|
||||
G4UIcmdWithADouble* fpCommandFade;
|
||||
G4UIcommand* fpCommandFlushAt;
|
||||
G4UIcmdWithAString* fpCommandPrintMode;
|
||||
G4UIcommand* fpCommandStartTime;
|
||||
G4UIcmdWithABool* fpCommandTransparency;
|
||||
|
||||
Reference in New Issue
Block a user