Import Geant4 9.3.0 source tree
This commit is contained in:
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scene.hh,v 1.18 2006/11/14 14:59:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Scene.hh,v 1.19 2009/11/04 12:49:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// Scene John Allison 19th July 1996.
|
||||
@@ -79,6 +79,10 @@ public: // With description
|
||||
// Contains models which are described at the end of event when the
|
||||
// scene is current.
|
||||
|
||||
const std::vector<G4VModel*>& GetEndOfRunModelList () const;
|
||||
// Contains models which are described at the end of event when the
|
||||
// scene is current.
|
||||
|
||||
const G4VisExtent& GetExtent () const;
|
||||
// Overall extent of all objects in the scene.
|
||||
|
||||
@@ -124,12 +128,21 @@ public: // With description
|
||||
// Returns false if model is already in the list.
|
||||
// Prints warnings if warn is true.
|
||||
|
||||
G4bool AddEndOfRunModel (G4VModel*, G4bool warn = false);
|
||||
// Adds models of type which are described at the end of run when
|
||||
// the scene is current.
|
||||
// Returns false if model is already in the list.
|
||||
// Prints warnings if warn is true.
|
||||
|
||||
std::vector<G4VModel*>& SetRunDurationModelList ();
|
||||
// Allows you to change the model list - do with care!
|
||||
|
||||
std::vector<G4VModel*>& SetEndOfEventModelList ();
|
||||
// Allows you to change the model list - do with care!
|
||||
|
||||
std::vector<G4VModel*>& SetEndOfRunModelList ();
|
||||
// Allows you to change the model list - do with care!
|
||||
|
||||
void SetRefreshAtEndOfEvent(G4bool);
|
||||
// If set true, the visualization manager will request viewer to
|
||||
// refresh "transient" objects, such as hits, at end of event.
|
||||
@@ -157,6 +170,7 @@ private:
|
||||
G4String fName;
|
||||
std::vector<G4VModel*> fRunDurationModelList;
|
||||
std::vector<G4VModel*> fEndOfEventModelList;
|
||||
std::vector<G4VModel*> fEndOfRunModelList;
|
||||
G4VisExtent fExtent;
|
||||
G4Point3D fStandardTargetPoint;
|
||||
G4bool fRefreshAtEndOfEvent;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4Scene.icc,v 1.14 2006/11/14 14:59:54 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4Scene.icc,v 1.15 2009/11/04 12:49:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// Scene data John Allison 19th July 1996.
|
||||
@@ -52,6 +52,11 @@ G4Scene::GetEndOfEventModelList () const {
|
||||
return fEndOfEventModelList;
|
||||
}
|
||||
|
||||
inline const std::vector<G4VModel*>&
|
||||
G4Scene::GetEndOfRunModelList () const {
|
||||
return fEndOfRunModelList;
|
||||
}
|
||||
|
||||
inline const G4VisExtent& G4Scene::GetExtent () const {
|
||||
return fExtent;
|
||||
}
|
||||
@@ -79,7 +84,12 @@ inline std::vector<G4VModel*>& G4Scene::SetRunDurationModelList ()
|
||||
|
||||
inline std::vector<G4VModel*>& G4Scene::SetEndOfEventModelList ()
|
||||
{
|
||||
return fRunDurationModelList;
|
||||
return fEndOfEventModelList;
|
||||
}
|
||||
|
||||
inline std::vector<G4VModel*>& G4Scene::SetEndOfRunModelList ()
|
||||
{
|
||||
return fEndOfRunModelList;
|
||||
}
|
||||
|
||||
inline void G4Scene::SetRefreshAtEndOfEvent(G4bool refresh) {
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VSceneHandler.hh,v 1.40 2008/01/04 22:03:45 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VSceneHandler.hh,v 1.42 2009/11/04 12:55:33 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996.
|
||||
@@ -41,11 +41,10 @@
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include <stack>
|
||||
|
||||
#include "G4VGraphicsScene.hh"
|
||||
#include "G4ViewerList.hh"
|
||||
#include "G4ViewParameters.hh"
|
||||
#include "G4THitsMap.hh"
|
||||
|
||||
class G4Scene;
|
||||
class G4VViewer;
|
||||
@@ -129,6 +128,7 @@ public: // With description
|
||||
|
||||
virtual void AddCompound (const G4VTrajectory&);
|
||||
virtual void AddCompound (const G4VHit&);
|
||||
virtual void AddCompound (const G4THitsMap<G4double>&);
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Functions for adding primitives.
|
||||
@@ -269,6 +269,9 @@ public: // With description
|
||||
// Checks scene's end-of-event model list and draws trajectories,
|
||||
// hits, etc.
|
||||
|
||||
void DrawEndOfRunModels();
|
||||
// Draws end-of-run models.
|
||||
|
||||
//////////////////////////////////////////////////////////////
|
||||
// Administration functions.
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.hh,v 1.28 2008/04/28 16:14:12 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ViewParameters.hh,v 1.30 2009/01/21 16:59:22 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 19th July 1996
|
||||
@@ -153,11 +153,25 @@ public: // With description
|
||||
G4double GetGlobalMarkerScale () const;
|
||||
G4double GetGlobalLineWidthScale () const;
|
||||
G4bool IsMarkerNotHidden () const;
|
||||
G4int GetWindowSizeHintX () const;
|
||||
G4int GetWindowSizeHintY () const;
|
||||
unsigned int GetWindowSizeHintX () const;
|
||||
unsigned int GetWindowSizeHintY () const;
|
||||
G4int GetWindowAbsoluteLocationHintX (G4int) const;
|
||||
G4int GetWindowAbsoluteLocationHintY (G4int) const;
|
||||
G4int GetWindowLocationHintX () const;
|
||||
G4int GetWindowLocationHintY () const;
|
||||
const G4String& GetXGeometryString () const;
|
||||
// If non-null, can be interpreted with XParseGeometry (see man
|
||||
// pages). Supercedes GetWindowSizeHintX/Y.
|
||||
// GetXGeometryString is intended to be parsed by XParseGeometry.
|
||||
// It contains the size information, as in GetWindowSizeHint, but
|
||||
// may also contain the window position, e.g., "600x600-0+200. The
|
||||
// viewer should use this in preference to GetWindowSizeHint, since
|
||||
// it contains more information. (The size information in
|
||||
// GetXGeometryString and GetWindowSizeHint is guaranteed to be
|
||||
// identical.)
|
||||
bool IsWindowSizeHintX () const;
|
||||
bool IsWindowSizeHintY () const;
|
||||
bool IsWindowLocationHintX () const;
|
||||
bool IsWindowLocationHintY () const;
|
||||
|
||||
G4bool IsAutoRefresh () const;
|
||||
const G4Colour& GetBackgroundColour () const;
|
||||
G4bool IsPicking () const;
|
||||
@@ -221,6 +235,7 @@ public: // With description
|
||||
void SetMarkerHidden ();
|
||||
void SetMarkerNotHidden ();
|
||||
void SetWindowSizeHint (G4int xHint, G4int yHint);
|
||||
void SetWindowLocationHint (G4int xHint, G4int yHint);
|
||||
void SetXGeometryString (const G4String&);
|
||||
void SetAutoRefresh (G4bool);
|
||||
void SetBackgroundColour (const G4Colour&);
|
||||
@@ -229,6 +244,18 @@ public: // With description
|
||||
void PrintDifferences (const G4ViewParameters& v) const;
|
||||
|
||||
private:
|
||||
G4int ParseGeometry ( const char *string, G4int *x, G4int *y, unsigned int *width, unsigned int *height);
|
||||
G4int ReadInteger(char *string, char **NextString);
|
||||
|
||||
G4int fNoValue;
|
||||
G4int fXValue; // XValue set for XGeometry
|
||||
G4int fYValue; // YValue set for XGeometry
|
||||
G4int fWidthValue; // WidthValue set for XGeometry
|
||||
G4int fHeightValue; // HeightValue set for XGeometry
|
||||
G4int fAllValues; // AllValues are set for XGeometry
|
||||
G4int fXNegative; // XValue is from left for XGeometry
|
||||
G4int fYNegative; // YValue is from top for XGeometry
|
||||
G4int fGeometryMask; // Mask for ParseGeometry
|
||||
|
||||
DrawingStyle fDrawingStyle; // Drawing style.
|
||||
G4bool fAuxEdgeVisible; // Auxiliary edge visibility.
|
||||
@@ -269,6 +296,10 @@ private:
|
||||
// removed.
|
||||
G4int fWindowSizeHintX; // Size hints for pixel-based window systems.
|
||||
G4int fWindowSizeHintY;
|
||||
G4int fWindowLocationHintX; // Location hints for pixel-based window systems.
|
||||
G4int fWindowLocationHintY;
|
||||
G4bool fWindowLocationHintXNegative; // Reference of location hints for pixel-based window systems.
|
||||
G4bool fWindowLocationHintYNegative;
|
||||
G4String fXGeometryString; // If non-null, geometry string for X Windows.
|
||||
G4bool fAutoRefresh; // ...after change of view parameters.
|
||||
G4Colour fBackgroundColour;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4ViewParameters.icc,v 1.16 2007/04/03 13:33:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4ViewParameters.icc,v 1.18 2009/01/21 16:59:22 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 20th October 1996
|
||||
@@ -161,14 +161,38 @@ inline G4bool G4ViewParameters::IsMarkerNotHidden () const {
|
||||
return fMarkerNotHidden;
|
||||
}
|
||||
|
||||
inline G4int G4ViewParameters::GetWindowSizeHintX () const {
|
||||
inline bool G4ViewParameters::IsWindowSizeHintX () const {
|
||||
return (fGeometryMask & fWidthValue);
|
||||
}
|
||||
|
||||
inline bool G4ViewParameters::IsWindowSizeHintY () const {
|
||||
return (fGeometryMask & fHeightValue);
|
||||
}
|
||||
|
||||
inline bool G4ViewParameters::IsWindowLocationHintX () const {
|
||||
return (fGeometryMask & fXValue);
|
||||
}
|
||||
|
||||
inline bool G4ViewParameters::IsWindowLocationHintY () const {
|
||||
return (fGeometryMask & fYValue);
|
||||
}
|
||||
|
||||
inline unsigned int G4ViewParameters::GetWindowSizeHintX () const {
|
||||
return fWindowSizeHintX;
|
||||
}
|
||||
|
||||
inline G4int G4ViewParameters::GetWindowSizeHintY () const {
|
||||
inline unsigned int G4ViewParameters::GetWindowSizeHintY () const {
|
||||
return fWindowSizeHintY;
|
||||
}
|
||||
|
||||
inline G4int G4ViewParameters::GetWindowLocationHintX () const {
|
||||
return fWindowLocationHintX;
|
||||
}
|
||||
|
||||
inline G4int G4ViewParameters::GetWindowLocationHintY () const {
|
||||
return fWindowLocationHintY;
|
||||
}
|
||||
|
||||
inline const G4String& G4ViewParameters::GetXGeometryString () const {
|
||||
return fXGeometryString;
|
||||
}
|
||||
@@ -327,8 +351,9 @@ inline void G4ViewParameters::SetWindowSizeHint (G4int xHint, G4int yHint) {
|
||||
fWindowSizeHintY = yHint;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetXGeometryString (const G4String& geomString) {
|
||||
fXGeometryString = geomString;
|
||||
inline void G4ViewParameters::SetWindowLocationHint (G4int xHint, G4int yHint) {
|
||||
fWindowLocationHintX = xHint;
|
||||
fWindowLocationHintY = yHint;
|
||||
}
|
||||
|
||||
inline void G4ViewParameters::SetAutoRefresh (G4bool state) {
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommands.hh,v 1.7 2007/01/11 16:39:33 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisCommands.hh,v 1.8 2009/03/09 12:42:00 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
// /vis/ top level commands - John Allison 5th February 2001
|
||||
|
||||
@@ -63,6 +63,17 @@ private:
|
||||
G4UIcmdWithoutParameter* fpCommand1;
|
||||
};
|
||||
|
||||
class G4VisCommandInitialize: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandInitialize ();
|
||||
virtual ~G4VisCommandInitialize ();
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandInitialize (const G4VisCommandInitialize&);
|
||||
G4VisCommandInitialize& operator = (const G4VisCommandInitialize&);
|
||||
G4UIcmdWithoutParameter* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandList: public G4VVisCommand {
|
||||
public:
|
||||
G4VisCommandList ();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsSceneAdd.hh,v 1.17 2006/11/01 10:50:28 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisCommandsSceneAdd.hh,v 1.19 2009/11/04 13:15:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
// /vis/scene commands - John Allison 9th August 1998
|
||||
|
||||
@@ -132,6 +132,18 @@ private:
|
||||
G4UIcommand* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandSceneAddPSHits: public G4VVisCommandScene {
|
||||
public:
|
||||
G4VisCommandSceneAddPSHits ();
|
||||
virtual ~G4VisCommandSceneAddPSHits ();
|
||||
G4String GetCurrentValue (G4UIcommand* command);
|
||||
void SetNewValue (G4UIcommand* command, G4String newValue);
|
||||
private:
|
||||
G4VisCommandSceneAddPSHits (const G4VisCommandSceneAddPSHits&);
|
||||
G4VisCommandSceneAddPSHits& operator = (const G4VisCommandSceneAddPSHits&);
|
||||
G4UIcmdWithAString* fpCommand;
|
||||
};
|
||||
|
||||
class G4VisCommandSceneAddScale: public G4VVisCommandScene {
|
||||
public:
|
||||
G4VisCommandSceneAddScale ();
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisCommandsViewerSet.hh,v 1.22 2007/04/03 13:33:16 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisCommandsViewerSet.hh,v 1.23 2009/05/13 18:17:25 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
|
||||
// /vis/viewer/set commands - John Allison 16th May 2000
|
||||
|
||||
@@ -41,6 +41,7 @@ class G4UIcmdWithAString;
|
||||
class G4UIcmdWithABool;
|
||||
class G4UIcmdWithAnInteger;
|
||||
class G4UIcmdWithADouble;
|
||||
class G4UIcmdWith3VectorAndUnit;
|
||||
|
||||
class G4VisCommandsViewerSet: public G4VVisCommandViewer {
|
||||
public:
|
||||
@@ -72,6 +73,7 @@ private:
|
||||
G4UIcommand* fpCommandProjection;
|
||||
G4UIcommand* fpCommandSectionPlane;
|
||||
G4UIcmdWithAString* fpCommandStyle;
|
||||
G4UIcmdWith3VectorAndUnit* fpCommandTargetPoint;
|
||||
G4UIcommand* fpCommandUpThetaPhi;
|
||||
G4UIcommand* fpCommandUpVector;
|
||||
G4ThreeVector fUpVector;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExecutive.hh,v 1.6 2006/06/29 21:28:50 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisExecutive.hh,v 1.9 2009/11/17 15:34:06 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 2nd February 2005 (based on MyVisManager, 24th January 1998).
|
||||
@@ -40,10 +40,12 @@
|
||||
// name are set.
|
||||
//
|
||||
// Include this file and write code to instantiate G4VisExecutive just
|
||||
// once as beginning of operations. Before you compile, set
|
||||
// appropriate environment variables. If you change your environment
|
||||
// you must force recompilation (the make files will not detect the
|
||||
// need to do this). Typically, your main program file will contain:
|
||||
// once at beginning of operations. Before you compile, set
|
||||
// appropriate environment variables (usually using "./Configure").
|
||||
// If you change your environment you must force recompilation (the
|
||||
// make files will not detect the need to do this).
|
||||
//
|
||||
// Typically, your main program file will contain:
|
||||
//
|
||||
// #ifdef G4VIS_USE
|
||||
// #include "G4VisExecutive.hh"
|
||||
@@ -53,10 +55,10 @@
|
||||
// ...
|
||||
// #ifdef G4VIS_USE
|
||||
// // Instantiate and initialise Visualization Manager.
|
||||
// G4VisManager* visManager = new G4VisExecutive;
|
||||
// // visManager -> SetVerboseLevel (verbosityString);
|
||||
// // visManager -> RegisterGraphicsSystem (new G4XXX);
|
||||
// visManager -> Initialize ();
|
||||
// G4VisManager* visManager = new G4VisExecutive; // See Nore (a).
|
||||
// visManager -> SetVerboseLevel (verbosityString); // See Note (b).
|
||||
// visManager -> RegisterGraphicsSystem (new myGS); // See Note (c).
|
||||
// visManager -> Initialize (); // See Note (d).
|
||||
// #endif
|
||||
// ...
|
||||
// #ifdef G4VIS_USE
|
||||
@@ -65,22 +67,47 @@
|
||||
// G4cout << "Vis manager deleted." << G4endl;
|
||||
// #endif
|
||||
//
|
||||
// The implementation is included as an .icc file because - for those
|
||||
// graphics systems that need external libraries - only those
|
||||
// systems that have been selected by the flags may be instantiated
|
||||
// without causing unresolved references (only the user knows which
|
||||
// libraries are available on his/her computer). It also ensures
|
||||
// that libraries can be linked in the right order, without circular
|
||||
// dependencies. (Note that some graphics systems, notable those
|
||||
// that write files for off-line viewing, do not suffer these
|
||||
// restrictions and are always registered.) Additional graphics
|
||||
// systems, XXX say, can be individually registered before
|
||||
// invocation of Initialise() with RegisterGraphicsSystem(new XXX).
|
||||
// Notes:
|
||||
// (a) After instantiation, all references to this object should be as
|
||||
// a G4VisManager. The functions RegisterGraphicsSystems and
|
||||
// RegisterModelFactories defined in G4VisExecutive.icc are
|
||||
// virtual functions of G4VisManager. They are invoked by
|
||||
// G4VisManager::Initialise. If you need to initialise in a
|
||||
// separate file, see advice below.
|
||||
// (b) The verbosityString ("quiet", "errors", "warnings",
|
||||
// "confirmations", etc. - "help /vis/verbose" to see options) can be
|
||||
// set here or with /vis/verbose.
|
||||
// (c) You can register your own graphics system like this.
|
||||
// (d) Your can intialise like this with C++ code or use /vis/initialize.
|
||||
//
|
||||
// Alternatively, you can implement an empty function here and just
|
||||
// register the systems you want in your main(), e.g.:
|
||||
// G4VisManager* visManager = new G4VisExecutive;
|
||||
// visManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
|
||||
// If you need to perform the instantiation and the initialisation in
|
||||
// separate files, e.g., to establish the verbosity before
|
||||
// initialisation, then the code that initialises must have access, of
|
||||
// course, to the G4VisExecutive object, but this should be as a
|
||||
// G4VisManager object, i.e., #include "G4VisManager.hh".
|
||||
// RegisterGraphicsSystems and RegisterModelFactories are (pure)
|
||||
// virtual methods of G4VisManager called from G4VisManager::Initialize.
|
||||
// First file:
|
||||
// #include "G4VisExecutive.hh"
|
||||
// ...
|
||||
// fpVisManager = new G4VisExecutive;
|
||||
// where fpVisManager is a G4VisManager*.
|
||||
// Second file:
|
||||
// #include "G4VisManager.hh"
|
||||
// ...
|
||||
// fpVisManager -> Initialize ();
|
||||
// where there is some mechanism for getting access to the pointer
|
||||
// fpVisManager.
|
||||
//
|
||||
// The implementation is included as an .icc file because - for those
|
||||
// graphics systems that need external libraries - only those systems
|
||||
// that have been selected by the flags may be instantiated without
|
||||
// causing unresolved references (only the user knows which libraries
|
||||
// are available on his/her computer). It also ensures that libraries
|
||||
// can be linked in the right order, without circular dependencies.
|
||||
// (Note that some graphics systems, notable those that write files
|
||||
// for off-line viewing, do not suffer these restrictions and are
|
||||
// always registered.)
|
||||
//
|
||||
// See class description of G4VisManager for more details.
|
||||
|
||||
@@ -93,7 +120,7 @@ class G4VisExecutive: public G4VisManager {
|
||||
|
||||
public: // With description
|
||||
|
||||
G4VisExecutive ();
|
||||
G4VisExecutive () {}
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisExecutive.icc,v 1.19 2008/01/29 22:35:29 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisExecutive.icc,v 1.22 2009/10/12 11:54:50 akimura Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// John Allison 24th January 1998.
|
||||
@@ -46,6 +46,7 @@
|
||||
#include "G4TrajectoryModelFactories.hh"
|
||||
#include "G4VRML1File.hh"
|
||||
#include "G4VRML2File.hh"
|
||||
#include "G4GMocrenFile.hh"
|
||||
|
||||
// Needing external packages or libraries...
|
||||
|
||||
@@ -90,9 +91,16 @@
|
||||
#include "G4VRML2.hh"
|
||||
#endif
|
||||
|
||||
G4VisExecutive::G4VisExecutive () {}
|
||||
|
||||
void G4VisExecutive::RegisterGraphicsSystems () {
|
||||
// The inline keyword prevents the compiler making an external
|
||||
// reference even though they cannot actually be inlined since they
|
||||
// are virtual functions. This prevents a "multiple definition" error
|
||||
// if it is included in more than one file. However, as explained in
|
||||
// the class description in G4VisExecutive.hh, it should never be
|
||||
// necessary to #include "G4VisExecutive.hh" in more than one file
|
||||
// since after instantiation the object can be treated as a
|
||||
// G4VisManager.
|
||||
inline void
|
||||
G4VisExecutive::RegisterGraphicsSystems () {
|
||||
|
||||
// Graphics Systems not needing external packages or libraries...
|
||||
RegisterGraphicsSystem (new G4ASCIITree);
|
||||
@@ -102,6 +110,7 @@ void G4VisExecutive::RegisterGraphicsSystems () {
|
||||
RegisterGraphicsSystem (new G4RayTracer);
|
||||
RegisterGraphicsSystem (new G4VRML1File);
|
||||
RegisterGraphicsSystem (new G4VRML2File);
|
||||
RegisterGraphicsSystem (new G4GMocrenFile);
|
||||
// Graphics systems needing external packages or libraries...
|
||||
|
||||
#ifdef G4VIS_USE_DAWN
|
||||
@@ -147,7 +156,8 @@ void G4VisExecutive::RegisterGraphicsSystems () {
|
||||
|
||||
}
|
||||
|
||||
void
|
||||
// See comments about inlining above.
|
||||
inline void
|
||||
G4VisExecutive::RegisterModelFactories()
|
||||
{
|
||||
// Trajectory draw models
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisManager.hh,v 1.68 2008/01/04 22:03:46 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisManager.hh,v 1.70 2009/02/25 18:28:00 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
|
||||
@@ -300,6 +300,11 @@ public: // With description
|
||||
void GeometryHasChanged ();
|
||||
// Used by run manager to notify change.
|
||||
|
||||
void NotifyHandlers();
|
||||
// Notify scene handlers (G4VGraphicsScene objects) that the scene
|
||||
// has changed so that they may rebuild their graphics database, if
|
||||
// any, and redraw all views.
|
||||
|
||||
void DispatchToModel(const G4VTrajectory&, G4int i_mode);
|
||||
// Draw the trajectory.
|
||||
|
||||
@@ -312,7 +317,7 @@ public: // With description
|
||||
void CreateSceneHandler (G4String name = "");
|
||||
// Creates scene handler for the current system.
|
||||
|
||||
void CreateViewer (G4String name = "");
|
||||
void CreateViewer (G4String name = "",G4String XGeometry = "");
|
||||
// Creates viewer for the current scene handler.
|
||||
|
||||
private:
|
||||
@@ -352,16 +357,6 @@ public: // With description
|
||||
const G4SceneHandlerList& GetAvailableSceneHandlers () const;
|
||||
const G4SceneList& GetSceneList () const;
|
||||
Verbosity GetVerbosity () const;
|
||||
void GetWindowSizeHint (G4int& xHint, G4int& yHint) const;
|
||||
// Note: GetWindowSizeHint information is returned via the G4int& arguments.
|
||||
const G4String& GetXGeometryString () const;
|
||||
// GetXGeometryString is intended to be parsed by XParseGeometry.
|
||||
// It contains the size information, as in GetWindowSizeHint, but
|
||||
// may also contain the window position, e.g., "600x600-0+200. The
|
||||
// viewer should use this in preference to GetWindowSizeHint, since
|
||||
// it contains more information. (The size information in
|
||||
// GetXGeometryString and GetWindowSizeHint is guaranteed to be
|
||||
// identical.)
|
||||
G4bool GetTransientsDrawnThisRun () const;
|
||||
G4bool GetTransientsDrawnThisEvent () const;
|
||||
const G4Event* GetRequestedEvent () const;
|
||||
@@ -379,8 +374,6 @@ public: // With description
|
||||
void SetVerboseLevel (G4int);
|
||||
void SetVerboseLevel (const G4String&);
|
||||
void SetVerboseLevel (Verbosity);
|
||||
void SetWindowSizeHint (G4int xHint, G4int yHint);
|
||||
void SetXGeometryString (const G4String&);
|
||||
void SetEventRefreshing (G4bool);
|
||||
void ResetTransientsDrawnFlags ();
|
||||
// If non-zero, requested event is used in G4VSceneHandler::ProcessScene.
|
||||
@@ -455,8 +448,6 @@ private:
|
||||
std::vector<G4UImessenger*> fMessengerList;
|
||||
std::vector<G4UIcommand*> fDirectoryList;
|
||||
G4VisStateDependent* fpStateDependent; // Friend state dependent class.
|
||||
G4int fWindowSizeHintX, fWindowSizeHintY; // For viewer...
|
||||
G4String fXGeometryString; // ...construction.
|
||||
G4TrajectoriesModel dummyTrajectoriesModel; // For passing drawing mode.
|
||||
G4bool fEventRefreshing;
|
||||
G4bool fTransientsDrawnThisRun;
|
||||
|
||||
@@ -24,8 +24,8 @@
|
||||
// ********************************************************************
|
||||
//
|
||||
//
|
||||
// $Id: G4VisManager.icc,v 1.20 2007/01/11 16:40:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-09-02 $
|
||||
// $Id: G4VisManager.icc,v 1.21 2009/01/13 09:55:15 lgarnier Exp $
|
||||
// GEANT4 tag $Name: geant4-09-03 $
|
||||
//
|
||||
//
|
||||
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
|
||||
@@ -72,14 +72,6 @@ inline G4VisManager::Verbosity G4VisManager::GetVerbosity () const {
|
||||
return fVerbosity;
|
||||
}
|
||||
|
||||
inline void G4VisManager::GetWindowSizeHint
|
||||
(G4int& xHint, G4int& yHint) const {
|
||||
xHint = fWindowSizeHintX; yHint = fWindowSizeHintY;
|
||||
}
|
||||
|
||||
inline const G4String& G4VisManager::GetXGeometryString () const {
|
||||
return fXGeometryString;
|
||||
}
|
||||
|
||||
inline G4bool G4VisManager::GetTransientsDrawnThisEvent() const {
|
||||
return fTransientsDrawnThisEvent;
|
||||
@@ -113,14 +105,6 @@ inline void G4VisManager::SetVerboseLevel (G4VisManager::Verbosity verbosity) {
|
||||
fVerbosity = verbosity;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetWindowSizeHint (G4int xHint, G4int yHint) {
|
||||
fWindowSizeHintX = xHint; fWindowSizeHintY = yHint;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetXGeometryString (const G4String& geomString) {
|
||||
fXGeometryString = geomString;
|
||||
}
|
||||
|
||||
inline void G4VisManager::SetEventRefreshing (G4bool eventRefreshing) {
|
||||
fEventRefreshing = eventRefreshing;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user