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,12 +1,12 @@
// 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: G4GraphicsSystemList.hh,v 1.2 1999/01/09 16:30:38 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4GraphicsSystemList.hh,v 1.3.2.1 1999/12/07 20:53:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 2nd April 1996
@@ -14,10 +14,10 @@
#ifndef G4GRAPHICSSYSTEMLIST_HH
#define G4GRAPHICSSYSTEMLIST_HH
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
#include "G4VGraphicsSystem.hh"
class G4GraphicsSystemList: public RWTPtrOrderedVector<G4VGraphicsSystem> {
class G4GraphicsSystemList: public G4RWTPtrOrderedVector<G4VGraphicsSystem> {
};
#endif
@@ -1,16 +1,18 @@
// 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: G4Scene.hh,v 1.3 1999/05/25 09:14:06 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Scene.hh,v 1.6.2.1 1999/12/07 20:53:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Scene John Allison 19th July 1996.
//
// Class Description:
//
// Defines the viewable scene.
#ifndef G4SCENE_HH
@@ -24,11 +26,11 @@ class G4VPhysicalVolume;
#include "G4VisExtent.hh"
#include "G4Point3D.hh"
#include "G4VModel.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4Scene {
public:
public: // With description
friend ostream& operator << (ostream& os, const G4Scene& d);
@@ -50,11 +52,11 @@ public:
G4bool IsEmpty () const;
const RWTPtrOrderedVector <G4VModel>& GetRunDurationModelList () const;
const G4RWTPtrOrderedVector <G4VModel>& GetRunDurationModelList () const;
// Contains models which are expected to last for the duration of
// the run, for example geometry volumes.
const RWTPtrOrderedVector <G4VModel>& GetEndOfEventModelList () const;
const G4RWTPtrOrderedVector <G4VModel>& GetEndOfEventModelList () const;
// Contains models which are described at the end of event when the
// scene is current.
@@ -67,23 +69,26 @@ public:
//////////////////////////////////////////////
// Add, Set, Clear functions...
void AddRunDurationModel (G4VModel*);
G4bool AddRunDurationModel (G4VModel*);
// 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.
void AddWorldIfEmpty ();
G4bool AddWorldIfEmpty ();
// 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.
void AddEndOfEventModel (G4VModel*);
G4bool AddEndOfEventModel (G4VModel*);
// 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.
RWTPtrOrderedVector <G4VModel>& SetRunDurationModelList ();
G4RWTPtrOrderedVector <G4VModel>& SetRunDurationModelList ();
// Allows you to change the model list - do with care!
RWTPtrOrderedVector <G4VModel>& SetEndOfEventModelList ();
G4RWTPtrOrderedVector <G4VModel>& SetEndOfEventModelList ();
// Allows you to change the model list - do with care!
void Clear ();
@@ -91,8 +96,8 @@ public:
private:
G4String fName;
RWTPtrOrderedVector <G4VModel> fRunDurationModelList;
RWTPtrOrderedVector <G4VModel> fEndOfEventModelList;
G4RWTPtrOrderedVector <G4VModel> fRunDurationModelList;
G4RWTPtrOrderedVector <G4VModel> fEndOfEventModelList;
G4VisExtent fExtent;
G4Point3D fStandardTargetPoint;
};
@@ -1,12 +1,12 @@
// 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: G4Scene.icc,v 1.2 1999/05/25 09:14:08 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4Scene.icc,v 1.4.2.1 1999/12/07 20:53:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Scene data John Allison 19th July 1996.
@@ -24,12 +24,12 @@ inline G4bool G4Scene::IsEmpty () const {
fEndOfEventModelList.entries () == 0;
}
inline const RWTPtrOrderedVector <G4VModel>&
inline const G4RWTPtrOrderedVector <G4VModel>&
G4Scene::GetRunDurationModelList () const {
return fRunDurationModelList;
}
inline const RWTPtrOrderedVector <G4VModel>&
inline const G4RWTPtrOrderedVector <G4VModel>&
G4Scene::GetEndOfEventModelList () const {
return fEndOfEventModelList;
}
@@ -42,16 +42,12 @@ inline const G4Point3D& G4Scene::GetStandardTargetPoint () const {
return fStandardTargetPoint;
}
inline RWTPtrOrderedVector <G4VModel>& G4Scene::SetRunDurationModelList ()
inline G4RWTPtrOrderedVector <G4VModel>& G4Scene::SetRunDurationModelList ()
{
return fRunDurationModelList;
}
inline RWTPtrOrderedVector <G4VModel>& G4Scene::SetEndOfEventModelList ()
inline G4RWTPtrOrderedVector <G4VModel>& G4Scene::SetEndOfEventModelList ()
{
return fRunDurationModelList;
}
inline void G4Scene::AddEndOfEventModel (G4VModel* pModel) {
fEndOfEventModelList.append (pModel);
}
@@ -1,12 +1,12 @@
// 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: G4SceneHandlerList.hh,v 1.1 1999/01/09 16:30:42 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SceneHandlerList.hh,v 1.2.2.1 1999/12/07 20:53:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison May 1996
@@ -14,10 +14,10 @@
#ifndef G4SCENEHANDLERLIST_HH
#define G4SCENEHANDLERLIST_HH
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
#include "G4VSceneHandler.hh"
class G4SceneHandlerList: public RWTPtrOrderedVector<G4VSceneHandler> {
class G4SceneHandlerList: public G4RWTPtrOrderedVector<G4VSceneHandler> {
};
#endif
@@ -1,12 +1,12 @@
// 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: G4SceneList.hh,v 1.3 1999/01/11 00:48:14 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4SceneList.hh,v 1.4.2.1 1999/12/07 20:53:49 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 9th August 1998
@@ -15,8 +15,8 @@
#define G4SCENELIST_HH
#include "G4Scene.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4SceneList: public RWTPtrOrderedVector <G4Scene> {};
class G4SceneList: public G4RWTPtrOrderedVector <G4Scene> {};
#endif
@@ -1,15 +1,18 @@
// 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: G4VGraphicsSystem.hh,v 1.3 1999/01/11 00:48:14 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VGraphicsSystem.hh,v 1.5.2.1 1999/12/07 20:53:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 27th March 1996
//
// Class description
//
// Abstract interface class for graphics systems.
#ifndef G4VGRAPHICSSYSTEM_HH
@@ -22,7 +25,7 @@ class G4VViewer;
class G4VGraphicsSystem {
public:
public: // With description
enum Functionality {
noFunctionality,
@@ -47,7 +50,7 @@ public:
virtual ~G4VGraphicsSystem ();
// For RWTPtrOrderedVector...
// For G4RWTPtrOrderedVector...
G4bool operator == (const G4VGraphicsSystem& system) const;
virtual G4VSceneHandler* CreateSceneHandler (const G4String& name) = 0;
@@ -1,12 +1,12 @@
// 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: G4VGraphicsSystem.icc,v 1.3 1999/05/10 14:04:03 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VGraphicsSystem.icc,v 1.3.8.1 1999/12/07 20:53:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 27th March 1996
@@ -1,17 +1,20 @@
// 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: G4VSceneHandler.hh,v 1.4 1999/05/12 13:57:25 barrand Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VSceneHandler.hh,v 1.8.2.1 1999/12/07 20:53:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 19th July 1996.
//
// Class description
//
// Abstract interface class for graphics scene handlers.
// Inherits from G4VGraphicsScene, in the graphics_reps component, which is
// Inherits from G4VGraphicsScene, in the intercoms category, which is
// a minimal abstract interface for the GEANT4 kernel.
#ifndef G4VSCENEHANDLER_HH
@@ -39,13 +42,6 @@
class G4VGraphicsSystem;
class G4VViewer;
class G4VSolid;
class G4Polyline;
class G4Text;
class G4Circle;
class G4Square;
class G4Polymarker;
class G4Polyhedron;
class G4NURBS;
class G4VisAttributes;
class G4Colour;
class G4Visible;
@@ -55,17 +51,19 @@ class G4LogicalVolume;
class G4VSceneHandler: public G4VGraphicsScene {
friend ostream& operator << (ostream& os, const G4VSceneHandler& s);
public: // With description
public:
friend ostream& operator << (ostream& os, const G4VSceneHandler& s);
enum MarkerSizeType {world, screen};
G4VSceneHandler (G4VGraphicsSystem& system, G4int id, const G4String& name = "");
G4VSceneHandler (G4VGraphicsSystem& system,
G4int id,
const G4String& name = "");
virtual ~G4VSceneHandler ();
// For RWTPtrOrderedVector...
// For G4RWTPtrOrderedVector...
G4bool operator == (const G4VSceneHandler& scene) const;
//////////////////////////////////////////////////////////////
@@ -103,15 +101,16 @@ public:
// coordinate system of the object about to be added, and visAttribs
// is its visualization attributes.
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXScene::PreAddThis (const G4Transform3D& objectTransformation,
// const G4VisAttributes& visAttribs) {
// void MyXXXSceneHandler::PreAddThis
// (const G4Transform3D& objectTransformation,
// const G4VisAttributes& visAttribs) {
// G4VSceneHandler::PreAddThis (objectTransformation, visAttribs);
// ...
// }
virtual void PostAddThis ();
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXScene::PostAddThis () {
// void MyXXXSceneHandler::PostAddThis () {
// ...
// G4VSceneHandler::PostAddThis (objectTransformation, visAttribs);
// }
@@ -135,7 +134,7 @@ public:
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXScene::BeginPrimitives
// void MyXXXSceneHandler::BeginPrimitives
// (const G4Transform3D& objectTransformation) {
// G4VSceneHandler::BeginPrimitives (objectTransformation);
// ...
@@ -143,18 +142,19 @@ public:
virtual void EndPrimitives ();
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXScene::EndPrimitives () {
// void MyXXXSceneHandler::EndPrimitives () {
// ...
// G4VSceneHandler::EndPrimitives ();
// }
virtual void AddPrimitive (const G4Polyline&) = 0;
virtual void AddPrimitive (const G4Text&) = 0;
virtual void AddPrimitive (const G4Circle&) = 0;
virtual void AddPrimitive (const G4Square&) = 0;
virtual void AddPrimitive (const G4Polymarker&); // Uses the above.
virtual void AddPrimitive (const G4Polyhedron&) = 0;
virtual void AddPrimitive (const G4NURBS&) = 0;
virtual void AddPrimitive (const G4Polyline&) = 0;
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 G4Polyhedron&) = 0;
virtual void AddPrimitive (const G4NURBS&) = 0;
//////////////////////////////////////////////////////////////
// Access functions.
@@ -218,8 +218,22 @@ public:
G4int IncrementViewCount ();
virtual void ClearStore ();
// Clears graphics database (display lists) if any. This base class
// implements some common functionality so...
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXSceneHandler::ClearStore () {
// G4VSceneHandler::ClearStore ();
// ...
// }
virtual void ClearTransientStore ();
// Clears graphics database (display lists) if any.
// Clears transient part of graphics database (display lists) if any.
// This base class implements some common functionality so...
// IMPORTANT: invoke this from your polymorphic versions, e.g.:
// void MyXXXSceneHandler::ClearTransientStore () {
// G4VSceneHandler::ClearTransientStore ();
// ...
// }
void AddViewerToList (G4VViewer* pView); // Add view to view List.
void RemoveViewerFromList (G4VViewer* pView); // Remove view from view List.
@@ -1,33 +1,21 @@
// 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: G4VSceneHandler.icc,v 1.5 1999/05/12 13:57:26 barrand Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VSceneHandler.icc,v 1.6.6.1 1999/12/07 20:53:50 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 19th July 1996.
inline G4bool G4VSceneHandler::operator == (const G4VSceneHandler& scene) const {
inline G4bool G4VSceneHandler::operator ==
(const G4VSceneHandler& scene) const {
return this == &scene;
}
inline void G4VSceneHandler::EndModeling () {}
inline void G4VSceneHandler::PreAddThis (const G4Transform3D& objectTransformation,
const G4VisAttributes& visAttribs) {
fpObjectTransformation = &objectTransformation;
fpVisAttribs = &visAttribs;
}
inline void G4VSceneHandler::PostAddThis () {}
inline void G4VSceneHandler::ClearStore () {}
inline void G4VSceneHandler::ClearTransientStore () {}
inline G4VGraphicsSystem* G4VSceneHandler::GetGraphicsSystem () const {
return &fSystem;
}
@@ -41,14 +29,14 @@ inline G4int G4VSceneHandler::GetViewCount () const {
}
inline
G4double G4VSceneHandler::GetMarkerDiameter (const G4VMarker& marker,
G4VSceneHandler::MarkerSizeType& sizeType) {
G4double G4VSceneHandler::GetMarkerDiameter
(const G4VMarker& marker, G4VSceneHandler::MarkerSizeType& sizeType) {
return GetMarkerSize (marker, sizeType);
}
inline
G4double G4VSceneHandler::GetMarkerRadius (const G4VMarker& marker,
G4VSceneHandler::MarkerSizeType& sizeType) {
G4double G4VSceneHandler::GetMarkerRadius
(const G4VMarker& marker, G4VSceneHandler::MarkerSizeType& sizeType) {
return GetMarkerSize (marker, sizeType) / 2.;
}
@@ -1,15 +1,18 @@
// 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: G4VViewer.hh,v 1.2 1999/01/11 00:48:16 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VViewer.hh,v 1.4.2.1 1999/12/07 20:53:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 27th March 1996
//
// Class description
//
// Abstract interface class for graphics viewers.
#ifndef G4VVIEWER_HH
@@ -23,14 +26,14 @@ class G4VSceneHandler;
class G4VViewer {
friend ostream& operator << (ostream& os, const G4VViewer& v);
public: // With description
public:
friend ostream& operator << (ostream& os, const G4VViewer& v);
G4VViewer (G4VSceneHandler& scene, G4int id, const G4String& name = "");
virtual ~G4VViewer ();
// For RWTPtrOrderedVector...
// For G4RWTPtrOrderedVector...
G4bool operator == (const G4VViewer& view) const;
//////////////////////////////////////////////////////////////
@@ -1,12 +1,12 @@
// 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: G4VViewer.icc,v 1.2 1999/01/11 00:48:17 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VViewer.icc,v 1.2.8.1 1999/12/07 20:53:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 30th December 1996
@@ -1,12 +1,12 @@
// 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: G4VVisCommand.hh,v 1.3 1999/05/10 14:04:05 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VVisCommand.hh,v 1.4.4.1 1999/12/07 20:53:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// Base class for visualization commands - John Allison 9th August 1998
// It is really a messenger - we have one command per messenger.
@@ -29,6 +29,7 @@ public:
protected:
static G4VisManager* fpVisManager;
// Commands which need to be accessed by other messengers...
static G4UIcmdWithAString* fpCommandSceneEdit;
static G4UIcmdWithAString* fpCommandSceneNotifyHandlers;
static G4UIcmdWithAString* fpCommandSceneRemove;
static G4UIcmdWithAString* fpCommandSceneSelect;
@@ -38,6 +39,7 @@ protected:
static G4UIcommand* fpCommandViewerCreate;
static G4UIcmdWithAString* fpCommandViewerRemove;
static G4UIcmdWithAString* fpCommandViewerSelect;
static G4UIcmdWithAString* fpCommandViewerUpdate;
};
#include "G4VVisCommand.icc"
@@ -1,12 +1,12 @@
// 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: G4VVisCommand.icc,v 1.2 1999/01/09 16:30:51 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VVisCommand.icc,v 1.2.8.1 1999/12/07 20:53:51 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// Base class for visualization commands - John Allison 9th August 1998
// It is really a messenger - we have one command per messenger.
@@ -1,79 +1,80 @@
// 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: G4ViewParameters.hh,v 1.3 1999/05/25 09:14:09 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ViewParameters.hh,v 1.5.2.1 1999/12/07 20:53:52 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 19th July 1996
//
// Class description
//
// View parameters and options.
//
// THE STANDARD VIEW AND ALL THAT.
//
// In GEANT4 visualization, we have the concept of a ``Standard
// View''. This is the view when the complete set of objects being
// viewed is comfortably in view from any viewpoint. It is defined by
// the ``Bounding Sphere'' of ``visible'' objects when initially
// registered in the scene, and by the View Parameters.
//
// There is also the ``Standard Target Point'', which is the centre of
// the Bounding Sphere (note that this belongs to the scene and is
// stored in the G4Scene object). The ``Current Target Point'', initially
// set to the Standard Target Point, is incremented by the ``dolly''
// and ``zoom'' commands, and can be reset to the Standard Target
// Point with the {\tt /vis~/camera/reset} command.
//
// Also, the ``Standard Camera Position'' is the ``Standard Camera
// Distance'' along the Viewpoint Direction vector from the Standard
// Target Point. The Standard Camera Distance is the radius of the
// Bounding Sphere divided by {\tt fFieldHalfAngle}. It is not stored
// explicitly because of the singularity at {\tt fFieldHalfAngle} = 0,
// which implies parallel projection.
//
// Similarly, the ``Current Camera Position'' is the ``Current Camera
// Distance'' along the Viewpoint Direction vector from the Current
// Target Point. The Current Camera Distance is given by the formulae
// below, but note that it can be negative, meaning that the camera
// has moved {\em beyond} the Current Target Point, which is
// conceptually possible, but which might give some problems when
// setting up the view matrix --- see, for example, {\tt
// G4OpenGLView::SetView ()}.
//
// All viewers are expected to keep the ``Up Vector'' vertical.
//
// Finally, the view is magnified by the ``Zoom Factor'' which is
// reset to 1 by the \linebreak {\tt /vis~/camera/reset} command.
//
// Note: the camera movements pan, dolly and zoom, are currently coded
// in \linebreak {\tt G4VisManMessenger.cc}.
//
// The algorithms for calculating various useful quantities from the
// View Parameters are encapsulated in the functions described in
// Appendix \ref{ap:useful}.
#ifndef G4VIEWPARAMETERS_HH
#define G4VIEWPARAMETERS_HH
#include <rw/tvordvec.h>
#include "g4rw/tvordvec.h"
#include "G4Vector3D.hh"
#include "G4Point3D.hh"
#include "G4Plane3D.hh"
#include "G4VisAttributes.hh"
#include "G4VMarker.hh"
typedef RWTValOrderedVector<G4Plane3D> G4Planes;
//. % THE STANDARD VIEW AND ALL THAT.
//.
//. In GEANT4 visualization, we have the concept of a ``Standard View''.
//. This is the view when the complete set of objects being viewed is
//. comfortably in view from any viewpoint. It is defined by the
//. ``Bounding Sphere'' of ``visible'' objects when initially registered
//. in the scene, and the View Parameters.
//.
//. There is also the ``Standard Target Point'', which is the centre
//. of the Bounding Sphere (note that these belong to the scene, and are
//. stored in the Scene Data). The ``Current Target Point'', initially
//. set to the Standard Target Point, is incremented by the
//. ``dolly'' and ``zoom'' commands, and can be reset to the
//. Standard Target Point with the {\tt /vis~/camera/reset} command.
//.
//. Also, the ``Standard Camera Position'' is the ``Standard Camera
//. Distance'' along
//. the Viewpoint Direction vector from the Standard Target Point.
//. The Standard Camera Distance is the radius of the
//. Bounding Sphere divided by {\tt fFieldHalfAngle}. It is not stored
//. explicitly because of the singularity at {\tt fFieldHalfAngle} = 0,
//. which implies parallel projection.
//.
//. Similarly, the ``Current Camera Position'' is the ``Current
//. Camera Distance''
//. along the Viewpoint Direction vector from the Current Target Point.
//. The Current Camera Distance is given by the formulae below, but
//. note that it can be negative, meaning that the camera has
//. moved {\em beyond} the Current Target Point, which is conceptually
//. possible, but which might give some problems when setting up
//. the view matrix --- see, for example, {\tt G4OpenGLView::SetView ()}.
//.
//. All views are expected to keep the ``Up Vector'' vertical.
//.
//. Finally, the view is magnified by the ``Zoom Factor'' which is
//. reset to 1 by the \linebreak
//. {\tt /vis~/camera/reset} command.
//.
//. Note: the camera movements pan, dolly and zoom, are currently coded in
//. \linebreak {\tt G4VisManMessenger.cc}.
//.
//. The algorithms for calculating various useful quantities from the
//. View Parameters are encapsulated in the functions described in
//. Appendix \ref{ap:useful}.
typedef G4RWTValOrderedVector<G4Plane3D> G4Planes;
class G4ViewParameters {
friend ostream& operator << (ostream& os, const G4ViewParameters& v);
public: // With description
public:
friend ostream& operator << (ostream& os, const G4ViewParameters& v);
enum DrawingStyle {
wireframe, // Draw edges - no hidden line removal.
@@ -1,12 +1,12 @@
// 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: G4ViewParameters.icc,v 1.2 1999/01/09 16:30:52 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ViewParameters.icc,v 1.2.8.1 1999/12/07 20:53:53 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 20th October 1996
@@ -1,12 +1,12 @@
// 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: G4ViewerList.hh,v 1.1 1999/01/09 16:30:53 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4ViewerList.hh,v 1.2.2.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison May 1996
@@ -14,9 +14,9 @@
#ifndef G4VIEWERLIST_HH
#define G4VIEWERLIST_HH
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
#include "G4VViewer.hh"
class G4ViewerList: public RWTPtrOrderedVector<G4VViewer> {};
class G4ViewerList: public G4RWTPtrOrderedVector<G4VViewer> {};
#endif
@@ -1,12 +1,12 @@
// 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: G4VisCommandTemplates.hh,v 1.2 1999/01/09 16:30:53 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandTemplates.hh,v 1.2.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Visualization Command Messenger Templates.
@@ -1,12 +1,12 @@
// 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: G4VisCommandTemplates.icc,v 1.2 1999/01/09 16:30:54 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandTemplates.icc,v 1.2.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Command Messenger Templates.
@@ -1,12 +1,12 @@
// 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: G4VisCommandsCamera.hh,v 1.2 1999/01/09 16:30:55 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsCamera.hh,v 1.2.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/camera/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsCameraMessengers.hh,v 1.2 1999/01/09 16:30:55 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsCameraMessengers.hh,v 1.2.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Messengers for /vis~/camera commands - John Allison 6th April 1998.
@@ -1,12 +1,12 @@
// 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: G4VisCommandsClear.hh,v 1.3 1999/01/11 00:48:19 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsClear.hh,v 1.3.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/clear/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsCopy.hh,v 1.3 1999/01/11 00:48:23 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsCopy.hh,v 1.3.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/copy/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsCreateScene.hh,v 1.2 1999/01/09 16:30:57 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsCreateScene.hh,v 1.2.8.1 1999/12/07 20:53:54 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/create_scene/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsCreateView.hh,v 1.3 1999/01/11 00:48:24 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsCreateView.hh,v 1.3.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/create_view/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsDelete.hh,v 1.3 1999/01/11 00:48:24 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsDelete.hh,v 1.3.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/delete/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsDraw.hh,v 1.2 1999/01/09 16:30:59 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsDraw.hh,v 1.2.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/draw/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsLights.hh,v 1.3 1999/01/11 00:48:25 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsLights.hh,v 1.3.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/lights/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsPrint.hh,v 1.2 1999/01/09 16:31:00 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsPrint.hh,v 1.2.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/print/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsRefresh.hh,v 1.2 1999/01/09 16:31:00 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsRefresh.hh,v 1.2.8.1 1999/12/07 20:53:55 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/refresh/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsScene.hh,v 1.5 1999/05/10 14:04:06 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsScene.hh,v 1.7.4.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// /vis/scene commands - John Allison 9th August 1998
@@ -25,8 +25,9 @@ public:
G4VVisCommandScene ();
~G4VVisCommandScene ();
protected:
G4String CurrentSceneName ();
void UpdateCandidateLists ();
void UpdateVisManagerSceneAndViewParameters (const G4String& sceneName = "");
void UpdateVisManagerScene (const G4String& sceneName = "");
};
class G4VisCommandSceneCreate: public G4VVisCommandScene {
@@ -42,6 +43,17 @@ private:
G4int fId;
};
class G4VisCommandSceneEdit: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
G4VisCommandSceneEdit ();
~G4VisCommandSceneEdit ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
class G4VisCommandSceneList: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
@@ -1,12 +1,12 @@
// 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: G4VisCommandsSceneAdd.hh,v 1.2 1999/01/09 16:31:02 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsSceneAdd.hh,v 1.3.6.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// /vis/scene commands - John Allison 9th August 1998
@@ -26,6 +26,17 @@ private:
G4UIcommand* fpCommand;
};
class G4VisCommandSceneAddLogicalVolume: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
G4VisCommandSceneAddLogicalVolume ();
~G4VisCommandSceneAddLogicalVolume ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4UIcommand* fpCommand;
};
class G4VisCommandSceneAddGhosts: public G4VVisCommandScene {
public:
// Uses compiler defaults for copy constructor and assignment.
@@ -1,12 +1,12 @@
// 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: G4VisCommandsSceneHandler.hh,v 1.3 1999/05/10 14:04:08 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsSceneHandler.hh,v 1.3.8.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// /vis/sceneHandler commands - John Allison 10th October 1998
@@ -1,12 +1,12 @@
// 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: G4VisCommandsSceneInclude.hh,v 1.2 1999/01/09 16:31:03 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsSceneInclude.hh,v 1.2.8.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// /vis/scene commands - John Allison 9th August 1998
@@ -1,12 +1,12 @@
// 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: G4VisCommandsSet.hh,v 1.3 1999/01/11 00:48:26 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsSet.hh,v 1.3.8.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/set/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsShow.hh,v 1.2 1999/01/09 16:31:04 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsShow.hh,v 1.2.8.1 1999/12/07 20:53:56 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// /vis~/show/ commands
@@ -1,12 +1,12 @@
// 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: G4VisCommandsViewer.hh,v 1.3 1999/05/10 14:04:09 johna Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisCommandsViewer.hh,v 1.4.4.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
// /vis/viewer commands - John Allison 25th October 1998
@@ -76,4 +76,15 @@ private:
G4UIcmdWithAString* fpCommand;
};
class G4VisCommandViewerUpdate: public G4VVisCommandViewer {
public:
// Uses compiler defaults for copy constructor and assignment.
G4VisCommandViewerUpdate ();
~G4VisCommandViewerUpdate ();
G4String GetCurrentValue (G4UIcommand* command);
void SetNewValue (G4UIcommand* command, G4String newValue);
private:
G4UIcmdWithAString* fpCommand;
};
#endif
@@ -1,12 +1,12 @@
// 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: G4VisFeaturesOfDAWNFILE.hh,v 1.2 1999/01/09 16:31:05 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisFeaturesOfDAWNFILE.hh,v 1.2.8.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
#ifndef G4VISFEATURESOFDAWNFILE_HH
#define G4VISFEATURESOFDAWNFILE_HH
@@ -1,12 +1,12 @@
// 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: G4VisFeaturesOfFukuiRenderer.hh,v 1.2 1999/01/09 16:31:06 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisFeaturesOfFukuiRenderer.hh,v 1.2.8.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
@@ -1,12 +1,12 @@
// 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: G4VisFeaturesOfOpenGL.hh,v 1.2 1999/01/09 16:31:06 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisFeaturesOfOpenGL.hh,v 1.2.8.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
@@ -1,12 +1,12 @@
// 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: G4VisFeaturesOfOpenInventor.hh,v 1.2 1999/01/09 16:31:07 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisFeaturesOfOpenInventor.hh,v 1.2.8.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
@@ -1,20 +0,0 @@
// This code implementation is the intellectual property of
// the RD44 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: G4VisFeaturesOfRay.hh,v 1.2 1999/01/09 16:31:08 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
//
//
#ifndef G4VISFEATURESRAY_HH
#define G4VISFEATURESRAY_HH
#include "globals.hh"
G4String G4VisFeaturesOfRayX ();
#endif
@@ -1,12 +1,12 @@
// 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: G4VisManMessenger.hh,v 1.2 1999/01/09 16:31:08 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisManMessenger.hh,v 1.3.2.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// GEANT4 Visualization Manager Messenger - John Allison 22nd July 1996.
@@ -17,7 +17,7 @@
#include "G4UImessenger.hh"
#include "globals.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4VisManager;
class G4UIcommand;
@@ -56,7 +56,7 @@ private:
G4bool ViewValid ();
void RotateViewpointAboutUpVectorBy (G4double dbeta);
G4VisManager* fpVMan;
RWTPtrOrderedVector <G4UIcommand> fCommandList;
G4RWTPtrOrderedVector <G4UIcommand> fCommandList;
};
#endif
@@ -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"
@@ -1,12 +1,12 @@
// 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.icc,v 1.4 1999/01/11 00:48:27 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisManager.icc,v 1.4.8.1 1999/12/07 20:53:57 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// GEANT4 Visualization Manager - John Allison 02/Jan/1996.
@@ -0,0 +1,34 @@
// 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: G4VisStateDependent.hh,v 1.2.2.1 1999/12/07 20:53:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
// A "state dependent" service class for G4VisManager.
// John Allison 29th November 1999
// 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 G4VISSTATEDEPENDENT_HH
#define G4VISSTATEDEPENDENT_HH
#include "G4VStateDependent.hh"
class G4VisManager;
class G4VisStateDependent: public G4VStateDependent {
friend class G4VisManager;
private:
G4VisStateDependent (G4VisManager *);
G4bool Notify (G4ApplicationState requestedState);
G4VisManager* fpVisManager;
};
#endif
@@ -1,12 +1,12 @@
// 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: G4VisToOldVisCommands.hh,v 1.2 1999/01/09 16:31:10 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: G4VisToOldVisCommands.hh,v 1.3.2.1 1999/12/07 20:53:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// Implements some /vis/ commands as /vis~/ temporarily.
@@ -18,7 +18,7 @@
#include "G4UImessenger.hh"
#include "globals.hh"
#include <rw/tpordvec.h>
#include "g4rw/tpordvec.h"
class G4VisToOldVisCommands: public G4UImessenger {
public:
@@ -1,12 +1,12 @@
// 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: MyVisManager.cc,v 1.2 1999/01/09 16:31:11 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: MyVisManager.cc,v 1.3.8.1 1999/12/07 20:53:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 24th January 1998.
@@ -51,10 +51,6 @@
#include "G4OpenInventorWin32.hh"
#endif
#ifdef G4VIS_USE_RAYX
#include "G4RayX.hh"
#endif
#ifdef G4VIS_USE_VRML
#include "G4VRML1.hh"
#include "G4VRML2.hh"
@@ -105,10 +101,6 @@ void MyVisManager::RegisterGraphicsSystems () {
RegisterGraphicsSystem (new G4OpenInventorWin32);
#endif
#ifdef G4VIS_USE_RAYX
RegisterGraphicsSystem (new G4RayX);
#endif
#ifdef G4VIS_USE_VRML
RegisterGraphicsSystem (new G4VRML1);
RegisterGraphicsSystem (new G4VRML2);
@@ -1,28 +1,32 @@
// 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: MyVisManager.hh,v 1.2 1999/01/09 16:31:11 allison Exp $
// GEANT4 tag $Name: geant4-00-01 $
// $Id: MyVisManager.hh,v 1.3.2.1 1999/12/07 20:53:58 gunter Exp $
// GEANT4 tag $Name: geant4-01-00 $
//
//
// John Allison 24th January 1998.
//
// Class description
//
// Example Visualization Manager implementing virtual function
// RegisterGraphicsSystems. Exploits C-pre-processor variables
// G4VIS_USE_DAWN, etc., which are set by the GNUmakefiles if
// environment variables of the same name are set.
//
// So all you have to do is set environment variables and compile and
// instantiate this in your main().
//
// Alternatively, you can implement an empty function here and just
// register the systems you want in your main(), e.g.:
// G4VisManager* myVisManager = new MyVisManager;
// myVisManager -> RegisterGraphicsSystem (new MyGraphicsSystem);
//
// See class description of G4VisManager for more details.
#ifndef MYEXAMPLEVISMANAGER_HH
#define MYEXAMPLEVISMANAGER_HH
@@ -31,7 +35,7 @@
class MyVisManager: public G4VisManager {
public:
public: // With description
MyVisManager ();
@@ -42,3 +46,4 @@ private:
};
#endif