Import Geant4 11.1.0.beta source tree
This commit is contained in:
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
namespace tools {namespace Qt {class session;}}
|
||||
namespace toolx {namespace Qt {class session;}}
|
||||
|
||||
class G4ToolsSGQtGLES: public G4VGraphicsSystem {
|
||||
typedef G4VGraphicsSystem parent;
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
protected:
|
||||
void Initialise();
|
||||
protected:
|
||||
tools::Qt::session* fSGSession;
|
||||
toolx::Qt::session* fSGSession;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "G4UIQt.hh"
|
||||
#include "G4UImanager.hh"
|
||||
|
||||
#include <tools/Qt/sg_viewer>
|
||||
#include <toolx/Qt/sg_viewer>
|
||||
|
||||
#include <qmainwindow.h>
|
||||
|
||||
@@ -55,10 +55,10 @@ private:
|
||||
G4VViewer* fViewer;
|
||||
};
|
||||
|
||||
class G4ToolsSGQtViewer : public G4ToolsSGViewer<tools::Qt::session,tools::Qt::sg_viewer> {
|
||||
typedef G4ToolsSGViewer<tools::Qt::session,tools::Qt::sg_viewer> parent;
|
||||
class G4ToolsSGQtViewer : public G4ToolsSGViewer<toolx::Qt::session,toolx::Qt::sg_viewer> {
|
||||
typedef G4ToolsSGViewer<toolx::Qt::session,toolx::Qt::sg_viewer> parent;
|
||||
public:
|
||||
G4ToolsSGQtViewer(tools::Qt::session& a_session,G4ToolsSGSceneHandler& a_scene_handler, const G4String& a_name)
|
||||
G4ToolsSGQtViewer(toolx::Qt::session& a_session,G4ToolsSGSceneHandler& a_scene_handler, const G4String& a_name)
|
||||
:parent(a_session,a_scene_handler,a_name)
|
||||
,fSGQWidget(nullptr)
|
||||
,fDestroyCallback(0)
|
||||
@@ -76,12 +76,12 @@ public:
|
||||
if(fSGQWidget) return; //done.
|
||||
parent::Initialise();
|
||||
if(!fSGViewer) {
|
||||
G4cerr << "G4ToolsSGQtViewer::Initialise: ERROR: G4ToolsSGQtViewer has no tools::Qt::sg_viewer." << G4endl;
|
||||
G4cerr << "G4ToolsSGQtViewer::Initialise: ERROR: G4ToolsSGQtViewer has no toolx::Qt::sg_viewer." << G4endl;
|
||||
return;
|
||||
}
|
||||
fSGQWidget = fSGViewer->shell();
|
||||
if (!fSGQWidget) {
|
||||
G4cerr << "G4ToolsSGQtViewer::Initialise: ERROR: tools::Qt::sg_viewer has no QWidget shell." << G4endl;
|
||||
G4cerr << "G4ToolsSGQtViewer::Initialise: ERROR: toolx::Qt::sg_viewer has no QWidget shell." << G4endl;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -51,7 +51,10 @@ public:
|
||||
virtual void AddPrimitive(const G4Polymarker&);
|
||||
virtual void AddPrimitive(const G4Polyhedron&);
|
||||
virtual void AddPrimitive(const G4Plotter&);
|
||||
|
||||
|
||||
using G4VSceneHandler::AddCompound;
|
||||
virtual void AddCompound(const G4Mesh&);
|
||||
|
||||
virtual void ClearStore ();
|
||||
virtual void ClearTransientStore ();
|
||||
|
||||
|
||||
@@ -109,8 +109,8 @@ public: //tools::sg::device_interactor interface.
|
||||
const G4double scale = 500; // Empirically chosen
|
||||
fVP.MultiplyZoomFactor(1.+angleY/scale);
|
||||
} else { // Perspective projection
|
||||
const G4double scale = fVP.GetFieldHalfAngle()/(10.*CLHEP::deg); // Empirical
|
||||
fVP.SetDolly(fVP.GetDolly()+angleY/scale);
|
||||
const G4double delta = fSceneHandler.GetExtent().GetExtentRadius()/200.; // Empirical
|
||||
fVP.SetDolly(fVP.GetDolly()+angleY*delta);
|
||||
}
|
||||
SetView();
|
||||
DrawView();
|
||||
@@ -309,8 +309,13 @@ public:
|
||||
//
|
||||
// Also, strictly, there is no need to rebuid run-duration models (detector),
|
||||
// but a complete rebuild is the easiest way (already imeplemented).
|
||||
fNeedKernelVisit = true;
|
||||
DrawView(); // Draw trajectories, etc., from kept events
|
||||
//
|
||||
// Only do this if there are end-of-event models (e.g., trajectories) that
|
||||
// may require it.
|
||||
if (fSceneHandler.GetScene()->GetEndOfEventModelList().size()) {
|
||||
fNeedKernelVisit = true;
|
||||
DrawView(); // Draw trajectories, etc., from kept events
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -463,8 +468,8 @@ protected:
|
||||
}
|
||||
public:
|
||||
virtual void SetNewValue(G4UIcommand* a_cmd,G4String a_value) {
|
||||
G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
|
||||
G4VViewer* viewer = fpVisManager -> GetCurrentViewer ();
|
||||
G4VisManager::Verbosity verbosity = GetVisManager()->GetVerbosity();
|
||||
G4VViewer* viewer = GetVisManager()->GetCurrentViewer();
|
||||
if (!viewer) {
|
||||
if (verbosity >= G4VisManager::errors) G4cerr << "ERROR: No current viewer." << G4endl;
|
||||
return;
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
namespace tools {namespace Windows {class session;}}
|
||||
namespace toolx {namespace Windows {class session;}}
|
||||
|
||||
class G4ToolsSGWindowsGLES: public G4VGraphicsSystem {
|
||||
typedef G4VGraphicsSystem parent;
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
protected:
|
||||
void Initialise();
|
||||
protected:
|
||||
tools::Windows::session* fSGSession;
|
||||
toolx::Windows::session* fSGSession;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
namespace tools {namespace X11 {class session;}}
|
||||
namespace toolx {namespace X11 {class session;}}
|
||||
|
||||
class G4ToolsSGX11GLES: public G4VGraphicsSystem {
|
||||
typedef G4VGraphicsSystem parent;
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
protected:
|
||||
void Initialise();
|
||||
protected:
|
||||
tools::X11::session* fSGSession;
|
||||
toolx::X11::session* fSGSession;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
namespace tools {namespace Xt {class session;}}
|
||||
namespace toolx {namespace Xt {class session;}}
|
||||
|
||||
class G4ToolsSGXtGLES: public G4VGraphicsSystem {
|
||||
typedef G4VGraphicsSystem parent;
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
protected:
|
||||
void Initialise();
|
||||
protected:
|
||||
tools::Xt::session* fSGSession;
|
||||
toolx::Xt::session* fSGSession;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user