Import Geant4 11.0.0 source tree

This commit is contained in:
Gabriele Cosmo
2021-12-10 14:46:44 +01:00
committed by Ben Morgan
parent 6399a014b6
commit 80e2389dd8
3932 changed files with 202519 additions and 246221 deletions
@@ -1,62 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// FRClient.h
// FukuiRenderer Client
// Yasuhide Sawada & Satoshi Tanaka
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef FR_CLIENT_H
#define FR_CLIENT_H
#define FRSendLength 256
class FRClient {
public:
FRClient();
virtual ~FRClient();
int create();
int connect(const char *hostname, int port);
int send(const char *sendbuf);
int receive(char *recvbuf);
int close();
protected:
int fd;
int port;
};
#endif //FR_CLIENT_H
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,71 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4FRClient.hh
// Yasuhide Sawada and Satoshi Tanaka
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4_FR_CLIENT_HH
#define G4_FR_CLIENT_HH
#include "globals.hh"
class FRClient;
class G4FRClient {
// G4FRClient can SEND only!
public:
G4FRClient();
virtual ~G4FRClient();
G4bool connect(const char *hostname, G4int port);
void close();
G4int getPort() const;
G4bool isConnected() const { return connected; }
G4bool is_open () const { return connected; }
G4FRClient& operator << (G4int);
G4FRClient& operator << (G4double);
G4FRClient& operator << (const char *);
G4FRClient& operator << (G4FRClient& (*)(G4FRClient&));
private:
FRClient *fFRClient;
G4bool connected;
G4int fPort;
};
//manipulator
//G4FRClient& endl(G4FRClient&);
#endif //G4_FR_CLIENT_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,68 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1.hh
// Yasuhide Sawada and Satoshi Tanaka
#ifndef WIN32
#if defined (G4VIS_BUILD_VRML_DRIVER) || defined (G4VIS_USE_VRML)
#ifndef G4VRML1_HH
#define G4VRML1_HH
#include "G4VGraphicsSystem.hh"
#include "FRClient.h"
class G4VSceneHandler;
//#define FR_VRML_DEFAULT_PORT 40801
//#define FR_VRML_PORT_ENV "FR_VRML_PORT"
//#define FR_VRML_HOST_NAME_ENV "FR_VRML_HOST_NAME"
#include "G4VRMLNetConfig.hh"
class G4VRML1: public G4VGraphicsSystem {
public:
G4VRML1();
virtual ~G4VRML1();
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
public:
const G4String& getHostName() { return fHostName; }
G4int getPort() { return fPort; }
private:
G4String fHostName;
G4int fPort;
};
#endif //G4VRML1_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,47 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1File.hh
// Satoshi Tanaka & Yasuhide Sawada
#ifndef G4VRML1FILE_HH
#define G4VRML1FILE_HH
#include "G4VGraphicsSystem.hh"
class G4VSceneHandler;
class G4VRML1File: public G4VGraphicsSystem {
public:
G4VRML1File();
virtual ~G4VRML1File();
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
};
#endif //G4VRML1File_HH
@@ -1,121 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1FileSceneHandler.hh
// Satoshi Tanaka & Yasuhide Sawada
#ifndef G4VRML1FILE_SCENE_HANDLER_HH
#define G4VRML1FILE_SCENE_HANDLER_HH
#include <fstream>
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4VSceneHandler.hh"
class G4VRML1File;
class G4VisAttributes;
class G4VRML1FileSceneHandler: public G4VSceneHandler {
friend class G4VRML1FileViewer;
// methods (public)
public:
G4VRML1FileSceneHandler(G4VRML1File& system, const G4String& name = "");
virtual ~G4VRML1FileSceneHandler();
using G4VSceneHandler::AddSolid;
void AddSolid(const G4Box&);
void AddSolid(const G4Cons&);
void AddSolid(const G4Tubs&);
void AddSolid(const G4Trd&);
void AddSolid(const G4Trap&);
void AddSolid(const G4Sphere&);
void AddSolid(const G4Para&);
void AddSolid(const G4Torus&);
void AddSolid(const G4VSolid&);
using G4VSceneHandler::AddCompound;
void BeginPrimitives(const G4Transform3D& objectTransformation);
void EndPrimitives();
using G4VSceneHandler::AddPrimitive;
void AddPrimitive(const G4Polyline&);
void AddPrimitive(const G4Polyhedron&);
void AddPrimitive(const G4Text&);
void AddPrimitive(const G4Circle&);
void AddPrimitive(const G4Square&);
void ClearTransientStore(); // Used for triggering detector re-drawing.
void BeginModeling();
void EndModeling();
void VRMLBeginModeling();
void VRMLEndModeling();
void connectPort();
void closePort();
// methods (private)
private:
void SendMaterialNode( const G4VisAttributes* pAV ); // NEW NEW NEW
void SendMaterialNode();
void SendMatrixTransformNode(const G4Transform3D &);
void SendCubeNode(G4double, G4double, G4double);
void SendCylinderNode(G4double, G4double);
void SendSphereNode(G4double);
void SendMarkerColor ( const G4VMarker& mark ) ;
void SendMarkerWorldPosition ( const G4VMarker& mark ) ;
G4double GetMarkerHalfSize ( const G4VMarker& mark ) ;
G4bool isConnected () { return fFlagDestOpen ; }
// data
private:
char fVRMLFileDestDir[256] ;
char fVRMLFileName[256] ;
G4String fCurrentDEF;
G4VRML1File& fSystem; // Graphics system for this scene.
std::ofstream fDest ;
G4bool fFlagDestOpen ;
G4int fMaxFileNum ;
static G4int fSceneIdCount;
};
#endif //G4VRML1FILE_SCENE_HANDLER_HH
@@ -1,54 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1FileViewer.hh
// Satoshi Tanaka and Yasuhide Sawada
#ifndef G4VRML1FILE_VIEWER_HH
#define G4VRML1FILE_VIEWER_HH
#include "G4VViewer.hh"
#include "globals.hh"
class G4VRML1FileSceneHandler;
class G4VRML1FileViewer: public G4VViewer {
public:
G4VRML1FileViewer(G4VRML1FileSceneHandler& scene, const G4String& name = "");
virtual ~G4VRML1FileViewer();
void ClearView();
void DrawView();
void ShowView();
void FinishView();
private:
void SetView();
private:
G4VRML1FileSceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
};
#endif //G4VRML1File_VIEW_HH
@@ -1,118 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1SceneHandler.hh
// Yasuhide Sawada & Satoshi Tanaka
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4VRML1_SCENE_HANDLER_HH
#define G4VRML1_SCENE_HANDLER_HH
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4VSceneHandler.hh"
#include "G4FRClient.hh"
class G4VRML1;
class G4VisAttributes;
class G4VRML1SceneHandler: public G4VSceneHandler {
enum { MAX_CONNECTION_TRIAL = 10 } ;
// methods (public)
public:
G4VRML1SceneHandler(G4VRML1& system, const G4String& name = "");
virtual ~G4VRML1SceneHandler();
using G4VSceneHandler::AddSolid;
void AddSolid(const G4Box&);
void AddSolid(const G4Cons&);
void AddSolid(const G4Tubs&);
void AddSolid(const G4Trd&);
void AddSolid(const G4Trap&);
void AddSolid(const G4Sphere&);
void AddSolid(const G4Para&);
void AddSolid(const G4Torus&);
void AddSolid(const G4VSolid&);
using G4VSceneHandler::AddCompound;
void BeginPrimitives(const G4Transform3D& objectTransformation);
void EndPrimitives();
using G4VSceneHandler::AddPrimitive;
void AddPrimitive(const G4Polyline&);
void AddPrimitive(const G4Polyhedron&);
void AddPrimitive(const G4Text&);
void AddPrimitive(const G4Circle&);
void AddPrimitive(const G4Square&);
void ClearTransientStore(); // Used for triggering detector re-drawing.
void BeginModeling();
void EndModeling();
void VRMLBeginModeling();
void VRMLEndModeling();
void connectPort(int max_trial = MAX_CONNECTION_TRIAL );
void closePort();
// methods (private)
private:
void SendMaterialNode( const G4VisAttributes* pAV );
void SendMaterialNode();
void SendMatrixTransformNode(const G4Transform3D &);
void SendCubeNode(G4double, G4double, G4double);
void SendCylinderNode(G4double, G4double);
void SendSphereNode(G4double);
void SendMarkerColor ( const G4VMarker& mark ) ;
void SendMarkerWorldPosition ( const G4VMarker& mark ) ;
G4double GetMarkerHalfSize ( const G4VMarker& mark ) ;
// data
private:
G4String fCurrentDEF;
G4VRML1& fSystem; // Graphics system for this scene.
G4FRClient fDest ;
static G4int fSceneIdCount;
};
#endif //G4VRML1_SCENE_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,60 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML1Viewer.hh
// Satoshi Tanaka & Yasuhide Sawada
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4VRML1_VIEWER_HH
#define G4VRML1_VIEWER_HH
#include "G4VViewer.hh"
#include "globals.hh"
class G4VRML1SceneHandler;
class G4VRML1Viewer: public G4VViewer {
public:
G4VRML1Viewer(G4VRML1SceneHandler& scene, const G4String& name = "");
virtual ~G4VRML1Viewer();
void ClearView();
void DrawView();
void ShowView();
void FinishView();
private:
void SetView();
private:
G4VRML1SceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
};
#endif //G4VRML1_VIEW_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,67 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML2.hh
// Satoshi Tanaka and Yasuhide Sawada
#ifndef WIN32
#if defined (G4VIS_BUILD_VRML_DRIVER) || defined (G4VIS_USE_VRML)
#ifndef G4VRML2_HH
#define G4VRML2_HH
#include "G4VGraphicsSystem.hh"
#include "FRClient.h"
class G4VSceneHandler;
#include "G4VRMLNetConfig.hh"
//#define FR_VRML_DEFAULT_PORT 40801
//#define FR_VRML_PORT_ENV "FR_VRML_PORT"
//#define FR_VRML_HOST_NAME_ENV "FR_VRML_HOST_NAME"
class G4VRML2: public G4VGraphicsSystem {
public:
G4VRML2();
virtual ~G4VRML2();
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
public:
const G4String& getHostName() { return fHostName; }
G4int getPort() { return fPort; }
private:
G4String fHostName;
G4int fPort;
};
#endif //G4VRML2_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -35,13 +35,13 @@
class G4VSceneHandler;
class G4VRML2File: public G4VGraphicsSystem {
public:
G4VRML2File();
virtual ~G4VRML2File();
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
class G4VRML2File : public G4VGraphicsSystem
{
public:
G4VRML2File();
virtual ~G4VRML2File();
G4VSceneHandler* CreateSceneHandler(const G4String& name = "");
G4VViewer* CreateViewer(G4VSceneHandler&, const G4String& name = "");
};
#endif //G4VRML2FILE_HH
#endif // G4VRML2FILE_HH
@@ -37,94 +37,89 @@
#include "G4LogicalVolume.hh"
#include "G4VSceneHandler.hh"
class G4VRML2File;
class G4VisAttributes;
class G4VRML2FileSceneHandler: public G4VSceneHandler {
class G4VRML2FileSceneHandler : public G4VSceneHandler
{
friend class G4VRML2FileViewer;
// methods (public)
public:
G4VRML2FileSceneHandler(G4VRML2File& system, const G4String& name = "");
virtual ~G4VRML2FileSceneHandler();
// methods (public)
public:
G4VRML2FileSceneHandler(G4VRML2File& system, const G4String& name = "");
virtual ~G4VRML2FileSceneHandler();
using G4VSceneHandler::AddSolid;
void AddSolid(const G4Box&);
void AddSolid(const G4Cons&);
void AddSolid(const G4Tubs&);
void AddSolid(const G4Trd&);
void AddSolid(const G4Trap&);
void AddSolid(const G4Sphere&);
void AddSolid(const G4Para&);
void AddSolid(const G4Torus&);
void AddSolid(const G4VSolid&);
using G4VSceneHandler::AddSolid;
void AddSolid(const G4Box&);
void AddSolid(const G4Cons&);
void AddSolid(const G4Tubs&);
void AddSolid(const G4Trd&);
void AddSolid(const G4Trap&);
void AddSolid(const G4Sphere&);
void AddSolid(const G4Para&);
void AddSolid(const G4Torus&);
void AddSolid(const G4VSolid&);
using G4VSceneHandler::AddCompound;
using G4VSceneHandler::AddCompound;
void BeginPrimitives(const G4Transform3D& objectTransformation);
void EndPrimitives();
void BeginPrimitives(const G4Transform3D& objectTransformation);
void EndPrimitives();
using G4VSceneHandler::AddPrimitive;
void AddPrimitive(const G4Polyline&);
void AddPrimitive(const G4Polyhedron&);
void AddPrimitive(const G4Text&);
void AddPrimitive(const G4Circle&);
void AddPrimitive(const G4Square&);
using G4VSceneHandler::AddPrimitive;
void AddPrimitive(const G4Polyline&);
void AddPrimitive(const G4Polyhedron&);
void AddPrimitive(const G4Text&);
void AddPrimitive(const G4Circle&);
void AddPrimitive(const G4Square&);
void ClearTransientStore(); // Used for triggering detector re-drawing.
void ClearTransientStore(); // Used for triggering detector re-drawing.
void BeginModeling();
void EndModeling();
void BeginModeling();
void EndModeling();
void VRMLBeginModeling();
void VRMLEndModeling();
void VRMLBeginModeling();
void VRMLEndModeling();
void connectPort();
void closePort();
void connectPort();
void closePort();
// methods (private)
private:
// methods (private)
private:
void SendMaterialNode(const G4VisAttributes* pAV);
void SendMaterialNode();
void SendMaterialNode ( const G4VisAttributes* pAV );
void SendMaterialNode ();
void SendLineColor(const G4VisAttributes* pAV);
void SendMarkerColor(const G4VMarker& mark);
void SendMarkerWorldPosition(const G4VMarker& mark);
void SendLineColor ( const G4VisAttributes* pAV );
void SendMarkerColor ( const G4VMarker& mark ) ;
void SendMarkerWorldPosition ( const G4VMarker& mark ) ;
G4double GetMarkerHalfSize(const G4VMarker& mark);
void GetMarkerWorldPosition(const G4VMarker& mark, double* pX, double* pY,
double* pZ);
G4double GetMarkerHalfSize ( const G4VMarker& mark ) ;
void GetMarkerWorldPosition ( const G4VMarker& mark ,
double* pX ,
double* pY ,
double* pZ ) ;
G4bool isConnected() { return fFlagDestOpen; }
G4bool isConnected () { return fFlagDestOpen ; }
G4bool IsPVPickable() { return fPVPickable; }
void SetPVPickability(G4bool on_off) { fPVPickable = on_off; }
G4double SetPVTransparency();
G4double GetPVTransparency() { return fPVTransparency; }
G4bool IsPVPickable () { return fPVPickable ;}
void SetPVPickability ( G4bool on_off ) { fPVPickable = on_off ;}
G4double SetPVTransparency () ;
G4double GetPVTransparency () { return fPVTransparency ; }
// data
private:
char fVRMLFileDestDir[256];
char fVRMLFileName[256];
// data
private:
char fVRMLFileDestDir[256] ;
char fVRMLFileName[256] ;
G4VRML2File& fSystem; // Graphics system for this scene.
G4bool fFlagDestOpen;
G4VRML2File& fSystem; // Graphics system for this scene.
G4bool fFlagDestOpen ;
G4int fMaxFileNum;
G4int fMaxFileNum ;
G4bool fPVPickable;
G4double fPVTransparency;
G4bool fPVPickable ;
G4double fPVTransparency ;
static G4int fSceneIdCount;
public:
std::ofstream fDest ;
static G4int fSceneIdCount;
public:
std::ofstream fDest;
};
#endif //G4VRML2FILE_SCENE_HANDLER_HH
#endif // G4VRML2FILE_SCENE_HANDLER_HH
@@ -37,25 +37,27 @@
class G4VRML2FileSceneHandler;
class G4VRML2FileViewer: public G4VViewer {
public:
G4VRML2FileViewer(G4VRML2FileSceneHandler& scene, const G4String& name = "");
virtual ~G4VRML2FileViewer();
void ClearView();
void DrawView();
void ShowView();
void FinishView();
private:
void SetView(); // Do nothing. SendViewParameters will do its job.
void SendViewParameters () ;
class G4VRML2FileViewer : public G4VViewer
{
public:
G4VRML2FileViewer(G4VRML2FileSceneHandler& scene, const G4String& name = "");
virtual ~G4VRML2FileViewer();
void ClearView();
void DrawView();
void ShowView();
void FinishView();
private:
G4VRML2FileSceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
std::ofstream& fDest ;
private:
void SetView(); // Do nothing. SendViewParameters will do its job.
void SendViewParameters();
G4double fViewHalfAngle ;
G4double fsin_VHA ;
private:
G4VRML2FileSceneHandler&
fSceneHandler; // Reference to Graphics Scene for this view.
std::ofstream& fDest;
G4double fViewHalfAngle;
G4double fsin_VHA;
};
#endif //G4VRML2FILE_VIEWER_HH
#endif // G4VRML2FILE_VIEWER_HH
@@ -1,127 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML2SceneHandler.hh
// Satoshi Tanaka & Yasuhide Sawada
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4VRML2_SCENE_HANDLER_HH
#define G4VRML2_SCENE_HANDLER_HH
#include "globals.hh"
#include "G4LogicalVolume.hh"
#include "G4VSceneHandler.hh"
#include "G4FRClient.hh"
class G4VRML2;
class G4VisAttributes;
class G4VRML2SceneHandler: public G4VSceneHandler {
enum { MAX_CONNECTION_TRIAL = 10 } ;
// methods (public)
public:
G4VRML2SceneHandler(G4VRML2& system, const G4String& name = "");
virtual ~G4VRML2SceneHandler();
using G4VSceneHandler::AddSolid;
void AddSolid(const G4Box&);
void AddSolid(const G4Cons&);
void AddSolid(const G4Tubs&);
void AddSolid(const G4Trd&);
void AddSolid(const G4Trap&);
void AddSolid(const G4Sphere&);
void AddSolid(const G4Para&);
void AddSolid(const G4Torus&);
void AddSolid(const G4VSolid&);
using G4VSceneHandler::AddCompound;
void BeginPrimitives(const G4Transform3D& objectTransformation);
void EndPrimitives();
using G4VSceneHandler::AddPrimitive;
void AddPrimitive(const G4Polyline&);
void AddPrimitive(const G4Polyhedron&);
void AddPrimitive(const G4Text&);
void AddPrimitive(const G4Circle&);
void AddPrimitive(const G4Square&);
void ClearTransientStore(); // Used for triggering detector re-drawing.
void BeginModeling();
void EndModeling();
void VRMLBeginModeling();
void VRMLEndModeling();
void connectPort(int max_trial = MAX_CONNECTION_TRIAL );
void closePort();
// methods (private)
private:
void SendMaterialNode ( const G4VisAttributes* pAV );
void SendMaterialNode ();
void SendLineColor ( const G4VisAttributes* pAV );
void SendMarkerColor ( const G4VMarker& mark ) ;
void SendMarkerWorldPosition ( const G4VMarker& mark ) ;
G4double GetMarkerHalfSize ( const G4VMarker& mark ) ;
void GetMarkerWorldPosition ( const G4VMarker& mark ,
double* pX ,
double* pY ,
double* pZ ) ;
G4bool IsPVPickable () { return fPVPickable ;}
void SetPVPickability ( G4bool on_off ) { fPVPickable = on_off ;}
G4double SetPVTransparency () ;
G4double GetPVTransparency () { return fPVTransparency ; }
// data
private:
G4VRML2& fSystem; // Graphics system for this scene.
G4bool fPVPickable ;
G4double fPVTransparency ;
static G4int fSceneIdCount;
public:
G4FRClient fDest ;
};
#endif //G4VRML2_SCENE_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,67 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRML2Viewer.hh
// Satoshi Tanaka & Yasuhide Sawada
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4VRML2_VIEWER_HH
#define G4VRML2_VIEWER_HH
#include "G4VViewer.hh"
#include "globals.hh"
#include "G4FRClient.hh"
class G4VRML2SceneHandler;
class G4VRML2Viewer: public G4VViewer {
public:
G4VRML2Viewer(G4VRML2SceneHandler& scene, const G4String& name = "");
virtual ~G4VRML2Viewer();
void ClearView();
void DrawView();
void ShowView();
void FinishView();
private:
void SetView(); // Do nothing. SendViewParameters will do its job.
void SendViewParameters () ;
private:
G4VRML2SceneHandler& fSceneHandler; // Reference to Graphics Scene for this view.
G4FRClient& fDest ;
G4double fViewHalfAngle ;
G4double fsin_VHA ;
};
#endif //G4VRML2_VIEW_HH
#endif //G4VIS_BUILD_VRML_DRIVER
#endif //WIN32
@@ -1,44 +0,0 @@
//
// ********************************************************************
// * License and Disclaimer *
// * *
// * The Geant4 software is copyright of the Copyright Holders of *
// * the Geant4 Collaboration. It is provided under the terms and *
// * conditions of the Geant4 Software License, included in the file *
// * LICENSE and available at http://cern.ch/geant4/license . These *
// * include a list of copyright holders. *
// * *
// * 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. Please see the license in the file LICENSE and URL above *
// * for the full disclaimer and the limitation of liability. *
// * *
// * This code implementation is the result of the scientific and *
// * technical work of the GEANT4 collaboration. *
// * By using, copying, modifying or distributing the software (or *
// * any work based on the software) you agree to acknowledge its *
// * use in resulting scientific publications, and indicate your *
// * acceptance of all terms of the Geant4 Software license. *
// ********************************************************************
//
//
//
// G4VRMLNetConfig.hh
// Satoshi Tanaka
#ifndef WIN32
#ifdef G4VIS_BUILD_VRML_DRIVER
#ifndef G4VRML_NET_CONFIG_HH
#define G4VRML_NET_CONFIG_HH
const int FR_VRML_DEFAULT_PORT = 40801 ;
const char FR_VRML_PORT_ENV [] = "G4VRML_PORT" ;
const char FR_VRML_HOST_NAME_ENV[] = "G4VRML_HOST_NAME" ;
#endif // G4VRML_NET_CONFIG_HH
#endif // G4VIS_BUILD_VRML_DRIVER
#endif //WIN32