Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
// 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: FRClient.h,v 2.0 1998/07/02 16:48:04 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// FRClient.h
|
||||
// FukuiRenderer Client
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
#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
|
||||
@@ -0,0 +1,51 @@
|
||||
// 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: G4FRClient.hh,v 2.0 1998/07/02 16:47:52 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4FRClient.hh
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
|
||||
#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
|
||||
@@ -0,0 +1,48 @@
|
||||
// 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: G4VRML1.hh,v 2.3 1998/11/09 19:30:45 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1.hh
|
||||
// Yasuhide Sawada and Satoshi Tanaka
|
||||
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || (G4VIS_USE_VRML)
|
||||
|
||||
#ifndef G4VRML1_HH
|
||||
#define G4VRML1_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "FRClient.h"
|
||||
|
||||
class G4VScene;
|
||||
|
||||
//#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();
|
||||
~G4VRML1();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, 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
|
||||
@@ -0,0 +1,34 @@
|
||||
// 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: G4VRML1File.hh,v 2.3 1998/11/09 19:32:48 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1File.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || (G4VIS_USE_VRMLFILE)
|
||||
|
||||
#ifndef G4VRML1FILE_HH
|
||||
#define G4VRML1FILE_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4VScene;
|
||||
|
||||
class G4VRML1File: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML1File();
|
||||
~G4VRML1File();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML1File_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
@@ -0,0 +1,107 @@
|
||||
// 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: G4VRML1FileScene.hh,v 2.6 1998/12/04 09:10:54 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1FileScene.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML1FILE_SCENE_HH
|
||||
#define G4VRML1FILE_SCENE_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
#include <fstream.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
|
||||
|
||||
class G4VRML1File;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML1FileScene: public G4VScene {
|
||||
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML1FileScene(G4VRML1File& system, const G4String& name = "");
|
||||
~G4VRML1FileScene();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
void AddThis(const G4Trd&);
|
||||
void AddThis(const G4Trap&);
|
||||
void AddThis(const G4Sphere&);
|
||||
void AddThis(const G4Para&);
|
||||
void AddThis(const G4Torus&);
|
||||
void AddThis(const G4VSolid&);
|
||||
|
||||
void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives();
|
||||
|
||||
void AddPrimitive(const G4Polyline&);
|
||||
void AddPrimitive(const G4Polyhedron&);
|
||||
void AddPrimitive(const G4NURBS&);
|
||||
void AddPrimitive(const G4Text&);
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
void beginSending();
|
||||
void endSending();
|
||||
|
||||
static G4int GetSceneCount() { return fSceneCount; }
|
||||
|
||||
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.
|
||||
ofstream fDest ;
|
||||
G4bool fFlagDestOpen ;
|
||||
|
||||
G4int fMaxFileNum ;
|
||||
|
||||
static G4int fSceneIdCount;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML1File_SCENE_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
@@ -0,0 +1,40 @@
|
||||
// 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: G4VRML1FileView.hh,v 2.3 1998/11/09 19:32:52 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1FileView.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML1FILE_VIEW_HH
|
||||
#define G4VRML1FILE_VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML1FileScene;
|
||||
|
||||
class G4VRML1FileView: public G4VView {
|
||||
public:
|
||||
G4VRML1FileView(G4VRML1FileScene& scene, const G4String& name = "");
|
||||
~G4VRML1FileView();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
void FinishView();
|
||||
private:
|
||||
void SetView();
|
||||
|
||||
private:
|
||||
G4VRML1FileScene& fScene; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif //G4VRML1File_VIEW_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
@@ -0,0 +1,99 @@
|
||||
// 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: G4VRML1Scene.hh,v 2.4 1998/11/09 19:32:58 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1Scene.hh
|
||||
// Yasuhide Sawada & Satoshi Tanaka
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML1_SCENE_HH
|
||||
#define G4VRML1_SCENE_HH
|
||||
|
||||
#include <rw/tvhdict.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML1;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML1Scene: public G4VScene {
|
||||
|
||||
enum { MAX_CONNECTION_TRIAL = 10 } ;
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML1Scene(G4VRML1& system, const G4String& name = "");
|
||||
~G4VRML1Scene();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
void AddThis(const G4Trd&);
|
||||
void AddThis(const G4Trap&);
|
||||
void AddThis(const G4Sphere&);
|
||||
void AddThis(const G4Para&);
|
||||
void AddThis(const G4Torus&);
|
||||
void AddThis(const G4VSolid&);
|
||||
|
||||
void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives();
|
||||
|
||||
void AddPrimitive(const G4Polyline&);
|
||||
void AddPrimitive(const G4Polyhedron&);
|
||||
void AddPrimitive(const G4NURBS&);
|
||||
void AddPrimitive(const G4Text&);
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
void beginSending();
|
||||
void endSending();
|
||||
|
||||
static G4int GetSceneCount() { return fSceneCount; }
|
||||
|
||||
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;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML1_SCENE_HH
|
||||
#endif //G4VIS_BUILD_VRML_DRIVER
|
||||
@@ -0,0 +1,40 @@
|
||||
// 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: G4VRML1View.hh,v 2.3 1998/11/09 19:32:59 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML1View.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML1_VIEW_HH
|
||||
#define G4VRML1_VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML1Scene;
|
||||
|
||||
class G4VRML1View: public G4VView {
|
||||
public:
|
||||
G4VRML1View(G4VRML1Scene& scene, const G4String& name = "");
|
||||
~G4VRML1View();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
void FinishView();
|
||||
private:
|
||||
void SetView();
|
||||
|
||||
private:
|
||||
G4VRML1Scene& fScene; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif //G4VRML1_VIEW_HH
|
||||
#endif //G4VIS_BUILD_VRML_DRIVER
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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: G4VRML2.hh,v 2.2 1998/11/09 19:33:01 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRML_DRIVER) || (G4VIS_USE_VRML)
|
||||
|
||||
#ifndef G4VRML2_HH
|
||||
#define G4VRML2_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "FRClient.h"
|
||||
|
||||
class G4VScene;
|
||||
|
||||
#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();
|
||||
~G4VRML2();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, 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
|
||||
@@ -0,0 +1,34 @@
|
||||
// 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: G4VRML2File.hh,v 2.2 1998/11/09 19:33:02 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2File.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#if defined (G4VIS_BUILD_VRMLFILE_DRIVER) || (G4VIS_USE_VRMLFILE)
|
||||
|
||||
#ifndef G4VRML2FILE_HH
|
||||
#define G4VRML2FILE_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
class G4VScene;
|
||||
|
||||
class G4VRML2File: public G4VGraphicsSystem {
|
||||
public:
|
||||
G4VRML2File();
|
||||
~G4VRML2File();
|
||||
G4VScene* CreateScene(const G4String& name = "");
|
||||
G4VView* CreateView(G4VScene&, const G4String& name = "");
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML2File_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
// 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: G4VRML2FileScene.hh,v 2.6 1998/12/04 09:10:54 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2FileScene.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML2FILE_SCENE_HH
|
||||
#define G4VRML2FILE_SCENE_HH
|
||||
|
||||
#include <fstream.h>
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
|
||||
|
||||
class G4VRML2File;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML2FileScene: public G4VScene {
|
||||
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML2FileScene(G4VRML2File& system, const G4String& name = "");
|
||||
~G4VRML2FileScene();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
void AddThis(const G4Trd&);
|
||||
void AddThis(const G4Trap&);
|
||||
void AddThis(const G4Sphere&);
|
||||
void AddThis(const G4Para&);
|
||||
void AddThis(const G4Torus&);
|
||||
void AddThis(const G4VSolid&);
|
||||
|
||||
void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives();
|
||||
|
||||
void AddPrimitive(const G4Polyline&);
|
||||
void AddPrimitive(const G4Polyhedron&);
|
||||
void AddPrimitive(const G4NURBS&);
|
||||
void AddPrimitive(const G4Text&);
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
static G4int GetSceneCount() { return fSceneCount; }
|
||||
|
||||
// IO
|
||||
void beginSending();
|
||||
void endSending();
|
||||
|
||||
void connectPort();
|
||||
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 isConnected () { return fFlagDestOpen ; }
|
||||
|
||||
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] ;
|
||||
|
||||
G4VRML2File& fSystem; // Graphics system for this scene.
|
||||
G4bool fFlagDestOpen ;
|
||||
|
||||
G4int fMaxFileNum ;
|
||||
|
||||
G4bool fPVPickable ;
|
||||
G4double fPVTransparency ;
|
||||
|
||||
static G4int fSceneIdCount;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
public:
|
||||
ofstream fDest ;
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML2File_SCENE_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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: G4VRML2FileView.hh,v 2.2 1998/11/09 19:33:06 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2FileView.hh
|
||||
// Satoshi Tanaka and Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
|
||||
#ifndef G4VRML2FILE_VIEW_HH
|
||||
#define G4VRML2FILE_VIEW_HH
|
||||
|
||||
#include <fstream.h>
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4VRML2FileScene;
|
||||
|
||||
class G4VRML2FileView: public G4VView {
|
||||
public:
|
||||
G4VRML2FileView(G4VRML2FileScene& scene, const G4String& name = "");
|
||||
~G4VRML2FileView();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
void FinishView();
|
||||
private:
|
||||
void SetView(); // Do nothing. SendViewParameters will do its job.
|
||||
void SendViewParameters () ;
|
||||
|
||||
private:
|
||||
G4VRML2FileScene& fScene; // Reference to Graphics Scene for this view.
|
||||
ofstream& fDest ;
|
||||
|
||||
G4double fViewHalfAngle ;
|
||||
G4double fsin_VHA ;
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML2File_VIEW_HH
|
||||
#endif //G4VIS_BUILD_VRMLFILE_DRIVER
|
||||
@@ -0,0 +1,109 @@
|
||||
// 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: G4VRML2Scene.hh,v 2.5 1998/12/03 09:28:24 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2Scene.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML2_SCENE_HH
|
||||
#define G4VRML2_SCENE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
#include "G4LogicalVolume.hh"
|
||||
#include "G4VScene.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML2;
|
||||
class G4VisAttributes;
|
||||
|
||||
class G4VRML2Scene: public G4VScene {
|
||||
|
||||
enum { MAX_CONNECTION_TRIAL = 10 } ;
|
||||
|
||||
// methods (public)
|
||||
public:
|
||||
G4VRML2Scene(G4VRML2& system, const G4String& name = "");
|
||||
~G4VRML2Scene();
|
||||
void AddThis(const G4Box&);
|
||||
void AddThis(const G4Cons&);
|
||||
void AddThis(const G4Tubs&);
|
||||
void AddThis(const G4Trd&);
|
||||
void AddThis(const G4Trap&);
|
||||
void AddThis(const G4Sphere&);
|
||||
void AddThis(const G4Para&);
|
||||
void AddThis(const G4Torus&);
|
||||
void AddThis(const G4VSolid&);
|
||||
|
||||
void BeginPrimitives(const G4Transform3D& objectTransformation);
|
||||
void EndPrimitives();
|
||||
|
||||
void AddPrimitive(const G4Polyline&);
|
||||
void AddPrimitive(const G4Polyhedron&);
|
||||
void AddPrimitive(const G4NURBS&);
|
||||
void AddPrimitive(const G4Text&);
|
||||
void AddPrimitive(const G4Circle&);
|
||||
void AddPrimitive(const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
void ClearStore();
|
||||
|
||||
void BeginModeling();
|
||||
void EndModeling();
|
||||
|
||||
static G4int GetSceneCount() { return fSceneCount; }
|
||||
|
||||
// IO
|
||||
void beginSending();
|
||||
void endSending();
|
||||
|
||||
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;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
public:
|
||||
G4FRClient fDest ;
|
||||
|
||||
};
|
||||
|
||||
#endif //G4VRML2_SCENE_HH
|
||||
#endif //G4VIS_BUILD_VRML_DRIVER
|
||||
@@ -0,0 +1,47 @@
|
||||
// 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: G4VRML2View.hh,v 2.2 1998/11/09 19:33:10 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRML2View.hh
|
||||
// Satoshi Tanaka & Yasuhide Sawada
|
||||
|
||||
#ifdef G4VIS_BUILD_VRML_DRIVER
|
||||
|
||||
#ifndef G4VRML2_VIEW_HH
|
||||
#define G4VRML2_VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4FRClient.hh"
|
||||
|
||||
class G4VRML2Scene;
|
||||
|
||||
class G4VRML2View: public G4VView {
|
||||
public:
|
||||
G4VRML2View(G4VRML2Scene& scene, const G4String& name = "");
|
||||
~G4VRML2View();
|
||||
void ClearView();
|
||||
void DrawView();
|
||||
void ShowView();
|
||||
void FinishView();
|
||||
private:
|
||||
void SetView(); // Do nothing. SendViewParameters will do its job.
|
||||
void SendViewParameters () ;
|
||||
|
||||
private:
|
||||
G4VRML2Scene& fScene; // Reference to Graphics Scene for this view.
|
||||
G4FRClient& fDest ;
|
||||
|
||||
G4double fViewHalfAngle ;
|
||||
G4double fsin_VHA ;
|
||||
};
|
||||
|
||||
#endif //G4VRML2_VIEW_HH
|
||||
#endif //G4VIS_BUILD_VRML_DRIVER
|
||||
@@ -0,0 +1,24 @@
|
||||
// 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: G4VRMLNetConfig.hh,v 2.0 1998/07/02 16:48:03 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// G4VRMLNetConfig.hh
|
||||
// Satoshi Tanaka
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user