Import Geant4 0.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2016-06-01 15:25:35 +02:00
parent 54d6b71f95
commit b97f8d0df7
3237 changed files with 807095 additions and 0 deletions
@@ -0,0 +1,37 @@
// 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: G4OpenInventor.hh,v 2.3 1998/12/08 09:51:33 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
// Guy Barrand 26 Mar 1998.
// OpenInventor graphics system factory.
#ifndef G4OPENINVENTOR_HH
#define G4OPENINVENTOR_HH
#if defined(G4VIS_BUILD_OI_DRIVER) || defined(G4VIS_USE_OI)
#include "G4VGraphicsSystem.hh"
class G4VInteractorManager;
class G4OpenInventor: public G4VGraphicsSystem {
public:
G4OpenInventor(const G4String,const G4String,G4VGraphicsSystem::Functionality);
G4VScene* CreateScene(const G4String& name = "");
G4VView* CreateView(G4VScene&,const G4String& name = "");
void SetInteractorManager(G4VInteractorManager*);
G4VInteractorManager* GetInteractorManager();
void InitHEPVis();
private:
G4VInteractorManager* interactorManager;
};
#endif
#endif
@@ -0,0 +1,91 @@
// 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: G4OpenInventorScene.hh,v 2.4 1998/12/04 13:16:36 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// J Kallenbach 27th Aug 1996
// OpenInventor scene - creates OpenInventor Display lists.
// 20 dec 1996 jck Add HEPVis primitives - trd, box, etc.
#ifndef G4OPENINVENTORSCENE_HH
#define G4OPENINVENTORSCENE_HH
#ifdef G4VIS_BUILD_OI_DRIVER
#include <rw/tvhdict.h>
#include <rw/tphdict.h>
#include "G4VScene.hh"
class G4OpenInventor;
class SoSeparator;
// Base class for various OpenInventorScene classes.
class G4OpenInventorScene: public G4VScene {
friend class G4OpenInventorView;
public:
typedef unsigned long G4VSolidPointer;
typedef const G4VPhysicalVolume* G4VPhysicalVolumePointer;
typedef SoSeparator* SoSeparatorPointer;
G4OpenInventorScene (G4OpenInventor& system, const G4String& name = "");
~G4OpenInventorScene ();
void AddPrimitive (const G4Polyline& line);
void AddPrimitive (const G4Text&);
void AddPrimitive (const G4Circle&);
void AddPrimitive (const G4Square&);
void AddPrimitive (const G4Polyhedron& p);
void AddPrimitive (const G4NURBS& nurb);
void AddPrimitive (const G4Polymarker&);
//
// Primitives for use of HEPVis
//
void AddThis (const G4Box & Box);
void AddThis (const G4Tubs & Tubs);
void AddThis (const G4Cons & Cons);
void AddThis (const G4Trd & Trd);
void AddThis (const G4Trap & Trap);
// Base class callbacks defined in G4OpenInventorScene.icc
void AddThis (const G4Sphere&);
void AddThis (const G4Para&);
void AddThis (const G4Torus&);
void AddThis (const G4VSolid&);
void BeginPrimitives (const G4Transform3D& objectTransformation);
void EndPrimitives ();
void EndModeling ();
static G4int GetSceneCount ();
void PreAddThis (const G4Transform3D& objectTransformation,
const G4VisAttributes& visAttribs);
private:
void ClearStore ();
void RequestPrimitives (const G4VSolid& solid);
static G4int fSceneIdCount; // static counter for OpenInventor scenes.
static G4int fSceneCount; // No. of extanct scenes.
G4double GetMarkerSize ( const G4VMarker& mark ) ;
//
// Stop-gap solution of structure re-use.
// A proper implementation would use geometry hierarchy.
//
RWTValHashDictionary<G4VSolidPointer, G4int> fSolidDictionary;
RWTValHashDictionary<G4VPhysicalVolumePointer, SoSeparatorPointer> SeparatorSet;
SoSeparator *root;
SoSeparator *currentSeparator;
};
#include "G4OpenInventorScene.icc"
#endif
#endif
@@ -0,0 +1,38 @@
// 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: G4OpenInventorScene.icc,v 2.1 1998/08/07 12:50:09 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// J Kallenbach 27th Aug 1996
// OpenInventor scene - creates OpenInventor Display lists.
// 26th January 1998 - added base class callbacks. John Allison.
inline G4int G4OpenInventorScene::GetSceneCount () {
return fSceneCount;
}
inline void G4OpenInventorScene::AddThis (const G4Sphere& sphere) {
G4VScene::AddThis (sphere);
}
inline void G4OpenInventorScene::AddThis (const G4Para& para) {
G4VScene::AddThis (para);
}
inline void G4OpenInventorScene::AddThis (const G4Torus& torus) {
G4VScene::AddThis (torus);
}
inline void G4OpenInventorScene::AddThis (const G4VSolid& vsolid) {
G4VScene::AddThis (vsolid);
}
inline void G4OpenInventorScene::AddPrimitive (const G4Polymarker& polymarker) {
G4VScene::AddPrimitive (polymarker);
}
@@ -0,0 +1,36 @@
// 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: G4OpenInventorTransform3D.hh,v 2.1 1998/09/10 12:56:52 barrand Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// jck 17 Dec 1996
// G4OpenGLInventorTransform3D provides SoSFMatrix transformation matrix
// from G4Transform3D.
#ifndef G4OpenInventorTRANSFORM3D_HH
#define G4OpenInventorTRANSFORM3D_HH
#ifdef G4VIS_BUILD_OI_DRIVER
#include "G4Transform3D.hh"
class SoSFMatrix;
class G4OpenInventorTransform3D : public G4Transform3D {
public:
G4OpenInventorTransform3D (const G4Transform3D &t);
SoSFMatrix* GetOIMatrix () const;
private:
G4float m[16];
};
#endif
#endif
@@ -0,0 +1,67 @@
// 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: G4OpenInventorView.hh,v 2.3 1998/11/06 13:42:41 allison Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// Jeff Kallenbach 01 Aug 1996
// OpenInventor view - opens window, hard copy, etc.
#ifndef G4OPENINVENTORVIEW_HH
#define G4OPENINVENTORVIEW_HH
#ifdef G4VIS_BUILD_OI_DRIVER
#include <rw/tvordvec.h>
#include <Inventor/Xt/SoXt.h>
#include <Inventor/Xt/SoXtComponent.h>
#include <Inventor/nodes/SoSelection.h>
#include "G4VView.hh"
class G4OpenInventorScene;
class G4VInteractorManager;
//
// Base class for various OpenInventorView classes.
//
class G4OpenInventorView: public G4VView {
public:
G4OpenInventorView (G4OpenInventorScene& scene,
const G4String& name = "");
~G4OpenInventorView ();
void DrawView ();
void ShowView ();
G4bool GetOIVisualFound () const;
private:
void ClearView ();
void FinishView ();
void SetView ();
void KernelVisitDecision ();
G4OpenInventorScene& fScene; // Graphics Scene for this view.
G4bool OIvisualfound;
Widget G4OIShell;
SoXtComponent* G4OIViewer; // The Inventor Viewer
SoSelection* G4OISelection;
G4VInteractorManager* interactorManager;
};
inline G4bool G4OpenInventorView::GetOIVisualFound () const {
return OIvisualfound;
}
#endif
#endif
@@ -0,0 +1,27 @@
// 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: G4OpenInventorWin32.hh,v 2.0 1998/07/02 16:47:25 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
// OpenInventor graphics system factory.
#if defined (G4VIS_BUILD_OIWIN32_DRIVER) || defined (G4VIS_USE_OIWIN32)
#ifndef G4OPENINVENTORWIN32_HH
#define G4OPENINVENTORWIN32_HH
#include "G4OpenInventor.hh"
class G4OpenInventorWin32: public G4OpenInventor {
public:
G4OpenInventorWin32 ();
};
#endif
#endif
@@ -0,0 +1,29 @@
// 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: G4OpenInventorX.hh,v 2.0 1998/07/02 16:47:27 gunter Exp $
// GEANT4 tag $Name: geant4-00 $
//
//
// Andrew Walkden 27th March 1996
// OpenInventor graphics system factory.
#if defined (G4VIS_BUILD_OIX_DRIVER) || defined (G4VIS_USE_OIX)
#ifndef G4OPENINVENTORX_HH
#define G4OPENINVENTORX_HH
#include "G4OpenInventor.hh"
class G4OpenInventorX: public G4OpenInventor {
public:
G4OpenInventorX ();
};
#endif
#endif