Import Geant4 1.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 15:28:20 +02:00
parent aaa409b6ee
commit ca1c8cb059
2995 changed files with 106830 additions and 299600 deletions
@@ -1,29 +1,41 @@
// This code implementation is the intellectual property of
// the RD44 GEANT4 collaboration.
// the GEANT4 collaboration.
//
// By copying, distributing or modifying the Program (or any work
// based on the Program) you indicate your acceptance of this statement,
// and all its terms.
//
// $Id: G4VisManager.hh,v 1.5 1999/02/07 17:32:15 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisManager.hh,v 1.9.2.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Class Description:
//
// The GEANT4 Visualization Manager - John Allison 02/Jan/1996.
// This is a "Singleton", i.e., only one instance may exist. A
// G4Exception is thrown if an attempt is made to instantiate more
// than one.
//
// G4VisManage is a "Singleton", i.e., only one instance of it or any
// derived class may exist. A G4Exception is thrown if an attempt is
// made to instantiate more than one.
//
// It is also an abstract class, so the user must derive his/her own
// class from G4VisManager, implement the pure virtual function
// RegisterGraphicsSystems, and instantiate an object of the derived
// class - for an example see
// visualization/include/MyVisManager.hh/cc.
//
// The recommended way for users to obtain a pointer to the vis
// manager is with G4VVisManager::GetConcreteInstance (), being always
// careful to test for non-zero. This pointer is non-zero only when
// (a) an object of the derived class exists and (b) when there is a
// valid viewer available.
//
// Graphics system registration is normally done through the protected
// pure virtual function RegisterGraphicsSystems called from
// Initialise (). You must define your own subclass and implement
// RegisterGraphicsSystems - for an example see
// visualization/include/MyVisManager.hh/cc. You can also use the
// public function RegisterGraphicsSystem (new MyGraphicsSystem) if
// you have your own graphics system.
// Initialise (). You can also use the public function
// RegisterGraphicsSystem (new MyGraphicsSystem) if you have your own
// graphics system.
//
// The VisManager creates graphics systems, scenes, scene handlers and
// viewers and manages them. You can have any number. It has the
// concept of a "current viewer", and the "current scene handler", the
@@ -31,16 +43,19 @@
// You can select the current viewer. Most of the the operations of
// the VisManager take place with the current viewer, in particular,
// the Draw operations.
//
// Each scene comprises drawable objects such as detector components
// and hits when appropriate. A scene handler translates a scene into
// graphics-system-specific function calls and, possibly, a
// graphics-system-dependent database - display lists, scene graphs,
// etc. Each viewer has its "view parameters".
// G4VisManager is "state dependent", i.e., it is notified on change
// of state (G4ApplicationState). This is used to draw hits and
// trajectories in the current scene at the end of event, as required.
// etc. Each viewer has its "view parameters" (see class description
// of G4ViewParameters for available parameters and also for a
// description of the concept of a "standard view" and all that).
//
// A friend class G4VisStateDependent is "state dependent", i.e., it
// is notified on change of state (G4ApplicationState). This is used
// to message the G4VisManager to draw hits and trajectories in the
// current scene at the end of event, as required.
#ifndef G4VISMANAGER_HH
#define G4VISMANAGER_HH
@@ -55,9 +70,8 @@
#include "G4ViewParameters.hh"
#include "G4Transform3D.hh"
#include "G4UImessenger.hh"
#include "G4VStateDependent.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4VisManMessenger;
class G4VPhysicalVolume;
@@ -74,9 +88,9 @@ class G4Polymarker;
class G4Polyhedron;
class G4NURBS;
class G4VisManager: public G4VVisManager, public G4VStateDependent {
class G4VisManager: public G4VVisManager {
// List of classes and functions which need access to private
// Friends - classes and functions which need access to private
// members of G4VisManager. This is mainly to obtain access to
// GetInstance (), which is private. The correct way for normal
// users to obtain a pointer to the vis manager is with
@@ -94,6 +108,8 @@ class G4VisManager: public G4VVisManager, public G4VStateDependent {
friend class ostream & operator <<
(class ostream &, const class G4VSceneHandler &);
friend class G4VisStateDependent;
// Now classes associated with the old commands...
friend class G4VisManMessenger;
friend class G4VisCommandCameraReset;
@@ -115,9 +131,13 @@ class G4VisManager: public G4VVisManager, public G4VStateDependent {
friend class G4VisCommandSetCullInvisible;
friend class G4VisCommandShowView;
public:
protected: // With description
G4VisManager ();
// The constructor is protected so that an object of the derived
// class may be constructed.
public: // With description
virtual ~G4VisManager ();
@@ -130,7 +150,7 @@ private:
// get a "higher level" pointer for general use - but always test
// for non-zero.
public:
public: // With description
void Initialise ();
void Initialize (); // Alias Initialise ().
@@ -189,11 +209,6 @@ public:
void Draw (const G4VPhysicalVolume&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
G4bool Notify (G4ApplicationState requestedState);
// This is called on change of state (G4ApplicationState). It is
// used to draw hits and trajectories if included in the current
// scene at the end of event, as required.
////////////////////////////////////////////////////////////////////////
// Administration routines.
@@ -218,12 +233,23 @@ public:
void RefreshCurrentView ();
// Soft clear, then redraw.
private:
void EndOfEvent ();
// This is called on change of state (G4ApplicationState). It is
// used to draw hits and trajectories if included in the current
// scene at the end of event, as required.
public:
// These can go when OLD STYLE commands go...
void PrintCurrentSystem () const;
void PrintCurrentSystems () const;
void PrintCurrentScene () const;
void PrintCurrentView () const;
public: // With description
/////////////////////////////////////////////////////////////////////
// Access functions.
@@ -271,7 +297,9 @@ protected:
G4ViewParameters fVP; // Current viewing parameters.
G4int fVerbose; // Verbosity level 0-10.
G4VisManMessenger* fpMessenger; // Pointer to messenger.
RWTPtrOrderedVector <G4UImessenger> fMessengerList;
G4RWTPtrOrderedVector <G4UImessenger> fMessengerList;
G4VisStateDependent* fpStateDependent; // Friend state dependent class.
};
#include "G4VisManager.icc"