Import Geant4 4.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-08 16:18:25 +02:00
parent 36c080dca6
commit 921d3b1cda
3990 changed files with 185376 additions and 82884 deletions
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4GraphicsSystemList.hh,v 1.6.2.1 2001/06/28 19:16:05 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4GraphicsSystemList.hh,v 1.7 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 2nd April 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Scene.hh,v 1.8.2.1 2001/06/28 19:16:05 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Scene.hh,v 1.12 2001/08/24 20:47:39 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// Scene John Allison 19th July 1996.
@@ -82,24 +82,32 @@ public: // With description
const G4Point3D& GetStandardTargetPoint () const;
// Usually centre of extent. See G4ViewParameters for definition.
G4bool GetRefreshAtEndOfEvent () const;
// If true, the visualization manager will request viewer to refresh
// "transient" objects, such as hits, at end of event. Otherwise
// they will be accumulated.
//////////////////////////////////////////////
// Add, Set, Clear functions...
G4bool AddRunDurationModel (G4VModel*);
G4bool AddRunDurationModel (G4VModel*, G4bool warn = false);
// Adds models of type which are expected to last for the duration
// of the run, for example geometry volumes.
// Returns false if model is already in the list.
// Prints warnings if warn is true.
G4bool AddWorldIfEmpty ();
G4bool AddWorldIfEmpty (G4bool warn = false);
// In some situations, if the user asks for a drawing and has not
// yet set any run duration models it makes sense to put the "world"
// in there by default.
// Returns false if model is already in the list.
// Prints warnings if warn is true.
G4bool AddEndOfEventModel (G4VModel*);
G4bool AddEndOfEventModel (G4VModel*, G4bool warn = false);
// Adds models of type which are described at the end of event when
// the scene is current.
// Returns false if model is already in the list.
// Prints warnings if warn is true.
G4std::vector<G4VModel*>& SetRunDurationModelList ();
// Allows you to change the model list - do with care!
@@ -110,12 +118,21 @@ public: // With description
void Clear ();
// Clears and destroys models in all lists.
void SetRefreshAtEndOfEvent(G4bool);
// If set true, the visualization manager will request viewer to
// refresh "transient" objects, such as hits, at end of event.
// Otherwise they will be accumulated.
void CalculateExtent();
// (Re-)calculates the extent from the extents of its models.
private:
G4String fName;
G4std::vector<G4VModel*> fRunDurationModelList;
G4std::vector<G4VModel*> fEndOfEventModelList;
G4VisExtent fExtent;
G4Point3D fStandardTargetPoint;
G4bool fRefreshAtEndOfEvent;
};
#include "G4Scene.icc"
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4Scene.icc,v 1.7.2.1 2001/06/28 19:16:05 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4Scene.icc,v 1.9 2001/08/11 21:39:54 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// Scene data John Allison 19th July 1996.
@@ -57,6 +57,10 @@ inline const G4Point3D& G4Scene::GetStandardTargetPoint () const {
return fStandardTargetPoint;
}
inline G4bool G4Scene::GetRefreshAtEndOfEvent () const {
return fRefreshAtEndOfEvent;
}
inline G4std::vector<G4VModel*>& G4Scene::SetRunDurationModelList ()
{
return fRunDurationModelList;
@@ -66,3 +70,7 @@ inline G4std::vector<G4VModel*>& G4Scene::SetEndOfEventModelList ()
{
return fRunDurationModelList;
}
inline void G4Scene::SetRefreshAtEndOfEvent(G4bool refresh) {
fRefreshAtEndOfEvent = refresh;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SceneHandlerList.hh,v 1.5.2.1 2001/06/28 19:16:05 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4SceneHandlerList.hh,v 1.6 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison May 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4SceneList.hh,v 1.7.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4SceneList.hh,v 1.8 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 9th August 1998
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VGraphicsSystem.hh,v 1.8.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VGraphicsSystem.hh,v 1.9 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 27th March 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VGraphicsSystem.icc,v 1.5.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VGraphicsSystem.icc,v 1.6 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 27th March 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VSceneHandler.hh,v 1.13.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VSceneHandler.hh,v 1.18 2001/08/14 18:36:07 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 19th July 1996.
@@ -132,7 +132,8 @@ public: // With description
// G4VSceneHandler::EndModeling ();
// }
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
virtual void BeginPrimitives
(const G4Transform3D& objectTransformation);
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXSceneHandler::BeginPrimitives
// (const G4Transform3D& objectTransformation) {
@@ -148,11 +149,13 @@ public: // With description
// }
virtual void AddPrimitive (const G4Polyline&) = 0;
virtual void AddPrimitive (const G4Scale&);
// Default implementation in this class but can be over-ridden.
virtual void AddPrimitive (const G4Text&) = 0;
virtual void AddPrimitive (const G4Circle&) = 0;
virtual void AddPrimitive (const G4Square&) = 0;
virtual void AddPrimitive (const G4Polymarker&); // Implemented in terms
// of the above but can be over-ridden.
virtual void AddPrimitive (const G4Polymarker&);
// Default implementation in this class but can be over-ridden.
virtual void AddPrimitive (const G4Polyhedron&) = 0;
virtual void AddPrimitive (const G4NURBS&) = 0;
@@ -165,12 +168,16 @@ public: // With description
G4VGraphicsSystem* GetGraphicsSystem () const;
G4Scene* GetScene () const;
const G4ViewerList& GetViewerList () const;
const G4VModel* GetModel () const;
G4VModel* GetModel () const;
G4VViewer* GetCurrentViewer () const;
G4bool GetMarkForClearingTransientStore () const;
void SetCurrentViewer (G4VViewer*);
void SetScene (G4Scene*);
G4ViewerList& SetViewerList (); // Non-const so you can change.
void SetModel (const G4VModel*);
void SetModel (G4VModel*);
void SetMarkForClearingTransientStore (G4bool);
// Sets flag which will cause transient store to be cleared at the
// next call to BeginPrimitives().
//////////////////////////////////////////////////////////////
// Public utility functions.
@@ -255,17 +262,18 @@ protected:
G4ViewerList fViewerList; // Viewers.
G4VViewer* fpViewer; // Current viewer.
G4Scene* fpScene; // Scene for this scene handler.
G4bool fMarkForClearingTransientStore;
//////////////////////////////////////////////////////////////
// Workspace...
G4bool fReadyForTransients; // I.e., not processing scene.
const G4VModel* fpModel; // Current model.
const G4Transform3D* fpObjectTransformation; // Accum'd obj. transfn.
const G4VisAttributes* fpVisAttribs; // Working vis attributes.
G4int fCurrentDepth; // Current depth of geom. hierarchy.
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
G4LogicalVolume* fpCurrentLV; // Current logical volume.
G4bool fReadyForTransients; // I.e., not processing scene.
G4VModel* fpModel; // Current model.
const G4Transform3D* fpObjectTransformation; // Accum'd obj. transfn.
const G4VisAttributes* fpVisAttribs; // Working vis attributes.
G4int fCurrentDepth; // Current depth of geom. hierarchy.
G4VPhysicalVolume* fpCurrentPV; // Current physical volume.
G4LogicalVolume* fpCurrentLV; // Current logical volume.
private:
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VSceneHandler.icc,v 1.9.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VSceneHandler.icc,v 1.12 2001/08/09 20:13:40 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 19th July 1996.
@@ -71,7 +71,7 @@ inline const G4ViewerList& G4VSceneHandler::GetViewerList () const {
return fViewerList;
}
inline const G4VModel* G4VSceneHandler::GetModel () const {
inline G4VModel* G4VSceneHandler::GetModel () const {
return fpModel;
}
@@ -79,6 +79,10 @@ inline G4VViewer* G4VSceneHandler::GetCurrentViewer () const {
return fpViewer;
}
inline G4bool G4VSceneHandler::GetMarkForClearingTransientStore () const {
return fMarkForClearingTransientStore;
}
inline void G4VSceneHandler::SetCurrentViewer (G4VViewer* pViewer) {
fpViewer = pViewer;
}
@@ -88,10 +92,14 @@ inline G4ViewerList& G4VSceneHandler::SetViewerList () {
}
inline void
G4VSceneHandler::SetModel (const G4VModel* pModel) {
G4VSceneHandler::SetModel (G4VModel* pModel) {
fpModel = pModel;
}
inline void G4VSceneHandler::SetMarkForClearingTransientStore (G4bool mark) {
fMarkForClearingTransientStore = mark;
}
inline const G4Colour& G4VSceneHandler::GetColor (const G4Visible& visible) {
return GetColour (visible);
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VViewer.hh,v 1.9.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VViewer.hh,v 1.12 2001/08/14 18:35:19 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 27th March 1996
@@ -49,6 +49,16 @@ public: // With description
G4VViewer (G4VSceneHandler& scene, G4int id, const G4String& name = "");
virtual ~G4VViewer ();
virtual void Initialise ();
// Called immediately after construction for those operations that
// must await complete contruction of viewer and all its bases. For
// example, if this class (G4VViewer) is inherited virtually, as in
// the OpenGL sub-category, it will not be fully constructed until
// *after* the the derived viewer (this is the rule about order of
// construction for virtual inheritance), so the derived viewer may
// not use information in G4VViewer in its contructor. Hence such
// code must be in Initialise().
//////////////////////////////////////////////////////////////
// View manipulation functions.
@@ -60,7 +70,8 @@ public: // With description
// Clear screen/viewing buffers.
virtual void DrawView () = 0;
// Draw scene - see example of a minimal function at end of this file.
// Draw view of the scene currently attached to the scene handler -
// see example of a minimal function at end of this file.
virtual void ShowView ();
// Show view (for graphics systems which require to process
@@ -21,12 +21,14 @@
// ********************************************************************
//
//
// $Id: G4VViewer.icc,v 1.7.2.1 2001/06/28 19:16:06 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VViewer.icc,v 1.9 2001/07/14 21:48:22 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 30th December 1996
inline void G4VViewer::Initialise () {}
inline G4int G4VViewer::GetViewId () const {
return fViewId;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VVisCommand.hh,v 1.10.2.1 2001/06/28 19:16:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VVisCommand.hh,v 1.13 2001/09/10 10:49:07 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// Base class for visualization commands - John Allison 9th August 1998
// It is really a messenger - we have one command per messenger.
@@ -30,11 +30,11 @@
#ifndef G4VVISCOMMAND_HH
#define G4VVISCOMMAND_HH
#include "G4VisManager.hh"
#include "G4UImessenger.hh"
#include "G4ThreeVector.hh"
#include "g4std/vector"
class G4VisManager;
class G4UIcommand;
class G4UIcmdWithAString;
@@ -56,6 +56,8 @@ public:
static void GetNewDoublePairValue(const G4String& paramString,
G4double& xval,
G4double& yval);
void UpdateVisManagerScene (const G4String& sceneName = "");
protected:
static G4VisManager* fpVisManager;
static G4std::vector<G4UIcommand*> sceneNameCommands;
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VVisCommand.icc,v 1.3.4.1 2001/06/28 19:16:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VVisCommand.icc,v 1.4 2001/07/11 10:09:14 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// Base class for visualization commands - John Allison 9th August 1998
// It is really a messenger - we have one command per messenger.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ViewParameters.hh,v 1.12.2.1 2001/06/28 19:16:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ViewParameters.hh,v 1.13 2001/07/11 10:09:15 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 19th July 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ViewParameters.icc,v 1.4.2.1 2001/06/28 19:16:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ViewParameters.icc,v 1.5 2001/07/11 10:09:15 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 20th October 1996
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4ViewerList.hh,v 1.5.2.1 2001/06/28 19:16:07 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4ViewerList.hh,v 1.6 2001/07/11 10:09:15 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison May 1996
@@ -1,100 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandTemplates.hh,v 1.3.4.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Visualization Command Messenger Templates.
// John Allison 7th September 1997
#ifndef G4VISCOMMANDTEMPLATES_HH
#define G4VISCOMMANDTEMPLATES_HH
#include "globals.hh"
#include "G4UImessenger.hh"
class G4UIcommand;
/***************************************
// Vis Command Messenger Template - General Purpose.
template <class T>
class G4VisCommandMessenger: public G4UImessenger {
public:
G4VisCommandMessenger ();
~G4VisCommandMessenger ();
void SetNewValue (G4UIcommand* command, G4String newValues);
private:
T fCommand;
};
************************************************/
// Command Messenger Template for directory - OLD STYLE!!
template <class tCommandDirectory>
class G4VisCommandDirectoryMessenger: public G4UImessenger {
public:
G4VisCommandDirectoryMessenger ();
~G4VisCommandDirectoryMessenger ();
private:
tCommandDirectory fCommandDirectory;
G4UIcommand* fpCommand;
};
// Command Messenger Template for simple commands with no arguments -
// OLD STYLE!!
template <class tSimpleCommand>
class G4VisSimpleCommandMessenger: public G4UImessenger {
public:
G4VisSimpleCommandMessenger ();
~G4VisSimpleCommandMessenger ();
void SetNewValue (G4UIcommand* command, G4String newValues);
private:
tSimpleCommand fSimpleCommand;
G4UIcommand* fpCommand;
};
// Command Messenger Template for Boolean attributes which can
// usefully be implemented as a button on a GUI - OLD STYLE!!
template <class tButtonCommand>
class G4VisButtonCommandMessenger: public G4UImessenger {
public:
G4VisButtonCommandMessenger ();
~G4VisButtonCommandMessenger ();
void SetNewValue (G4UIcommand* command, G4String newValues);
private:
tButtonCommand fButtonCommand;
G4UIcommand* fpCommand;
};
// OLD STYLE!!
G4UIcommand* G4VisButtonCommandMessengerRegister (G4String commandName,
G4String guidance,
G4UImessenger* messenger);
// OLD STYLE!!
G4int G4VisButtonCommandMessengerInterpret (G4String newValues);
#include "G4VisCommandTemplates.icc"
#endif
@@ -1,134 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandTemplates.icc,v 1.3.4.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
//
//
// Command Messenger Templates.
// John Allison 7th September 1997
#include "G4UIcommand.hh"
#include "G4UIdirectory.hh"
#include "G4UIcmdWithoutParameter.hh"
#include "G4ios.hh"
/**************************************
// What follows is just a try at a general template. But I think I'll
abandon templates for this job - JA.
template <class T>
G4VisCommandMessenger <T> ::G4VisCommandMessenger () {
fpCommand = G4VisCommandMessengerRegister
(fCommand.GetCommandName (),
fCommand.GetGuidance (),
this);
}
template <class T>
G4VisCommandMessenger <T>
::~G4VisCommandMessenger () {
delete fpCommand;
}
template <class T>
void G4VisCommandMessenger <T> ::SetNewValue
(G4UIcommand*, G4String newValues) {
switch (G4VisCommandMessengerInterpret (newValues)) {
case 0: fCommand.SetValue (false); break;
case 1: fCommand.SetValue (true); break;
default: break;
}
G4cout << "Current value of " << fCommand.GetValueName ()
<< " is " << fCommand.GetValue () << G4endl;
}
************************************/
// OLD STYLE!!
template <class tCommandDirectory>
G4VisCommandDirectoryMessenger <tCommandDirectory>
::G4VisCommandDirectoryMessenger () {
fpCommand = new G4UIdirectory (fCommandDirectory.GetCommandName ());
fpCommand -> SetGuidance (fCommandDirectory.GetGuidance ());
}
// OLD STYLE!!
template <class tCommandDirectory>
G4VisCommandDirectoryMessenger <tCommandDirectory>
::~G4VisCommandDirectoryMessenger () {
delete fpCommand;
}
// OLD STYLE!!
template <class tSimpleCommand>
G4VisSimpleCommandMessenger <tSimpleCommand>
::G4VisSimpleCommandMessenger () {
fpCommand = new G4UIcmdWithoutParameter
(fSimpleCommand.GetCommandName (), this);
fpCommand -> SetGuidance (fSimpleCommand.GetGuidance ());
}
// OLD STYLE!!
template <class tSimpleCommand>
G4VisSimpleCommandMessenger <tSimpleCommand>
::~G4VisSimpleCommandMessenger () {
delete fpCommand;
}
// OLD STYLE!!
template <class tSimpleCommand>
void G4VisSimpleCommandMessenger <tSimpleCommand> ::SetNewValue
(G4UIcommand*, G4String) {
fSimpleCommand.SetValue ();
}
// OLD STYLE!!
template <class tButtonCommand>
G4VisButtonCommandMessenger <tButtonCommand>
::G4VisButtonCommandMessenger () {
fpCommand = G4VisButtonCommandMessengerRegister
(fButtonCommand.GetCommandName (),
fButtonCommand.GetGuidance (),
this);
}
// OLD STYLE!!
template <class tButtonCommand>
G4VisButtonCommandMessenger <tButtonCommand>
::~G4VisButtonCommandMessenger () {
delete fpCommand;
}
// OLD STYLE!!
template <class tButtonCommand>
void G4VisButtonCommandMessenger <tButtonCommand> ::SetNewValue
(G4UIcommand*, G4String newValues) {
switch (G4VisButtonCommandMessengerInterpret (newValues)) {
case 0: fButtonCommand.SetValue (false); break;
case 1: fButtonCommand.SetValue (true); break;
default: break;
}
G4cout << "Current value of " << fButtonCommand.GetValueName ()
<< " is " << fButtonCommand.GetValue () << G4endl;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommands.hh,v 1.1.2.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommands.hh,v 1.3 2001/08/05 02:29:02 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/ top level commands - John Allison 5th February 2001
@@ -32,7 +32,7 @@
#include "G4VVisCommand.hh"
class G4UIcmdWithABool;
class G4UIcmdWithAnInteger;
class G4UIcmdWithAString;
class G4UIcmdWithoutParameter;
class G4VisCommandEnable: public G4VVisCommand {
@@ -57,7 +57,7 @@ public:
private:
G4VisCommandVerbose (const G4VisCommandVerbose&);
G4VisCommandVerbose& operator = (const G4VisCommandVerbose&);
G4UIcmdWithAnInteger* fpCommand;
G4UIcmdWithAString* fpCommand;
};
#endif
@@ -1,63 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsCamera.hh,v 1.3.4.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/camera/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSCAMERA_HH
#define G4VISCOMMANDSCAMERA_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/camera/... ////
//vis \hline
//vis /vis~/camera/ &&
//vis ...menu of camera commands. \\%
class G4VisCommandCamera {
public:
G4String GetCommandName () const {return "/vis~/camera/";}
G4String GetGuidance () const {
return "...menu of camera commands.";
}
};
///////////////////////////////////// /vis~/camera/reset ////
//camera \hline
//camera /vis~/camera/reset &&
//camera Resets dolly, pan and zoom. Regains ``Standard View''. \\%
class G4VisCommandCameraReset {
public:
G4String GetCommandName () const {return "/vis~/camera/reset";}
G4String GetGuidance () const {
return "Resets dolly, pan and zoom. Regains \"Standard View\".";
}
void SetValue ();
};
#endif
@@ -1,124 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsClear.hh,v 1.5.2.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/clear/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSCLEAR_HH
#define G4VISCOMMANDSCLEAR_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/clear/... ////
//vis \hline
//vis /vis~/clear/ &&
//vis ...menu of clear commands. \\%
class G4VisCommandClear {
public:
G4String GetCommandName () const {return "/vis~/clear/";}
G4String GetGuidance () const {
return "...menu of clear commands.";
}
};
/****************
///////////////////////////////////////// /vis~/clear/scene ////
//clear \hline
//clear /vis~/clear/scene &&
//clear Clears current scene and scene data and marks all its views
//clear as needing refreshing (but does not clear them). \\%
class G4VisCommandClearScene {
public:
G4String GetCommandName () const {return "/vis~/clear/scene";}
G4String GetGuidance () const {
return "Clears current scene and scene data and marks all its views"
" as needing refreshing (but does not clear them).";
}
void SetValue () {
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> ClearScene ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
}
};
******************/
//////////////////////////////////////// /vis~/clear/view ////
//clear \hline
//clear /vis~/clear/view &&
//clear Clears visible window of current view. \\%
class G4VisCommandClearView {
public:
G4String GetCommandName () const {return "/vis~/clear/view";}
G4String GetGuidance () const {
return "Clears visible window of current view.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/clear\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> ClearView ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
}
};
/****************************
/////////////////////////////////////// /vis~/clear/view_and_scene ////
//clear \hline
//clear /vis~/clear/view\_and\_scene &&
//clear Combination command. \\%
class G4VisCommandClearViewAndScene {
public:
G4String GetCommandName () const {return "/vis~/clear/view_and_scene";}
G4String GetGuidance () const {
return "Combination command.";
}
void SetValue () {
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> ClearView ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
pVMan -> ClearScene ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
}
};
********************/
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsCompound.hh,v 1.6.2.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsCompound.hh,v 1.7 2001/07/11 10:09:15 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// Compound /vis/ commands - John Allison 15th May 2000
@@ -1,128 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsCopy.hh,v 1.5.2.1 2001/06/28 19:16:08 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/copy/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSCOPY_HH
#define G4VISCOMMANDSCOPY_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/copy/... ////
//vis \hline
//vis /vis~/copy/ &&
//vis ...menu of copy commands. \\%
class G4VisCommandCopy {
public:
G4String GetCommandName () const {return "/vis~/copy/";}
G4String GetGuidance () const {
return "...menu of copy commands.";
}
};
/*****************************
////////////////////////////////////////////// /vis~/copy/all ////
//copy \hline
//copy /vis~/copy/all &&
//copy Copy all data of current scene and view into current memory.
//copy WARNING: this overwrites the current scene data and
//copy current view parameters. \\%
class G4VisCommandCopyAll {
public:
G4String GetCommandName () const {return "/vis~/copy/all";}
G4String GetGuidance () const {
return "Copy all data of current scene and view into current memory."
" WARNING: this overwrites the current scene data and "
"current view parameters.";
}
void SetValue () {
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> CopyScene ();
pVMan -> CopyViewParameters ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentScene ();
}
}
}
};
////////////////////////////////////////// /vis~/copy/scene ////
//copy \hline
//copy /vis~/copy/scene &&
//copy Copy scene data of current scene into current scene data.
//copy WARNING: this overwrites the current scene data. \\%
class G4VisCommandCopyScene {
public:
G4String GetCommandName () const {return "/vis~/copy/scene";}
G4String GetGuidance () const {
return "Copy scene data of current scene into current scene data."
" WARNING: this overwrites the current scene data.";
}
void SetValue () {
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> CopyScene ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentScene ();
}
}
}
};
*********************/
////////////////////////////////////////// /vis~/copy/view ////
//copy \hline
//copy /vis~/copy/view &&
//copy Copy view parameters of current view into current view parameters.
//copy WARNING: this overwrites the current view parameters. \\%
class G4VisCommandCopyView {
public:
G4String GetCommandName () const {return "/vis~/copy/view";}
G4String GetGuidance () const {
return "Copy view parameters of current view into current view parameters."
" WARNING: this overwrites the current view parameters.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/set/all\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> CopyViewParameters ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
}
};
#endif
@@ -1,65 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsCreateScene.hh,v 1.3.4.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/create_scene/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSCREATESCENE_HH
#define G4VISCOMMANDSCREATESCENE_HH
#include "globals.hh"
#include "G4UImanager.hh"
///////////////////////////////////////////// /vis~/create_scene/... ////
//vis \hline
//vis /vis~/create\_scene/ &&
//vis ...menu of scene creation commands. \\%
class G4VisCommandCreateScene {
public:
G4String GetCommandName () const {return "/vis~/create_scene/";}
G4String GetGuidance () const {
return "...menu of scene creation commands.";
}
};
////////////////////////////////// /vis~/create_scene/clear ////
//cr_sc \hline
//cr_sc /vis~/create\_scene/clear &&
//cr_sc Same as {\tt /vis~/clear/scene}. \\%
class G4VisCommandCreateSceneClear {
public:
G4String GetCommandName () const {return "/vis~/create_scene/clear";}
G4String GetGuidance () const {
return "Same as /vis~/clear/scene.";
}
void SetValue () {
G4UImanager* UI = G4UImanager::GetUIpointer ();
UI -> ApplyCommand("/vis~/clear/scene");
}
};
#endif
@@ -1,95 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsCreateView.hh,v 1.5.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/create_view/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSCREATEVIEW_HH
#define G4VISCOMMANDSCREATEVIEW_HH
#include "globals.hh"
#include "G4VisManager.hh"
///////////////////////////////////////////// /vis~/create_view/... ////
//vis \hline
//vis /vis~/create\_view/ &&
//vis ...menu of view creation commands. \\%
class G4VisCommandCreateView {
public:
G4String GetCommandName () const {return "/vis~/create_view/";}
G4String GetGuidance () const {
return "...menu of view creation commands.";
}
};
// //////////////////////////////// /vis~/create_view/new_scene ////
// //cr_vw \hline
// //cr_vw /vis~/create\_view/new\_scene &&
// //cr_vw Creates a new scene and a new view; both become current. \\%
class G4VisCommandCreateViewNewScene {
public:
G4String GetCommandName () const {return "/vis~/create_view/new_scene";}
G4String GetGuidance () const {
return "Creates a new scene and a new view; both become current.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/create\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> CreateSceneHandler ();
pVMan -> CreateViewer ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentScene ();
}
}
}
};
//////////////////////////////// /vis~/create_view/new_view ////
//cr_vw \hline
//cr_vw /vis~/create\_view/new\_view &&
//cr_vw Creates a new view of current scene; new view becomes
//cr_vw current view. \\%
class G4VisCommandCreateViewNewView {
public:
G4String GetCommandName () const {return "/vis~/create_view/new_view";}
G4String GetGuidance () const {
return "Creates a new view of current scene; new view becomes "
"current view.";
}
void SetValue () {
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> CreateViewer ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
}
};
#endif
@@ -1,97 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsDelete.hh,v 1.5.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/delete/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSDELETE_HH
#define G4VISCOMMANDSDELETE_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/delete/... ////
//vis \hline
//vis /vis~/delete/ &&
//vis ...menu of deleting possibilities. \\%
class G4VisCommandDelete {
public:
G4String GetCommandName () const {return "/vis~/delete/";}
G4String GetGuidance () const {
return "...menu of deleting possibilities.";
}
};
/////////////////////////////////////////// /vis~/delete/scene ////
//delete \hline
//delete /vis~/delete/scene &&
//delete Deletes the current scene and its views. \\%
class G4VisCommandDeleteScene {
public:
G4String GetCommandName () const {return "/vis~/delete/scene";}
G4String GetGuidance () const {
return "Deletes the current scene and its views.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation
("Use \"/vis/scene/remove\" and/or \"/vis/sceneHandler/remove\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
pVMan -> DeleteCurrentSceneHandler ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
};
/////////////////////////////////////////// /vis~/delete/view ////
//delete \hline
//delete /vis~/delete/view &&
//delete Deletes the current view. \\%
class G4VisCommandDeleteView {
public:
G4String GetCommandName () const {return "/vis~/delete/view";}
G4String GetGuidance () const {
return "Deletes the current view.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/remove\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
pVMan -> DeleteCurrentViewer ();
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
}
};
#endif
@@ -1,75 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsDraw.hh,v 1.4.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/draw/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSDRAW_HH
#define G4VISCOMMANDSDRAW_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/draw/... ////
//vis \hline
//vis /vis~/draw/ &&
//vis ...menu of drawing possibilities. \\%
class G4VisCommandDraw {
public:
G4String GetCommandName () const {return "/vis~/draw/";}
G4String GetGuidance () const {
return "...menu of drawing possibilities.";
}
};
/////////////////////////////////////////// /vis~/draw/current ////
//draw \hline
//draw /vis~/draw/current &&
//draw Draws the current scene in the current view using the current
//draw view parameters. \\%
class G4VisCommandDrawCurrent {
public:
G4String GetCommandName () const {return "/vis~/draw/current";}
G4String GetGuidance () const {
return "Draws the current scene in the current view using the current "
"view parameters.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation
("Use \"/vis/viewer/refresh\" or \"/vis/scene/notifyHandlers\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
pVMan -> Draw ();
}
}
};
#endif
@@ -1,79 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsLights.hh,v 1.6.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/lights/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSLIGHTS_HH
#define G4VISCOMMANDSLIGHTS_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/lights/... ////
//vis \hline
//vis /vis~/lights/ &&
//vis ...menu of lights commands. \\%
class G4VisCommandLights {
public:
G4String GetCommandName () const {return "/vis~/lights/";}
G4String GetGuidance () const {
return "...menu of lights commands.";
}
};
/////////////////////////////////////// /vis~/lights/move_with_camera ////
//lights \hline
//lights /vis~/lights/move\_with\_camera & true/false &
//lights Lights move with change of viewpoint. \\%
class G4VisCommandLightsMoveWithCamera {
public:
G4String GetCommandName () const {return "/vis~/lights/move_with_camera";}
G4String GetGuidance () const {
return "Lights move with change of viewpoint.";
}
G4String GetValueName () const {return "lights move flag";}
G4bool GetValue () const {
return G4VisManager::GetInstance () -> GetCurrentViewParameters ().
GetLightsMoveWithCamera ();
}
void SetValue (G4bool value) {
G4VisManager::PrintCommandDeprecation
("Use \"/vis/viewer/set/lightsMove\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
pVMan -> SetCurrentViewParameters ().SetLightsMoveWithCamera (value);
G4VViewer* pView = pVMan -> GetCurrentViewer ();
if (pView) {
// Copy current view parameters into current view.
pView -> SetViewParameters (pVMan -> GetCurrentViewParameters ());
}
G4cout << "Issue Draw or refresh to see effect." << G4endl;
}
};
#endif
@@ -1,50 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsPrint.hh,v 1.3.4.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/print/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSPRINT_HH
#define G4VISCOMMANDSPRINT_HH
#include "globals.hh"
//////////////////////////////////////////////////// /vis~/print/... ////
//vis \hline
//vis /vis~/print/ &&
//vis ...menu of printing possibilities, also controlled by ``Verbose''
//vis parameter. \\%
class G4VisCommandPrint {
public:
G4String GetCommandName () const {return "/vis~/print/";}
G4String GetGuidance () const {
return "...menu of printing possibilities, also controlled by \"Verbose\" "
"parameter.";
}
};
#endif
@@ -1,71 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsRefresh.hh,v 1.4.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/refresh/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSREFRESH_HH
#define G4VISCOMMANDSREFRESH_HH
#include "globals.hh"
#include "G4VisManager.hh"
/////////////////////////////////////////////////// /vis~/refresh/... ////
//vis \hline
//vis /vis~/refresh/ &&
//vis ...menu of refresh commands. \\%
class G4VisCommandRefresh {
public:
G4String GetCommandName () const {return "/vis~/refresh/";}
G4String GetGuidance () const {
return "...menu of refresh commands.";
}
};
///////////////////////////////////////////// /vis~/refresh/view ////
//view \hline
//view /vis~/refresh/view &&
//view Optimal redraw of current view of current scene - uses
//view double buffer and graphical database, if any. \\%
class G4VisCommandRefreshView {
public:
G4String GetCommandName () const {return "/vis~/refresh/view";}
G4String GetGuidance () const {
return "Optimal redraw of current view of current scene - uses "
"double buffer and graphical database, if any.";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/refresh\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
pVMan -> RefreshCurrentView ();
// Soft clear - clears back buffer only on double-buffered systems.
}
}
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsScene.hh,v 1.9.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsScene.hh,v 1.13 2001/11/06 13:00:10 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/scene commands - John Allison 9th August 1998
@@ -42,7 +42,6 @@ public:
protected:
G4String CurrentSceneName ();
void UpdateCandidateLists ();
void UpdateVisManagerScene (const G4String& sceneName = "");
private:
G4VVisCommandScene (const G4VVisCommandScene&);
G4VVisCommandScene& operator = (const G4VVisCommandScene&);
@@ -74,6 +73,19 @@ private:
G4UIcmdWithAString* fpCommand;
};
class G4VisCommandSceneEndOfEventAction: public G4VVisCommandScene {
public:
G4VisCommandSceneEndOfEventAction ();
virtual ~G4VisCommandSceneEndOfEventAction ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4VisCommandSceneEndOfEventAction (const G4VisCommandSceneEndOfEventAction&);
G4VisCommandSceneEndOfEventAction& operator =
(const G4VisCommandSceneEndOfEventAction&);
G4UIcmdWithAString* fpCommand;
};
class G4VisCommandSceneList: public G4VVisCommandScene {
public:
G4VisCommandSceneList ();
@@ -96,7 +108,7 @@ private:
G4VisCommandSceneNotifyHandlers (const G4VisCommandSceneNotifyHandlers&);
G4VisCommandSceneNotifyHandlers& operator =
(const G4VisCommandSceneNotifyHandlers&);
G4UIcmdWithAString* fpCommand;
G4UIcommand* fpCommand;
};
class G4VisCommandSceneRemove: public G4VVisCommandScene {
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsSceneAdd.hh,v 1.7.2.1 2001/06/28 19:16:09 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsSceneAdd.hh,v 1.9 2001/07/22 01:05:00 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/scene commands - John Allison 9th August 1998
@@ -81,6 +81,18 @@ private:
G4UIcommand* fpCommand;
};
class G4VisCommandSceneAddScale: public G4VVisCommandScene {
public:
G4VisCommandSceneAddScale ();
virtual ~G4VisCommandSceneAddScale ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4VisCommandSceneAddScale (const G4VisCommandSceneAddScale&);
G4VisCommandSceneAddScale& operator = (const G4VisCommandSceneAddScale&);
G4UIcommand* fpCommand;
};
class G4VisCommandSceneAddText: public G4VVisCommandScene {
public:
G4VisCommandSceneAddText ();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsSceneHandler.hh,v 1.5.4.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsSceneHandler.hh,v 1.6 2001/07/11 10:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/sceneHandler commands - John Allison 10th October 1998
@@ -1,56 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsSceneInclude.hh,v 1.3.4.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// /vis/scene commands - John Allison 9th August 1998
#ifndef G4VISCOMMANDSSCENEINCLUDE_HH
#define G4VISCOMMANDSSCENEINCLUDE_HH
#include "G4VisCommandsScene.hh"
class G4VisCommandSceneIncludeHits: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
G4VisCommandSceneIncludeHits ();
~G4VisCommandSceneIncludeHits ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithoutParameter* fpCommand;
};
class G4VisCommandSceneIncludeTrajectories: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
G4VisCommandSceneIncludeTrajectories ();
~G4VisCommandSceneIncludeTrajectories ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithoutParameter* fpCommand;
};
#endif
@@ -1,138 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsSet.hh,v 1.6.2.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/set/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSSET_HH
#define G4VISCOMMANDSSET_HH
#include "globals.hh"
#include "G4VisManager.hh"
#include "G4ViewParameters.hh"
//////////////////////////////////////////////////// /vis~/set/... ////
//vis \hline
//vis /vis~/set/ &&
//vis ...menu of set commands. \\%
class G4VisCommandSet {
public:
G4String GetCommandName () const {return "/vis~/set/";}
G4String GetGuidance () const {
return "...menu of set commands.";
}
};
/////////////////////////////////////////// /vis~/set/culling ////
//set \hline
//set /vis~/set/culling & true/false &
//set Global culling flag. Does not change specific culling flags. \\%
class G4VisCommandSetCulling {
public:
G4String GetCommandName () const {return "/vis~/set/culling";}
G4String GetGuidance () const {
return "Global culling flag. Does not change specific culling flags.";
}
G4String GetValueName () const {return "global culling flag";}
G4bool GetValue () const {
return G4VisManager::GetInstance () -> GetCurrentViewParameters ().
IsCulling ();
}
void SetValue (G4bool value) {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/set/culling\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
pVMan -> SetCurrentViewParameters ().SetCulling (value);
G4VViewer* pView = pVMan -> GetCurrentViewer ();
if (pView) {
// Copy current view parameters into current view.
pView -> SetViewParameters (pVMan -> GetCurrentViewParameters ());
}
G4cout << "Issue Draw or refresh to see effect." << G4endl;
}
};
////////////////////////////////////////// /vis~/set/cull_covered_daughters
//set \hline
//set /vis~/set/ cull\_covered\_daughters & true/false &
//set Cull (i.e., do not Draw) daughters covered by opaque mothers. \\%
class G4VisCommandSetCullCoveredDaughters {
public:
G4String GetCommandName () const {return "/vis~/set/cull_covered_daughters";}
G4String GetGuidance () const {
return "Cull (i.e., do not Draw) daughters covered by opaque mothers.";
}
G4String GetValueName () const {return "culling covered daughters flag";}
G4bool GetValue () const {
return G4VisManager::GetInstance () -> GetCurrentViewParameters ().
IsCullingCovered ();
}
void SetValue (G4bool value) {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/set/culling\".");
G4cout << "\nNote: this is only effective in surface drawing style,"
"\nand then only if the volumes are visible and opaque, and then"
"\nonly if no sections or cutways are in operation."
<< G4endl;
G4VisManager* pVMan = G4VisManager::GetInstance ();
pVMan -> SetCurrentViewParameters ().SetCullingCovered (value);
G4VViewer* pView = pVMan -> GetCurrentViewer ();
if (pView) {
// Copy current view parameters into current view.
pView -> SetViewParameters (pVMan -> GetCurrentViewParameters ());
}
G4cout << "Issue Draw or refresh to see effect." << G4endl;
}
};
////////////////////////////////////////// /vis~/set/cull_invisible_objects
//set \hline
//set /vis~/set/ cull\_invisible\_objects & true/false &
//set Cull (i.e., do not Draw) ``invisible'' objects. \\%
class G4VisCommandSetCullInvisible {
public:
G4String GetCommandName () const {return "/vis~/set/cull_invisible_objects";}
G4String GetGuidance () const {
return "Cull (i.e., do not Draw) \"invisible\" objects.";
}
G4String GetValueName () const {return "culling invisible objects flag";}
G4bool GetValue () const {
return G4VisManager::GetInstance () -> GetCurrentViewParameters ().
IsCullingInvisible ();
}
void SetValue (G4bool value) {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/set/culling\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
pVMan -> SetCurrentViewParameters ().SetCullingInvisible (value);
G4VViewer* pView = pVMan -> GetCurrentViewer ();
if (pView) {
// Copy current view parameters into current view.
pView -> SetViewParameters (pVMan -> GetCurrentViewParameters ());
}
G4cout << "Issue Draw or refresh to see effect." << G4endl;
}
};
#endif
@@ -1,75 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisCommandsShow.hh,v 1.4.2.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
//
//
// /vis~/show/ commands
// John Allison 7th September 1997
#ifndef G4VISCOMMANDSSHOW_HH
#define G4VISCOMMANDSSHOW_HH
#include "globals.hh"
#include "G4VisManager.hh"
/////////////////////////////////////////////////// /vis~/show/... ////
//vis \hline
//vis /vis~/show/ &&
//vis ...menu of show commands. \\%
class G4VisCommandShow {
public:
G4String GetCommandName () const {return "/vis~/show/";}
G4String GetGuidance () const {
return "...menu of show commands.";
}
};
//////////////////////////////////////////// /vis~/show/view ////
//view \hline
//view /vis~/show/view &&
//view Make the view visible, if not so already (initiates
//view post-processing for
//view graphics systems which use such techniques). \\%
class G4VisCommandShowView {
public:
G4String GetCommandName () const {return "/vis~/show/view";}
G4String GetGuidance () const {
return "Make the view visible, if not so already (initiates "
"post-processing for "
"graphics systems which use such techniques).";
}
void SetValue () {
G4VisManager::PrintCommandDeprecation("Use \"/vis/viewer/update\".");
G4VisManager* pVMan = G4VisManager::GetInstance ();
if (pVMan -> IsValidView ()) {
if (pVMan -> GetVerboseLevel () > 1) {
pVMan -> PrintCurrentView ();
}
pVMan -> Show ();
}
}
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsViewer.hh,v 1.13.2.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsViewer.hh,v 1.15 2001/11/06 12:55:28 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/viewer commands - John Allison 25th October 1998
@@ -91,6 +91,18 @@ private:
G4double fDollyTo;
};
class G4VisCommandViewerFlush: public G4VVisCommandViewer {
public:
G4VisCommandViewerFlush ();
virtual ~G4VisCommandViewerFlush ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4VisCommandViewerFlush (const G4VisCommandViewerFlush&);
G4VisCommandViewerFlush& operator = (const G4VisCommandViewerFlush&);
G4UIcmdWithAString* fpCommand;
};
class G4VisCommandViewerLights: public G4VVisCommandViewer {
public:
G4VisCommandViewerLights ();
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisCommandsViewerSet.hh,v 1.8.2.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisCommandsViewerSet.hh,v 1.10 2001/11/06 13:01:31 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
// /vis/viewer/set commands - John Allison 16th May 2000
@@ -55,9 +55,18 @@ private:
G4UIcmdWithABool* fpCommandHiddenMarker;
G4UIcmdWithAnInteger* fpCommandLineSegments;
G4UIcmdWithAString* fpCommandLightsMove;
G4UIcommand* fpCommandLightsThetaPhi;
G4UIcommand* fpCommandLightsVector;
G4ThreeVector fLightsVector;
G4UIcommand* fpCommandProjection;
G4UIcommand* fpCommandSectionPlane;
G4UIcmdWithAString* fpCommandStyle;
G4UIcommand* fpCommandUpThetaPhi;
G4UIcommand* fpCommandUpVector;
G4ThreeVector fUpVector;
G4UIcommand* fpCommandViewpointThetaPhi;
G4UIcommand* fpCommandViewpointVector;
G4ThreeVector fViewpointVector;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisFeaturesOfDAWNFILE.hh,v 1.3.4.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisFeaturesOfDAWNFILE.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
#ifndef G4VISFEATURESOFDAWNFILE_HH
#define G4VISFEATURESOFDAWNFILE_HH
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisFeaturesOfFukuiRenderer.hh,v 1.3.4.1 2001/06/28 19:16:10 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisFeaturesOfFukuiRenderer.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisFeaturesOfOpenGL.hh,v 1.3.4.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisFeaturesOfOpenGL.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisFeaturesOfOpenInventor.hh,v 1.3.4.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisFeaturesOfOpenInventor.hh,v 1.4 2001/07/11 10:09:16 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -1,79 +0,0 @@
//
// ********************************************************************
// * DISCLAIMER *
// * *
// * The following disclaimer summarizes all the specific disclaimers *
// * of contributors to this software. The specific disclaimers,which *
// * govern, are listed with their locations in: *
// * http://cern.ch/geant4/license *
// * *
// * 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. *
// * *
// * This code implementation is the intellectual property of 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: G4VisManMessenger.hh,v 1.6.2.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
//
//
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
#ifndef G4VISMANMESSENGER_HH
#define G4VISMANMESSENGER_HH
#include "G4UImessenger.hh"
#include "globals.hh"
#include "g4std//vector"
class G4VisManager;
class G4UIcommand;
class G4VisManMessenger: public G4UImessenger {
public:
G4VisManMessenger (G4VisManager* pVMan);
virtual ~G4VisManMessenger ();
void SetNewValue (G4UIcommand* command, G4String newValues);
G4String GetCurrentValue (G4UIcommand* command);
private:
G4VisManMessenger (const G4VisManMessenger&);
G4VisManMessenger& operator = (const G4VisManMessenger&);
void AddCommandCamera ();
// void AddCommandClear ();
// void AddCommandCopy ();
// void AddCommandCreateScene ();
void AddCommandCreateView ();
void AddCommandDraw ();
void AddCommandLights ();
// void AddCommandPrint ();
// void AddCommandRefresh ();
void AddCommandSet ();
// void AddCommandShow ();
void AddCommandExpert ();
void DoCommandCamera (const G4String& commandPath, G4String& newValues);
// void DoCommandClear (const G4String& commandPath, G4String& newValues);
// void DoCommandCopy (const G4String& commandPath, G4String& newValues);
// void DoCommandCreateScene (const G4String& commandPath, G4String& newValues);
void DoCommandCreateView (const G4String& commandPath, G4String& newValues);
void DoCommandDraw (const G4String& commandPath, G4String& newValues);
void DoCommandLights (const G4String& commandPath, G4String& newValues);
// void DoCommandPrint (const G4String& commandPath, G4String& newValues);
// void DoCommandRefresh (const G4String& commandPath, G4String& newValues);
void DoCommandSet (const G4String& commandPath, G4String& newValues);
// void DoCommandShow (const G4String& commandPath, G4String& newValues);
void DoCommandExpert (const G4String& commandPath, G4String& newValues);
G4bool ViewValid ();
void RotateViewpointAboutUpVectorBy (G4double dbeta);
G4VisManager* fpVMan;
G4std::vector<G4UIcommand*> fCommandList;
};
#endif
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisManager.hh,v 1.18.2.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisManager.hh,v 1.27 2001/09/10 11:00:36 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
@@ -30,7 +30,7 @@
//
// The GEANT4 Visualization Manager - John Allison 02/Jan/1996.
//
// G4VisManage is a "Singleton", i.e., only one instance of it or any
// G4VisManager 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.
//
@@ -83,14 +83,12 @@
#include "G4SceneHandlerList.hh"
#include "G4Scene.hh"
#include "G4SceneList.hh"
#include "G4ViewParameters.hh"
#include "G4Transform3D.hh"
#include "G4UImessenger.hh"
#include "g4std/iostream"
#include "g4std/vector"
class G4VisManMessenger;
class G4VPhysicalVolume;
class G4LogicalVolume;
class G4VSolid;
@@ -100,6 +98,7 @@ class G4VViewer;
class G4Polyline;
class G4Text;
class G4Circle;
class G4Scale;
class G4Square;
class G4Polymarker;
class G4Polyhedron;
@@ -115,7 +114,6 @@ class G4VisManager: public G4VVisManager {
// non-zero.
// Odd friends that need access to various methods of the G4VisManager...
friend void G4OpenGLXmViewerSecondaryLoopPostAction (); // Mmmm!
friend class G4RTSteppingAction;
friend class G4RayTrajectory;
@@ -131,26 +129,18 @@ class G4VisManager: public G4VVisManager {
friend class G4VisStateDependent;
// Now classes associated with the old commands...
friend class G4VisManMessenger;
friend class G4VisCommandCameraReset;
friend class G4VisCommandClearScene;
friend class G4VisCommandClearView;
friend class G4VisCommandClearViewAndScene;
friend class G4VisCommandCopyAll;
friend class G4VisCommandCopyScene;
friend class G4VisCommandCopyView;
friend class G4VisCommandCreateViewNewScene;
friend class G4VisCommandCreateViewNewView;
friend class G4VisCommandDeleteScene;
friend class G4VisCommandDeleteView;
friend class G4VisCommandDrawCurrent;
friend class G4VisCommandLightsMoveWithCamera;
friend class G4VisCommandRefreshView;
friend class G4VisCommandSetCulling;
friend class G4VisCommandSetCullCoveredDaughters;
friend class G4VisCommandSetCullInvisible;
friend class G4VisCommandShowView;
public: // With description
enum Verbosity {
quiet, // Nothing is printed.
startup, // Startup and endup messages are printed...
errors, // ...and errors...
warnings, // ...and warnings...
confirmations, // ...and confirming messages...
parameters, // ...and parameters of scenes and views...
all // ...and everything available.
};
// Simple graded message scheme.
protected: // With description
@@ -182,65 +172,59 @@ public: // With description
void Initialize (); // Alias Initialise ().
G4bool RegisterGraphicsSystem (G4VGraphicsSystem* pSystem);
//////////////////////////////////////////////////////////////////////
// Drawing routines!
void ClearView ();
// Clear visible window of current viewer (both buffers of a double
// buffered system).
void Draw ();
// Draw current scene in current view.
void Show ();
// Show current view (initiates post-procesing of graphical
// databases for graphics systems which require it.)
// ///////////////////////////////////////////////////////////////
// Now functions for drawing various visualization primitives,
// useful for representing hits, digis, etc.
void Draw (const G4Polyline&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Text&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
/////////////////////////////////////////////////////////////////
// Now functions that implement the pure virtual functions of
// G4VVisManager for drawing various visualization primitives, useful
// for representing hits, digis, etc.
void Draw (const G4Circle&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Square&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Polymarker&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Polyhedron&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4NURBS&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
// //////////////////////////////////////////////////////////////////
// Now functions for drawing a GEANT4 geometry object. Note that
void Draw (const G4Polyhedron&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Polyline&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Polymarker&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Scale&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Square&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4Text&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
////////////////////////////////////////////////////////////////////
// Now functions that implement the pure virtual functions of
// G4VVisManager for drawing a GEANT4 geometry object. Note that
// the 2nd argument overrides any visualization attributes that are
// associated with the object itself.
void Draw (const G4VSolid&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4LogicalVolume&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4VPhysicalVolume&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
void Draw (const G4VSolid&, const G4VisAttributes&,
const G4Transform3D& objectTransformation = G4Transform3D::Identity);
////////////////////////////////////////////////////////////////////////
// Now other pure virtual functions of G4VVisManager...
void GeometryHasChanged ();
// Used by run manager to notify change.
////////////////////////////////////////////////////////////////////////
// Administration routines.
void CopyViewParameters ();
// Copy view parameters of current viewer into current view parameters.
void CreateSceneHandler (G4String name = "");
// Creates scene handler for the current system.
@@ -253,26 +237,18 @@ public: // With description
void DeleteCurrentViewer ();
// Leaves current scene and view undefined!
void GeometryHasChanged ();
// Used by run manager to notify change.
void RefreshCurrentView ();
// Soft clear, then redraw.
private:
void BeginOfRun ();
void BeginOfEvent ();
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;
void EndOfRun ();
public: // With description
@@ -287,24 +263,27 @@ public: // With description
G4Scene* GetCurrentScene () const;
G4VSceneHandler* GetCurrentSceneHandler () const;
G4VViewer* GetCurrentViewer () const;
const G4ViewParameters& GetCurrentViewParameters () const;
const G4GraphicsSystemList& GetAvailableGraphicsSystems ();
// The above is non-const because it checks and updates the List by
// calling RegisterGraphicsSystems() if no graphics systems are
// already registered.
const G4SceneHandlerList& GetAvailableSceneHandlers () const;
const G4SceneList& GetSceneList () const;
G4int GetVerboseLevel () const;
Verbosity GetVerbosity () const;
void GetWindowSizeHint (G4int& xHint, G4int& yHint) const;
// Note: GetWindowSizeHint information is returned via the G4int& arguments.
void SetCurrentGraphicsSystemAndCreateViewer
(G4VGraphicsSystem* pSystem);
void SetCurrentGraphicsSystem (G4VGraphicsSystem* pSystem);
void SetCurrentScene (G4Scene*);
void SetCurrentSceneHandler (G4VSceneHandler* pScene);
void SetCurrentViewer (G4VViewer* pView);
G4ViewParameters& SetCurrentViewParameters (); // Returns lvalue.
G4SceneHandlerList& SetAvailableSceneHandlers (); // Returns lvalue.
G4SceneList& SetSceneList (); // Returns lvalue.
void SetVerboseLevel (G4int vLevel);
void SetVerboseLevel (G4int);
void SetVerboseLevel (const G4String&);
void SetVerboseLevel (Verbosity);
void SetWindowSizeHint (G4int xHint, G4int yHint);
/////////////////////////////////////////////////////////////////////
@@ -318,11 +297,18 @@ public: // With description
// Returns zero if not found. Can use long or short name, but find
// is done on short name.
G4bool IsValidView ();
// True if view is valid. Prints messages and sanitises varoius data.
static Verbosity GetVerbosityValue(const G4String&);
// Returns verbosity given a string. (Uses first character only.)
static void PrintCommandDeprecation(const G4String&);
// Temporary deprecation printing.
static Verbosity GetVerbosityValue(G4int);
// Returns verbosity given an integer. If integer is out of range,
// selects verbosity at extreme of range.
static G4String VerbosityString(Verbosity);
// Converts the verbosity into a string for suitable for printing.
static G4String VerbosityGuidanceString;
// Guidance on the use of visualization verbosity.
protected:
@@ -332,6 +318,12 @@ protected:
void PrintInstalledGraphicsSystems () const;
void PrintAvailableGraphicsSystems () const;
void PrintInvalidPointers () const;
G4bool IsValidView ();
// True if view is valid. Prints messages and sanitises various data.
void ClearTransientStoreIfMarked();
// Clears transient store of current scene handler if it is marked
// for clearing. Assumes view is valid.
static G4VisManager* fpInstance; // Pointer to single instance.
G4bool fInitialised;
G4VGraphicsSystem* fpGraphicsSystem; // Current graphics system.
@@ -341,12 +333,16 @@ protected:
G4GraphicsSystemList fAvailableGraphicsSystems;
G4SceneList fSceneList;
G4SceneHandlerList fAvailableSceneHandlers;
G4ViewParameters fVP; // Current viewing parameters.
G4int fVerbose; // Verbosity level 0-10.
G4VisManMessenger* fpMessenger; // Pointer to messenger.
Verbosity fVerbosity;
const G4int fVerbose;
// fVerbose is kept for backwards compatibility for some user
// examples. (It is used in the derived user vis managers to print
// available graphics systems.) It is initialised to 1 in the
// constructor and cannot be changed.
G4std::vector<G4UImessenger*> fMessengerList;
G4std::vector<G4UIcommand*> fDirectoryList;
G4VisStateDependent* fpStateDependent; // Friend state dependent class.
G4int fWindowSizeHintX, fWindowSizeHintY; // For viewer construction.
};
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisManager.icc,v 1.5.4.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisManager.icc,v 1.8 2001/08/05 02:29:05 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
@@ -43,11 +43,6 @@ inline G4Scene* G4VisManager::GetCurrentScene () const {
return fpScene;
}
inline const G4ViewParameters&
G4VisManager::GetCurrentViewParameters () const {
return fVP;
}
inline const G4SceneHandlerList&
G4VisManager::GetAvailableSceneHandlers () const {
return fAvailableSceneHandlers;
@@ -62,18 +57,19 @@ G4VisManager::GetCurrentGraphicsSystem () const {
return fpGraphicsSystem;
}
inline G4int G4VisManager::GetVerboseLevel () const {
return fVerbose;
inline G4VisManager::Verbosity G4VisManager::GetVerbosity () const {
return fVerbosity;
}
inline void G4VisManager::GetWindowSizeHint
(G4int& xHint, G4int& yHint) const {
xHint = fWindowSizeHintX; yHint = fWindowSizeHintY;
}
inline void G4VisManager::SetCurrentScene (G4Scene* pScene) {
fpScene = pScene;
}
inline G4ViewParameters& G4VisManager::SetCurrentViewParameters () {
return fVP;
}
inline G4SceneList& G4VisManager::SetSceneList () {
return fSceneList;
}
@@ -82,6 +78,10 @@ inline G4SceneHandlerList& G4VisManager::SetAvailableSceneHandlers () {
return fAvailableSceneHandlers;
}
inline void G4VisManager::SetVerboseLevel (G4int vLevel) {
fVerbose = vLevel;
inline void G4VisManager::SetVerboseLevel (G4VisManager::Verbosity verbosity) {
fVerbosity = verbosity;
}
inline void G4VisManager::SetWindowSizeHint (G4int xHint, G4int yHint) {
fWindowSizeHintX = xHint; fWindowSizeHintY = yHint;
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisStateDependent.hh,v 1.3.4.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisStateDependent.hh,v 1.4 2001/07/11 10:09:17 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
// A "state dependent" service class for G4VisManager.
// John Allison 29th November 1999
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: G4VisToOldVisCommands.hh,v 1.5.2.1 2001/06/28 19:16:11 gunter Exp $
// GEANT4 tag $Name: $
// $Id: G4VisToOldVisCommands.hh,v 1.6 2001/07/11 10:09:17 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// Implements some /vis/ commands as /vis~/ temporarily.
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: MyVisManager.cc,v 1.8.2.1 2001/06/28 19:16:12 gunter Exp $
// GEANT4 tag $Name: $
// $Id: MyVisManager.cc,v 1.16 2001/11/15 14:39:27 johna Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 24th January 1998.
@@ -31,22 +31,21 @@
// Supported drivers...
#ifdef G4VIS_USE_ASCIITREE
// Not needing external packages or libraries...
#include "G4ASCIITree.hh"
#endif
#include "G4DAWNFILE.hh"
#include "G4GAGTree.hh"
#include "G4HepRepFile.hh"
#include "G4RayTracer.hh"
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
// Needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
#include "G4FukuiRenderer.hh"
#endif
#ifdef G4VIS_USE_DAWNFILE
#include "G4DAWNFILE.hh"
#endif
#ifdef G4VIS_USE_GAGTREE
#include "G4GAGTree.hh"
#endif
#ifdef G4VIS_USE_OPACS
#include "G4Wo.hh"
#include "G4Xo.hh"
@@ -75,40 +74,31 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYTRACER
#include "G4RayTracer.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#include "G4VRML2.hh"
#endif
#ifdef G4VIS_USE_VRMLFILE
#include "G4VRML1File.hh"
#include "G4VRML2File.hh"
#endif
MyVisManager::MyVisManager () {}
void MyVisManager::RegisterGraphicsSystems () {
#ifdef G4VIS_USE_ASCIITREE
// Graphics Systems not needing external packages or libraries...
RegisterGraphicsSystem (new G4ASCIITree);
#endif
RegisterGraphicsSystem (new G4DAWNFILE);
RegisterGraphicsSystem (new G4GAGTree);
RegisterGraphicsSystem (new G4HepRepFile);
RegisterGraphicsSystem (new G4RayTracer);
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
// Graphics systems needing external packages or libraries...
#ifdef G4VIS_USE_DAWN
RegisterGraphicsSystem (new G4FukuiRenderer);
#endif
#ifdef G4VIS_USE_DAWNFILE
RegisterGraphicsSystem (new G4DAWNFILE);
#endif
#ifdef G4VIS_USE_GAGTREE
RegisterGraphicsSystem (new G4GAGTree);
#endif
#ifdef G4VIS_USE_OPACS
RegisterGraphicsSystem (new G4Wo);
RegisterGraphicsSystem (new G4Xo);
@@ -137,24 +127,8 @@ void MyVisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYTRACER
RegisterGraphicsSystem (new G4RayTracer);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
RegisterGraphicsSystem (new G4VRML2);
#endif
#ifdef G4VIS_USE_VRMLFILE
RegisterGraphicsSystem (new G4VRML1File);
RegisterGraphicsSystem (new G4VRML2File);
#endif
if (fVerbose > 0) {
G4cout <<
"\nYou have successfully chosen to use the following graphics systems."
<< G4endl;
PrintAvailableGraphicsSystems ();
}
}
@@ -21,8 +21,8 @@
// ********************************************************************
//
//
// $Id: MyVisManager.hh,v 1.4.4.1 2001/06/28 19:16:12 gunter Exp $
// GEANT4 tag $Name: $
// $Id: MyVisManager.hh,v 1.5 2001/07/11 10:09:17 gunter Exp $
// GEANT4 tag $Name: geant4-04-00 $
//
//
// John Allison 24th January 1998.