Import Geant4 10.2.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-10 14:11:04 +02:00
parent c9b32a6c0a
commit d4af681f38
4886 changed files with 420149 additions and 1023309 deletions
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLImmediateXm.hh 66373 2012-12-18 09:41:34Z gcosmo $
// $Id: G4OpenGLImmediateXm.hh 91686 2015-07-31 09:40:08Z gcosmo $
//
//
// Andrew Walkden 10th February 1997
@@ -33,9 +33,9 @@
#ifndef G4OPENGLIMMEDIATEXM_HH
#define G4OPENGLIMMEDIATEXM_HH
#include "G4VGraphicsSystem.hh"
#include "G4OpenGLXm.hh"
class G4OpenGLImmediateXm: public G4VGraphicsSystem {
class G4OpenGLImmediateXm: public G4OpenGLXm {
public:
G4OpenGLImmediateXm ();
virtual ~G4OpenGLImmediateXm ();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLQtViewer.hh 86360 2014-11-10 08:34:16Z gcosmo $
// $Id: G4OpenGLQtViewer.hh 91686 2015-07-31 09:40:08Z gcosmo $
//
//
// G4OpenGLQtViewer : Class to provide WindowsNT specific
@@ -91,8 +91,19 @@ public:
G4OpenGLQtViewer (G4OpenGLSceneHandler& scene);
virtual ~G4OpenGLQtViewer ();
#ifdef G4MULTITHREADED
void SwitchToVisSubThread();
void SwitchToMasterThread();
// In MT mode these functions are called in the following order for each run:
// Called on the master thread before starting the vis sub-thread.
virtual void DoneWithMasterThread ();
// Called on the master thread after starting the vis sub-thread.
virtual void MovingToVisSubThread ();
// Called on the vis sub-thread when waiting for events.
virtual void SwitchToVisSubThread ();
// Called on the vis sub-thread when all events have been processed.
virtual void DoneWithVisSubThread ();
// Called on the vis sub-thread when all events have been processed.
// virtual void MovingToMasterThread (); Not used in G4OpenGLQtViewer.
// Called on the master thread after the vis sub-thread has terminated.
virtual void SwitchToMasterThread ();
#endif
private:
@@ -201,9 +212,9 @@ private:
unsigned int currentIndex,
int currentPVPOIndex);
void setCheckComponent(QTreeWidgetItem* item,bool check);
void initSceneTreeComponent();
void initViewerPropertiesComponent();
void initPickingComponent();
void createSceneTreeComponent();
void createViewerPropertiesComponent();
void createPickingComponent();
bool parseAndCheckVisibility(QTreeWidgetItem * treeNode,int POindex);
QTreeWidgetItem* createTreeWidgetItem(const PVPath& fullPath,
const QString& name,
@@ -239,6 +250,15 @@ private:
QString GetCommandParameterList (const G4UIcommand *aCommand);
void changeColorAndTransparency(GLuint index, G4Color color);
#ifdef G4MULTITHREADED
inline void SetQGLContextVisSubThread(QThread *th) {
fQGLContextVisSubThread = th;
}
inline void SetQGLContextMainThread(QThread *th) {
fQGLContextMainThread = th;
}
#endif
QMenu *fContextMenu;
QPoint fLastPos1;
QPoint fLastPos2;
@@ -348,6 +368,11 @@ private:
GLuint fLastHighlightName;
bool fIsDeleting;
#ifdef G4MULTITHREADED
QThread* fQGLContextVisSubThread;
QThread* fQGLContextMainThread;
#endif
public Q_SLOTS :
void startPauseVideo();
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredViewer.hh 85263 2014-10-27 08:58:31Z gcosmo $
// $Id: G4OpenGLStoredViewer.hh 91268 2015-06-29 07:04:24Z gcosmo $
//
//
// Andrew Walkden 7th February 1997
@@ -61,7 +61,7 @@ protected:
virtual G4bool POSelected(size_t) {return true;}
virtual G4bool TOSelected(size_t) {return true;}
bool fDepthTestEnable;
G4bool fDepthTestEnable;
G4Colour fOldDisplayListColor;
};
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLStoredXm.hh 66373 2012-12-18 09:41:34Z gcosmo $
// $Id: G4OpenGLStoredXm.hh 91686 2015-07-31 09:40:08Z gcosmo $
//
//
// Andrew Walkden 10th February 1997
@@ -33,9 +33,9 @@
#ifndef G4OPENGLSTOREDXM_HH
#define G4OPENGLSTOREDXM_HH
#include "G4VGraphicsSystem.hh"
#include "G4OpenGLXm.hh"
class G4OpenGLStoredXm: public G4VGraphicsSystem {
class G4OpenGLStoredXm: public G4OpenGLXm {
public:
G4OpenGLStoredXm ();
G4VSceneHandler* CreateSceneHandler (const G4String& name = "");
@@ -37,8 +37,6 @@
#ifdef G4OPENGL_VERSION_2
#define G4DEBUG_VIS_OGL 1
// GL2PS
#define GL2PS_TEXT_B 4
#define GL2PS_TEXT_BL 5
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLViewer.hh 86360 2014-11-10 08:34:16Z gcosmo $
// $Id: G4OpenGLViewer.hh 87695 2014-12-17 09:35:24Z gcosmo $
//
//
// Andrew Walkden 27th March 1996
@@ -189,6 +189,14 @@ protected:
centerz,
GLdouble upx, GLdouble upy, GLdouble upz );
// MESA implementation of gluLookAt
void g4GlOrtho (GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top,
GLdouble near, GLdouble far);
// Redefinition on glOrtho to solve precision issues
void g4GlFrustum (GLdouble left, GLdouble right,
GLdouble bottom, GLdouble top,
GLdouble near, GLdouble far);
// Redefinition on glFrustum to solve precision issues
G4bool fPrintColour;
G4bool fVectoredPs;
@@ -24,7 +24,7 @@
// ********************************************************************
//
//
// $Id: G4OpenGLXViewer.hh 66373 2012-12-18 09:41:34Z gcosmo $
// $Id: G4OpenGLXViewer.hh 87695 2014-12-17 09:35:24Z gcosmo $
//
//
// Andrew Walkden 7th February 1997
@@ -57,6 +57,10 @@ public:
virtual ~G4OpenGLXViewer ();
void SetView ();
void ShowView ();
#ifdef G4MULTITHREADED
void SwitchToVisSubThread();
void SwitchToMasterThread();
#endif
void DrawText(const G4Text&);
protected:
@@ -80,7 +84,10 @@ protected:
Colormap cmap;
XSetWindowAttributes swa;
GLXDrawable win;
GLXContext cx;
GLXContext cxMaster;
#ifdef G4MULTITHREADED
GLXContext cxVisSubThread;
#endif
XEvent event;
G4int *attributeList,
errorBase,
@@ -0,0 +1,46 @@
//
// ********************************************************************
// * 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:$
//
// John Allison 16th July 2015
// Base class for OpenGLImmediate/StoredXm graphics system factories.
#ifndef G4OPENGLXM_HH
#define G4OPENGLXM_HH
#include "G4VGraphicsSystem.hh"
class G4OpenGLXm: public G4VGraphicsSystem {
public:
G4OpenGLXm (const G4String& name,
const G4String& nickname,
const G4String& description,
Functionality f);
G4bool IsUISessionCompatible () const;
};
#endif