Import Geant4 0.0.0 source tree
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
// 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: G4DAWNFILE.hh,v 2.1 1998/11/06 13:41:37 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE driver factory.
|
||||
|
||||
//=================//
|
||||
#if defined (G4VIS_BUILD_DAWNFILE_DRIVER) || defined (G4VIS_USE_DAWNFILE)
|
||||
//=================//
|
||||
|
||||
#ifndef G4DAWNFILE_HH
|
||||
#define G4DAWNFILE_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
|
||||
//----- prototype
|
||||
class G4VScene ;
|
||||
|
||||
//----------------------------//
|
||||
//----- class G4DAWNFILE -----//
|
||||
//----------------------------//
|
||||
class G4DAWNFILE: public G4VGraphicsSystem {
|
||||
|
||||
public:
|
||||
G4DAWNFILE ();
|
||||
~G4DAWNFILE ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
|
||||
private:
|
||||
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
@@ -0,0 +1,215 @@
|
||||
// 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: G4DAWNFILEScene.hh,v 2.4 1998/12/04 07:31:03 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4DAWNFILE_SCENE_HH
|
||||
#define G4DAWNFILE_SCENE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VScene.hh"
|
||||
|
||||
#include "G4FRofstream.hh"
|
||||
#include "G4FRConst.hh"
|
||||
|
||||
|
||||
class G4VisAttributes ;
|
||||
class G4DAWNFILE;
|
||||
|
||||
|
||||
//-----
|
||||
class G4DAWNFILEScene: public G4VScene {
|
||||
|
||||
public:
|
||||
|
||||
//----- constructor and destructor
|
||||
G4DAWNFILEScene (G4DAWNFILE& system, const G4String& name = "");
|
||||
~G4DAWNFILEScene ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void AddPrimitive (const G4Polyline& line);
|
||||
void AddPrimitive (const G4Polyhedron& p);
|
||||
void AddPrimitive (const G4NURBS& nurb);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
virtual void BeginModeling () ;
|
||||
virtual void EndModeling () { G4VScene::EndModeling ();}
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives ();
|
||||
void AddThis ( const G4Box& box );
|
||||
void AddThis ( const G4Cons& cons );
|
||||
void AddThis ( const G4Tubs& tubs );
|
||||
void AddThis ( const G4Trd& trd );
|
||||
void AddThis ( const G4Trap& trap );
|
||||
void AddThis ( const G4Sphere& sphere );
|
||||
void AddThis ( const G4Para& para );
|
||||
void AddThis ( const G4Torus& torus );
|
||||
void AddThis ( const G4VSolid& solid );
|
||||
|
||||
void ClearStore (){}
|
||||
|
||||
//----- public methods inherent to this class
|
||||
static G4int GetSceneCount ();
|
||||
void FREndModeling () ;
|
||||
G4bool IsInModeling () { return flag_in_modeling ; }
|
||||
|
||||
G4bool IsSavingG4Prim ( void ) { return flag_saving_g4_prim ; }
|
||||
void BeginSavingG4Prim( void );
|
||||
void EndSavingG4Prim ( void ) ;
|
||||
void SetG4PrimFileName() ;
|
||||
|
||||
G4DAWNFILE& GetSystem () { return fSystem ; }
|
||||
void SendBoundingBox ( void );
|
||||
const char* GetG4PrimFileName () { return fG4PrimFileName ; }
|
||||
|
||||
|
||||
private:
|
||||
|
||||
//----- Utilities etc (common to DAWN and DAWNFILE drivers )
|
||||
G4bool SendVisAttributes ( const G4VisAttributes* pAV );
|
||||
G4bool IsVisible ( void ) ;
|
||||
G4bool InitializeFR ( void ) ;
|
||||
void SendTransformedCoordinates( void ) ;
|
||||
void SendPhysVolName ( void ) ;
|
||||
|
||||
//----- public methods common to DAWN and DAWNFILE drivers
|
||||
public:
|
||||
|
||||
void SendStr ( const char* char_string ) ;
|
||||
void SendStrInt( const char* char_string ,
|
||||
G4int ival );
|
||||
void SendStrInt3( const char* char_string ,
|
||||
G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 );
|
||||
void SendStrInt4( const char* char_string ,
|
||||
G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
G4int ival4 );
|
||||
void SendStrDouble( const char* char_string ,
|
||||
G4double dval );
|
||||
void SendStrDouble2( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 );
|
||||
void SendStrDouble3( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 );
|
||||
|
||||
void SendStrDouble4( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 );
|
||||
|
||||
void SendStrDouble5( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 );
|
||||
|
||||
void SendStrDouble6( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 );
|
||||
|
||||
void SendStrDouble7( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
G4double dval7 );
|
||||
|
||||
void SendStrDouble11( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
G4double dval7 ,
|
||||
G4double dval8 ,
|
||||
G4double dval9 ,
|
||||
G4double dval10 ,
|
||||
G4double dval11 ) ;
|
||||
|
||||
void SendIntDouble3( G4int ival ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 );
|
||||
void SendInt3Str( G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
const char* char_string );
|
||||
void SendInt4Str( G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
G4int ival4 ,
|
||||
const char* char_string );
|
||||
|
||||
void SendStrDouble6Str( const char* char_string1 ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
const char* char_string2 );
|
||||
|
||||
void SendInt ( G4int val );
|
||||
void SendDouble( G4double val );
|
||||
|
||||
private:
|
||||
G4DAWNFILE& fSystem; // Graphics system for this scene.
|
||||
static G4int fSceneIdCount;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
G4FRofstream fPrimDest ; // defined here
|
||||
G4bool flag_in_modeling ;
|
||||
// true: FR_BEGIN_MODELING has sent to DAWN, and
|
||||
// FR_END_MODELING has not sent yet.
|
||||
// false: otherwise
|
||||
//
|
||||
// The flag flag_in_modeling is set to "true"
|
||||
// in BeginModeling(), and to "false"
|
||||
// in FREndModeling().
|
||||
// ( EndModeling() is not used.)
|
||||
|
||||
G4bool flag_saving_g4_prim ;
|
||||
|
||||
const int COMMAND_BUF_SIZE ;
|
||||
|
||||
char fG4PrimDestDir [256] ;
|
||||
char fG4PrimFileName[256] ;
|
||||
G4int fMaxFileNum ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
@@ -0,0 +1,60 @@
|
||||
// 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: G4DAWNFILEView.hh,v 2.1 1998/11/06 13:41:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// DAWNFILE view - opens window, hard copy, etc.
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4DAWNFILE_VIEW_HH
|
||||
#define G4DAWNFILE_VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4DAWNFILEScene ;
|
||||
|
||||
class G4DAWNFILEView: public G4VView {
|
||||
|
||||
enum FRDEV {FRDEV_PS=1, FRDEV_XWIN=2, FRDEV_PS2=3, FRDEV_XWIN2=4, FRDEV_OPEN_GL=5, FRDEV_DEVICE_END=6} ;
|
||||
|
||||
public:
|
||||
//----- constructor and destructor
|
||||
G4DAWNFILEView (G4DAWNFILEScene& scene, const G4String& name = "");
|
||||
~G4DAWNFILEView ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void SetView (); // Do nothing. SendViewParameters will do its job.
|
||||
void ClearView ();
|
||||
void DrawView ();
|
||||
void ShowView ();
|
||||
void FlushView (); // ShowView() without calling Wait()
|
||||
|
||||
//---- methods inherent to this class
|
||||
void SendViewParameters () ;
|
||||
const char* GetG4PrimViewer () { return fG4PrimViewer ;}
|
||||
const char* GetG4PrimViewerInvocation() { return fG4PrimViewerInvocation ;}
|
||||
const char* GetPSViewer () { return fPSViewer ;}
|
||||
void SendDrawingStyleToDAWNGUI( ostream& out ) ;
|
||||
|
||||
private:
|
||||
G4DAWNFILEScene& fScene; // Reference to Graphics Scene for this view.
|
||||
|
||||
char fG4PrimViewer [32] ;
|
||||
char fG4PrimViewerInvocation[64] ;
|
||||
char fPSViewer [32] ;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWNFILE_DRIVER
|
||||
@@ -0,0 +1,124 @@
|
||||
// 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: G4FRClientServer.hh,v 2.2 1998/07/13 17:10:54 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// Satoshi TANAKA, Wed Jul 3 14:13:52 JST 1996
|
||||
////////////////////////////////
|
||||
///// G4FRClientServer.h /////
|
||||
////////////////////////////////
|
||||
|
||||
//=================//
|
||||
#if defined (G4VIS_BUILD_DAWN_DRIVER) || defined (G4VIS_USE_DAWN)
|
||||
//=================//
|
||||
|
||||
|
||||
#if !defined G4FR_CLIENT_SERVER_H
|
||||
#define G4FR_CLIENT_SERVER_H
|
||||
|
||||
#include<sys/types.h>
|
||||
#include<sys/socket.h>
|
||||
#include<netinet/in.h>
|
||||
#include<arpa/inet.h>
|
||||
#include<netdb.h>
|
||||
#include<sys/un.h>
|
||||
#include<unistd.h>
|
||||
#include<stdio.h>
|
||||
#include<stdlib.h>
|
||||
#include<string.h>
|
||||
#include"G4ios.hh"
|
||||
|
||||
|
||||
//----- constants
|
||||
const char FR_ENV_SERVER_HOST_NAME[] = "G4DAWN_HOST_NAME" ;
|
||||
const char FR_ENV_NAMED_PIPE_CONNECTION[] = "G4DAWN_NAMED_PIPE" ;
|
||||
|
||||
//-----------------------------------//
|
||||
//----- class G4FRClientServer -----//
|
||||
//-----------------------------------//
|
||||
|
||||
class G4FRClientServer {
|
||||
public:
|
||||
enum { SEND_BUFMAX = 1024 , RECV_BUFMAX = 1024 };
|
||||
enum { SUN_PATH_MAX = 16 };
|
||||
|
||||
protected:
|
||||
const char TERMINATOR ;
|
||||
const char END_OF_LINE;
|
||||
char SUN_PATH[ SUN_PATH_MAX ];
|
||||
int PORT_NUMBER ;
|
||||
int fSocketFd ;
|
||||
|
||||
char fReceivedMessage [ RECV_BUFMAX ];
|
||||
char fSendingMessage [ SEND_BUFMAX ];
|
||||
|
||||
protected:
|
||||
|
||||
void Err( char* message ) { perror(message) ;}
|
||||
void SetSendingMessage( const char* message )
|
||||
{ strcpy( fSendingMessage, message );}
|
||||
void Send() ; // send command in fSendingMessage
|
||||
|
||||
public:
|
||||
//----- Server
|
||||
int AcceptUnix(){ return 0;} // made unfunctioned
|
||||
int AcceptINET(){ return 0 ;} // made unfunctioned
|
||||
|
||||
//----- Client
|
||||
int ConnectUnix();
|
||||
int ConnectINET();
|
||||
|
||||
//----- Common to server and client
|
||||
|
||||
//---------- (1)
|
||||
G4FRClientServer ( char terminator = '.' ,
|
||||
char end_line = '\n' ) ;
|
||||
virtual ~G4FRClientServer () {;}
|
||||
void SetSunPath( const char* sun_path )
|
||||
{ strcpy ( SUN_PATH, sun_path ); }
|
||||
void SetPortNumber( int port_num )
|
||||
{ PORT_NUMBER = port_num ; }
|
||||
void IncrementPortNumber( int incr = 1 )
|
||||
{ PORT_NUMBER += incr ; }
|
||||
const char* GetSendingMessage() const
|
||||
{ return fSendingMessage ;}
|
||||
int GetSendingMessageLength() const
|
||||
{ return strlen(fSendingMessage) ;}
|
||||
void SetReceivedMessage( const char* message )
|
||||
{ strcpy( fReceivedMessage, message );}
|
||||
const char* GetReceivedMessage() const
|
||||
{ return fReceivedMessage ;}
|
||||
int GetReceivedMessageLength() const
|
||||
{ return strlen(fReceivedMessage) ;}
|
||||
int GetSofd() const { return fSocketFd ; }
|
||||
int GetPortNumber () const { return PORT_NUMBER ; }
|
||||
void ClearReceivedMessage ()
|
||||
{ memset(fReceivedMessage, '\0', RECV_BUFMAX) ; }
|
||||
|
||||
int IsTerminator(char ch ) { return ( ch == TERMINATOR ); }
|
||||
char GetTerminator() const { return TERMINATOR ; }
|
||||
int IsEndOfLine (char ch ) { return ( ch == END_OF_LINE ); }
|
||||
char GetEndOfLine() const { return END_OF_LINE ; }
|
||||
void DisConnect();
|
||||
void Clear();
|
||||
void WaitSendBack( const char* command_string ) ;
|
||||
|
||||
//---------- (2) send and receive
|
||||
virtual void Send ( const char* message ) ;
|
||||
virtual void SendLine ( const char* message ) ;
|
||||
// Add END_OF_LINE if the message does not
|
||||
// Terminate with it. And then send the message.
|
||||
virtual void Receive() ;
|
||||
virtual void ReceiveLine() ;
|
||||
|
||||
}; // G4FRClientServer
|
||||
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWN_DRIVER
|
||||
|
||||
@@ -0,0 +1,176 @@
|
||||
// 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: G4FRConst.hh,v 2.0 1998/07/02 16:42:01 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
// Satoshi TANAKA, Tue Jul 2 15:30:49 JST 1996
|
||||
///////////////////////////////////
|
||||
///// G4FRConst.hh /////
|
||||
///////////////////////////////////
|
||||
|
||||
#if !defined G4_FR_COMMAND_LIST_HH
|
||||
#define G4_FR_COMMAND_LIST_HH
|
||||
|
||||
//----- Header comment
|
||||
const char FR_G4_PRIM_HEADER [] = "##G4.PRIM-FORMAT-2.4" ;
|
||||
//const char FR_PHYSICAL_VOLUME_NAME [] = "#/PhysicalVolumeName" ;
|
||||
const char FR_PHYSICAL_VOLUME_NAME [] = "#/PVName" ;
|
||||
|
||||
//----- Execution control (beginning with !)
|
||||
const char FR_GUI [] = "!GraphicalUserInterface" ;
|
||||
const char FR_DEVICE [] = "!Device" ;
|
||||
const char FR_SET_CAMERA [] = "!SetCamera" ;
|
||||
const char FR_OPEN_DEVICE [] = "!OpenDevice" ;
|
||||
const char FR_CLOSE_DEVICE [] = "!CloseDevice" ;
|
||||
const char FR_DRAW_ALL [] = "!DrawAll" ;
|
||||
const char FR_CLEAR_DATA [] = "!ClearData" ;
|
||||
const char FR_QUIT [] = "!Quit" ;
|
||||
const char FR_DISCONNECT_DAWND [] = "!DisconnectDawnd" ;
|
||||
const char FR_TERMINATE_DAWND [] = "!TerminateDawnd" ;
|
||||
const char FR_SAVE [] = "!Save" ;
|
||||
const char FR_END_SAVE [] = "!EndSave" ;
|
||||
const char FR_WAIT [] = "!Wait" ;
|
||||
const char FR_PAUSE [] = "!Pause" ;
|
||||
|
||||
//----- Drawing Style
|
||||
const char FR_WIREFRAME [] = "/Wireframe" ;
|
||||
const char FR_SURFACE [] = "/Surface" ;
|
||||
const char FR_LINES [] = "/Lines" ;
|
||||
|
||||
//----- Begin and End of Modeling
|
||||
const char FR_BEGIN_MODELING [] = "!BeginModeling" ;
|
||||
const char FR_END_MODELING [] = "!EndModeling" ;
|
||||
|
||||
//----- Bounding box
|
||||
const char FR_BOUNDING_BOX [] = "/BoundingBox" ;
|
||||
const char FR_BOUNDING_BOX_UNIT [] = "/BoundingBox -0.5 -0.5 -0.5 0.5 0.5 0.5" ;
|
||||
|
||||
//----- Number of divising curved surface
|
||||
const char FR_NDIV [] = "/Ndiv" ;
|
||||
const char FR_NDIV_DEFAULT [] = "/Ndiv 24" ;
|
||||
const char FR_NDIV_3 [] = "/Ndiv 3" ;
|
||||
const char FR_NDIV_4 [] = "/Ndiv 4" ;
|
||||
const char FR_NDIV_8 [] = "/Ndiv 8" ;
|
||||
const char FR_NDIV_16 [] = "/Ndiv 16" ;
|
||||
const char FR_NDIV_24 [] = "/Ndiv 24" ;
|
||||
const char FR_NDIV_48 [] = "/Ndiv 48" ;
|
||||
const char FR_NDIV_96 [] = "/Ndiv 96" ;
|
||||
|
||||
//----- Camera information
|
||||
const char FR_CAMERA_POSITION[] = "/CameraPosition" ;
|
||||
const char FR_CAMERA_POSITION_DEFAULT[] = "/CameraPosition 100000.0 0.0 0.0" ;
|
||||
// see from far upward position
|
||||
const char FR_TARGET_POINT [] = "/TargetPoint";
|
||||
const char FR_ZOOM_FACTOR [] = "/ZoomFactor";
|
||||
const char FR_SCALE [] = "/Scale";
|
||||
const char FR_FOCAL_DISTANCE [] = "/FocalDistance";
|
||||
|
||||
//----- Body coordinate information
|
||||
const char FR_BASE_VECTOR [] = "/BaseVector" ;
|
||||
// Give e1 and e2. Then e3 is calculated.
|
||||
const char FR_BASE_VECTOR_DEFAULT [] = "/BaseVector 1.0 0.0 0.0 0.0 1.0 0.0" ;
|
||||
const char FR_ORIGIN [] = "/Origin" ;
|
||||
const char FR_ORIGIN_DEFAULT [] = "/Origin 0.0 0.0 0.0" ;
|
||||
|
||||
//----- Attribute information
|
||||
const char FR_DIFFUSE_RGB [] = "/DiffuseRGB" ;
|
||||
// old name of /ColorRGB
|
||||
|
||||
const char FR_COLOR_RGB [] = "/ColorRGB" ;
|
||||
const char FR_COLOR_RGB_DEFAULT [] = "/ColorRGB 1.0 1.0 1.0" ;
|
||||
const char FR_COLOR_RGB_WHITE [] = "/ColorRGB 1.0 1.0 1.0" ;
|
||||
|
||||
const char FR_COLOR_RGB_RED [] = "/ColorRGB 1.0 0.0 0.0" ;
|
||||
const char FR_COLOR_RGB_GREEN [] = "/ColorRGB 0.0 1.0 0.0" ;
|
||||
const char FR_COLOR_RGB_BLUE [] = "/ColorRGB 0.0 0.0 1.0" ;
|
||||
|
||||
const char FR_COLOR_RGB_CYAN [] = "/ColorRGB 0.0 1.0 1.0" ;
|
||||
const char FR_COLOR_RGB_MAGENTA [] = "/ColorRGB 1.0 0.0 1.0" ;
|
||||
const char FR_COLOR_RGB_YELLOW [] = "/ColorRGB 1.0 1.0 0.0" ;
|
||||
|
||||
const char FR_SPECULAR_RGB [] = "/SpecularRGB" ;
|
||||
const char FR_SPECULAR_RGB_DEFAULT [] = "/SpecularRGB 1.0 1.0 1.0" ;
|
||||
const char FR_SPECULAR_RGB_WHITE [] = "/SpecularRGB 1.0 1.0 1.0" ;
|
||||
|
||||
const char FR_PHONG_POWER [] = "/PhongPower" ;
|
||||
const char FR_PHONG_POWER_DEFAULT [] = "/PhongPower 3" ;
|
||||
|
||||
const char FR_TRANSPARENCY [] = "/Transparency" ;
|
||||
const char FR_TRANSPARENCY_ON [] = "/Transparency 1 " ; // transparent
|
||||
const char FR_TRANSPARENCY_OFF [] = "/Transparency 0 " ; // non-transparent
|
||||
|
||||
const char FR_FORCE_WIREFRAME [] = "/ForceWireframe" ;
|
||||
const char FR_FORCE_WIREFRAME_ON [] = "/ForceWireframe 1" ;
|
||||
const char FR_FORCE_WIREFRAME_OFF [] = "/ForceWireframe 0" ;
|
||||
|
||||
const char FR_VISIBILITY [] = "/Visibility" ;
|
||||
const char FR_VISIBILITY_ON [] = "/Visibility 1" ; // visible
|
||||
const char FR_VISIBILITY_OFF [] = "/Visibility 0" ; // invisible
|
||||
|
||||
//----- 3D Primitives
|
||||
const char FR_POLYHEDRON [] = "/Polyhedron" ;
|
||||
const char FR_VERTEX [] = "/Vertex" ;
|
||||
const char FR_FACET [] = "/Facet" ;
|
||||
const char FR_END_POLYHEDRON [] = "/EndPolyhedron" ;
|
||||
|
||||
const char FR_BOX [] = "/Box" ;
|
||||
const char FR_BOX_UNIT [] = "/Box 0.5 0.5 0.5" ; // dx, dy, dz
|
||||
|
||||
const char FR_COLUMN [] = "/Column" ;
|
||||
const char FR_COLUMN_UNIT [] = "/Column 0.5 0.5" ; // R dz
|
||||
|
||||
const char FR_POLYLINE [] = "/Polyline" ;
|
||||
const char FR_PL_VERTEX [] = "/PLVertex" ;
|
||||
const char FR_PL_VERTEX_OLD [] = "PLVertex" ;
|
||||
const char FR_END_POLYLINE [] = "/EndPolyline" ;
|
||||
|
||||
const char FR_TRD [] = "/Trd" ;
|
||||
// /Trd dx1 dx2 dy1 dy2 dz ;
|
||||
const char FR_TRAP [] = "/Trap" ;
|
||||
// /Trap dz theta phi h1 bl1 tl1 alpha1 h2 bl2 tl2 alpha2
|
||||
const char FR_TUBS [] = "/Tubs" ;
|
||||
// /Tubs rmin rmax dz sphi dphi
|
||||
const char FR_CONS [] = "/Cons" ;
|
||||
// /Cons rmin1 rmax1 rmin2 rmax2 dz sphi dphi
|
||||
const char FR_SPHERE [] = "/Sphere" ;
|
||||
// /Sphere R
|
||||
const char FR_SPHERE_SEG [] = "/SphereSeg" ;
|
||||
// /SphereSeg rmin rmax s_theta d_theta s_phi d_phi
|
||||
const char FR_PARA [] = "/Parallelepiped" ;
|
||||
// /Parallelepiped dx dy dz tanAlpha tanTheta_cosPhi tanTheta_sinPhi
|
||||
const char FR_PCON [] = "/PolyCone" ;
|
||||
// /PolyCone sphi dphi nz z[nz] rmin[nz] rmax[nz]
|
||||
const char FR_PGON [] = "/PolyGon" ;
|
||||
// /PolyGon sphi dphi ndiv nz z[nz] rmin[nz] rmax[nz]
|
||||
const char FR_TORUS [] = "/Torus" ;
|
||||
// /PolyGon sphi dphi ndiv nz z[nz] rmin[nz] rmax[nz]
|
||||
|
||||
//----- Marks I (arg: x y z half_size_3d)
|
||||
const char FR_FONT_NAME [] = "/FontName" ;
|
||||
|
||||
//----- Marks I (arg: x y z half_size_3d)
|
||||
const char FR_MARK_CIRCLE_2D [] = "/MarkCircle2D" ;
|
||||
const char FR_MARK_SQUARE_2D [] = "/MarkSquare2D" ;
|
||||
const char FR_MARK_TEXT_2D [] = "/MarkText2D" ;
|
||||
// /MarkText2D x y z size_world x_offset_world y_offset_world string
|
||||
|
||||
//----- Marks II (arg: x y z half_size_2d)
|
||||
const char FR_MARK_CIRCLE_2DS [] = "/MarkCircle2DS" ;
|
||||
const char FR_MARK_SQUARE_2DS [] = "/MarkSquare2DS" ;
|
||||
const char FR_MARK_TEXT_2DS [] = "/MarkText2DS" ;
|
||||
// /MarkText2DS x y z size_pt x_offset_pt y_offset_pt string
|
||||
|
||||
//----- Text
|
||||
const char FR_TEXT_2DS [] = "/Text2DS" ;
|
||||
|
||||
//----- For DAWNCUT
|
||||
const char FR_CLIPPING_PLANE [] = "/ClippingPlane" ;
|
||||
// /ClippingPlaneMarkCross2D a b c d
|
||||
// for plane ax + by + cz + d = 0
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,41 @@
|
||||
// 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: G4FRFeatures.hh,v 2.2 1998/07/12 03:09:10 urbi Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#if !defined G4_FR_FEATURES_HH
|
||||
#define G4_FR_FEATURES_HH
|
||||
|
||||
|
||||
const char FR_DAWN_FEATURES[] = "High quality technical renderer.\
|
||||
\n Features: exact hidden line, hidden surface algorithms.\
|
||||
\n high (unlimited) resolution.\
|
||||
\n renders to PostScript for viewing and/or hardcopy.\
|
||||
\n remote rendering.\
|
||||
\n off-line rendering.\
|
||||
\n graphical user interface.\
|
||||
\n connection via TCP/IP socket or named pipe Fukui Renderer DAWN.\
|
||||
\n Disadvantages: compute intensive, takes time (use a fast graphics\
|
||||
\n system, such as OpenGL, to select view, then copy\
|
||||
\n to this renderer - /vis~/copy/view, /vis~/set/view).";
|
||||
|
||||
|
||||
const char FR_DAWNFILE_FEATURES[] ="High quality technical renderer.\
|
||||
\n Features: exact hidden line, hidden surface algorithms.\
|
||||
\n high (unlimited) resolution.\
|
||||
\n renders to PostScript for viewing and/or hardcopy.\
|
||||
\n remote rendering.\
|
||||
\n off-line rendering.\
|
||||
\n graphical user interface.\
|
||||
\n connection via g4.prim file to Fukui Renderer DAWN,\
|
||||
\n DAVID (DAwn's Visual Intersection Debugger, etc.\
|
||||
\n Disadvantages: compute intensive, takes time (use a fast graphics\
|
||||
\n system, such as OpenGL, to select view, then copy\
|
||||
\n to this renderer - /vis~/copy/view, /vis~/set/view).";
|
||||
|
||||
#endif
|
||||
@@ -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: G4FRSocketConfig.hh,v 2.2 1998/12/03 22:07:21 stanaka Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
////////////////////////////////
|
||||
///// G4FRSocketConfig.h /////
|
||||
////////////////////////////////
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWN_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#if !defined SOCKET_CONFIG_H
|
||||
#define SOCKET_CONFIG_H
|
||||
|
||||
//----------------------------------//
|
||||
// Select one from the List below ////
|
||||
//----------------------------------//
|
||||
|
||||
#if defined SOCKET_IRIX_SOLARIS
|
||||
#define FR_SOCKET_IRIX_SOLARIS
|
||||
#else
|
||||
#define FR_SOCKET_DEFAULT
|
||||
#endif
|
||||
|
||||
|
||||
///// NOT IMPLEMENTED //////////
|
||||
//#define SOCKET_NT
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
#endif // G4VIS_BUILD_DAWN_DRIVER
|
||||
@@ -0,0 +1,33 @@
|
||||
// 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: G4FRSocketMacro.hh,v 2.0 1998/07/02 16:42:05 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
///////////////////////////////
|
||||
///// G4FRSocketMacro.hh /////
|
||||
///////////////////////////////
|
||||
//----- MACRO for portability -----//
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWN_DRIVER
|
||||
//=================//
|
||||
|
||||
#if !defined FR_SOCKET_MACRO_H
|
||||
#define FR_SOCKET_MACRO_H
|
||||
|
||||
|
||||
//----- gethostname
|
||||
#if defined FR_SOCKET_IRIX_SOLARIS
|
||||
#include <sys/systeminfo.h>
|
||||
#define GET_HOSTNAME( hostname, length ) sysinfo( SI_HOSTNAME, hostname, length )
|
||||
#else
|
||||
#define GET_HOSTNAME( hostname, length ) gethostname( hostname, length )
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWN_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: G4FRofstream.hh,v 2.0 1998/07/02 16:42:06 gunter Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
#include<fstream.h>
|
||||
|
||||
#if !defined G4_FR_OFSTREAM_HH
|
||||
#define G4_FR_OFSTREAM_HH
|
||||
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
/////////////////////
|
||||
//typedef int G4bool ;
|
||||
//#define false 0 ;
|
||||
//#define true 1 ;
|
||||
////////////////////
|
||||
|
||||
class G4FRofstream {
|
||||
|
||||
public:
|
||||
enum { SEND_BUFMAX = 1024 };
|
||||
|
||||
public:
|
||||
|
||||
// constructors
|
||||
G4FRofstream () { flag_file_open = false ; }
|
||||
G4FRofstream ( const char* filename ) ;
|
||||
|
||||
// destructor
|
||||
virtual ~G4FRofstream ();
|
||||
|
||||
// open and close
|
||||
void Open ( const char* filename );
|
||||
void Close() ;
|
||||
G4bool IsOpen() { return flag_file_open ;}
|
||||
|
||||
// utilities
|
||||
void SendLine( const char* string ) ; // save string with new line
|
||||
|
||||
// static functions
|
||||
static G4bool DoesFileExist( const char* filename ) ;
|
||||
|
||||
protected:
|
||||
G4bool flag_file_open ;
|
||||
ofstream fout ;
|
||||
} ;
|
||||
|
||||
|
||||
inline void G4FRofstream::Open ( const char* filename )
|
||||
{
|
||||
if( !IsOpen() ) {
|
||||
fout.open( filename ) ;
|
||||
flag_file_open = true ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline void G4FRofstream::Close ()
|
||||
{
|
||||
if( IsOpen() ) {
|
||||
fout.close();
|
||||
flag_file_open = false ;
|
||||
}
|
||||
}
|
||||
|
||||
inline void G4FRofstream::SendLine ( const char* message )
|
||||
{
|
||||
if ( IsOpen() ) {
|
||||
fout << message << endl;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
inline G4bool G4FRofstream::DoesFileExist ( const char* filename )
|
||||
{
|
||||
G4bool status = false ;
|
||||
|
||||
ifstream fout_tmp( filename ) ;
|
||||
if( fout_tmp ) { status = true ; }
|
||||
fout_tmp.close();
|
||||
|
||||
return status ;
|
||||
}
|
||||
|
||||
|
||||
inline
|
||||
G4FRofstream::G4FRofstream ( const char* filename )
|
||||
{
|
||||
flag_file_open = false ;
|
||||
Open( filename );
|
||||
}
|
||||
|
||||
inline
|
||||
G4FRofstream::~G4FRofstream ()
|
||||
{
|
||||
Close() ;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,65 @@
|
||||
// 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: G4FukuiRenderer.hh,v 2.1 1998/11/06 13:41:39 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA
|
||||
// Fukui Renderer factory.
|
||||
|
||||
//=================//
|
||||
#if defined (G4VIS_BUILD_DAWN_DRIVER) || defined (G4VIS_USE_DAWN)
|
||||
//=================//
|
||||
|
||||
#ifndef G4FUKUI_RENDERER_HH
|
||||
#define G4FUKUI_RENDERER_HH
|
||||
|
||||
#include "G4VGraphicsSystem.hh"
|
||||
#include "G4FRClientServer.hh"
|
||||
|
||||
//----- prototype
|
||||
class G4VScene ;
|
||||
|
||||
//---------------------------------//
|
||||
//----- class G4FukuiRenderer -----//
|
||||
//---------------------------------//
|
||||
class G4FukuiRenderer: public G4VGraphicsSystem {
|
||||
|
||||
public:
|
||||
G4FukuiRenderer ();
|
||||
~G4FukuiRenderer ();
|
||||
G4VScene* CreateScene (const G4String& name = "");
|
||||
G4VView* CreateView (G4VScene&, const G4String& name = "");
|
||||
|
||||
G4FRClientServer& GetPrimDest() { return fPrimDest ; }
|
||||
|
||||
//----- inter-process communication
|
||||
enum { IP_UNIX, IP_INET };
|
||||
enum { FR_MAX_PORT_INCR = 10 };
|
||||
G4bool IsUnixDomain() const { return (fIPMode == G4FukuiRenderer::IP_UNIX); }
|
||||
G4bool IsInetDomain() const { return (fIPMode == G4FukuiRenderer::IP_INET); }
|
||||
void UseInetDomainAuto();
|
||||
void UseInetDomain();
|
||||
void UseBSDUnixDomainAuto();
|
||||
void ConnectPort( int max_port_incr = FR_MAX_PORT_INCR);
|
||||
|
||||
G4bool IsGUIMode (void) { return flag_use_gui ; }
|
||||
G4bool IsConnected (void) { return flag_connected ; }
|
||||
|
||||
public:
|
||||
//----- inter-process communication
|
||||
G4FRClientServer fPrimDest ;
|
||||
|
||||
private:
|
||||
int fIPMode ;
|
||||
G4bool flag_use_gui ;
|
||||
G4int flag_connected ;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWN_DRIVER
|
||||
@@ -0,0 +1,284 @@
|
||||
// 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: G4FukuiRendererScene.hh,v 2.3 1998/11/06 13:41:40 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 11:19:19 JST 1996
|
||||
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWN_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4FUKUI_RENDERER_SCENE_HH
|
||||
#define G4FUKUI_RENDERER_SCENE_HH
|
||||
|
||||
#include "globals.hh"
|
||||
|
||||
#include "G4VScene.hh"
|
||||
|
||||
#include "G4FRClientServer.hh"
|
||||
#include "G4FRConst.hh"
|
||||
|
||||
class G4VisAttributes ;
|
||||
class G4FukuiRenderer;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ===== About AddPrimitive() functions =====
|
||||
//
|
||||
// Any graphics driver should prepare AddPrimitive() functions
|
||||
// for the following visualizable primitives:
|
||||
//
|
||||
// G4Polyline,
|
||||
// G4NURBS (not supported by DAWN),
|
||||
// G4Text, G4Circle, G4Square,
|
||||
// G4Polyhedron
|
||||
//
|
||||
// A drawing function G4VisManager::Draw(...) is prepared for each
|
||||
// of these primitives.
|
||||
//
|
||||
// These primitives have visualization attributes by themselves.
|
||||
// AddPrimitive() functions use these assinged visualization attributes
|
||||
// for visualization.
|
||||
//
|
||||
// Local coordinates to locate these primitives are set to the current in
|
||||
// BeginPrimitive() functions.
|
||||
// See G4VisManager::Draw( const G4Polyline&), for example.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// ========== About AddThis() functions =======
|
||||
//
|
||||
// AddThis() functions are usually used to visualize a physical volume.
|
||||
// The are called when G4VisManager::Draw( void ) is used.
|
||||
//
|
||||
// Current local coordinates and current visualization attributes
|
||||
// are set to the current in the inherited PreAddThis() function.
|
||||
// PreAddThis() is called in G4PhysicalVolumeModel::DescribeAndDescend():
|
||||
//
|
||||
// // Make decision to Draw.
|
||||
// G4bool thisToBeDrawn = !IsThisCulled (pLV);
|
||||
// if (thisToBeDrawn) {
|
||||
// scene.PreAddThis (theNewAT, *(pLV -> GetVisAttributes ()));
|
||||
// pSol -> DescribeYourselfTo (scene);
|
||||
// scene.PostAddThis ();
|
||||
// }
|
||||
//
|
||||
// where G4VSolid::DescribeYourselfTo ( G4VScene& ) calls
|
||||
// a proper AddThis() function. See G4Box.cc, for example.
|
||||
//
|
||||
// For shapes for which AddThis() functions are not prepered explicitly,
|
||||
// AddThis (const G4VSolid& ) is called automatically.
|
||||
// Then the following chain of calling is Done:
|
||||
//
|
||||
// AddThis ( const G4VSolid& )
|
||||
// ==> G4VScene::AddThis ( const G4VSolid& )
|
||||
// ==> G4VScene::RequestPrimitives( const G4VSolid& )
|
||||
// ==> AddPrimitive ( const G4Polyhedron& )
|
||||
//
|
||||
// Therefore, AddPrimitive( const G4Polyhedron& ) is used for
|
||||
// visualization finally. Note that G4Polyhedron is automatically
|
||||
// created in G4VScene::RequestPrimitives( const G4VSolid& ) and
|
||||
// current visualization attributes are assigned there.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
//-----
|
||||
class G4FukuiRendererScene: public G4VScene {
|
||||
|
||||
public:
|
||||
|
||||
//----- constructor and destructor
|
||||
G4FukuiRendererScene (G4FukuiRenderer& system, const G4String& name = "");
|
||||
~G4FukuiRendererScene ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void AddPrimitive (const G4Polyline& line);
|
||||
void AddPrimitive (const G4Polyhedron& p);
|
||||
void AddPrimitive (const G4NURBS& nurb);
|
||||
void AddPrimitive (const G4Text&);
|
||||
void AddPrimitive (const G4Circle&);
|
||||
void AddPrimitive (const G4Square&);
|
||||
void AddPrimitive (const G4Polymarker& polymarker)
|
||||
{ G4VScene::AddPrimitive (polymarker); }
|
||||
|
||||
virtual void BeginModeling () ;
|
||||
virtual void EndModeling () { G4VScene::EndModeling ();}
|
||||
|
||||
virtual void BeginPrimitives (const G4Transform3D& objectTransformation);
|
||||
virtual void EndPrimitives ();
|
||||
void AddThis ( const G4Box& box );
|
||||
void AddThis ( const G4Cons& cons );
|
||||
void AddThis ( const G4Tubs& tubs );
|
||||
void AddThis ( const G4Trd& trd );
|
||||
void AddThis ( const G4Trap& trap );
|
||||
void AddThis ( const G4Sphere& sphere );
|
||||
void AddThis ( const G4Para& para );
|
||||
void AddThis ( const G4Torus& torus );
|
||||
void AddThis ( const G4VSolid& solid );
|
||||
|
||||
void ClearStore (){}
|
||||
|
||||
//----- methods inherent to this class
|
||||
static G4int GetSceneCount ();
|
||||
void FREndModeling () ;
|
||||
G4bool IsInModeling () { return flag_in_modeling ; }
|
||||
|
||||
G4bool IsSavingG4Prim ( void ) { return flag_saving_g4_prim ; }
|
||||
void BeginSavingG4Prim( void )
|
||||
{
|
||||
if( !IsSavingG4Prim() )
|
||||
{
|
||||
SendStr( FR_SAVE ) ;
|
||||
SendStr( FR_G4_PRIM_HEADER ) ;
|
||||
flag_saving_g4_prim = true ;
|
||||
}
|
||||
}
|
||||
void EndSavingG4Prim ( void )
|
||||
{ if( IsSavingG4Prim() ) { SendStr( FR_END_SAVE ); flag_saving_g4_prim = false ; } }
|
||||
|
||||
G4FRClientServer& GetPrimDest () { return fPrimDest ; }
|
||||
G4FukuiRenderer& GetSystem () { return fSystem ; }
|
||||
void SendBoundingBox ( void );
|
||||
|
||||
private:
|
||||
|
||||
//----- Utilities etc
|
||||
G4bool SendVisAttributes ( const G4VisAttributes* pAV );
|
||||
G4bool IsVisible ( void ) ;
|
||||
G4bool InitializeFR ( void ) ;
|
||||
void SendTransformedCoordinates( void ) ;
|
||||
void SendPhysVolName ( void ) ;
|
||||
|
||||
public:
|
||||
|
||||
void SendStr ( const char* char_string ) ;
|
||||
void SendStrInt( const char* char_string ,
|
||||
G4int ival );
|
||||
void SendStrInt3( const char* char_string ,
|
||||
G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 );
|
||||
void SendStrInt4( const char* char_string ,
|
||||
G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
G4int ival4 );
|
||||
void SendStrDouble( const char* char_string ,
|
||||
G4double dval );
|
||||
void SendStrDouble2( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 );
|
||||
void SendStrDouble3( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 );
|
||||
|
||||
void SendStrDouble4( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 );
|
||||
|
||||
void SendStrDouble5( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 );
|
||||
|
||||
void SendStrDouble6( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 );
|
||||
|
||||
void SendStrDouble7( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
G4double dval7 );
|
||||
|
||||
void SendStrDouble11( const char* char_string ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
G4double dval7 ,
|
||||
G4double dval8 ,
|
||||
G4double dval9 ,
|
||||
G4double dval10 ,
|
||||
G4double dval11 ) ;
|
||||
|
||||
void SendIntDouble3( G4int ival ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 );
|
||||
void SendInt3Str( G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
const char* char_string );
|
||||
void SendInt4Str( G4int ival1 ,
|
||||
G4int ival2 ,
|
||||
G4int ival3 ,
|
||||
G4int ival4 ,
|
||||
const char* char_string );
|
||||
|
||||
void SendStrDouble6Str( const char* char_string1 ,
|
||||
G4double dval1 ,
|
||||
G4double dval2 ,
|
||||
G4double dval3 ,
|
||||
G4double dval4 ,
|
||||
G4double dval5 ,
|
||||
G4double dval6 ,
|
||||
const char* char_string2 );
|
||||
|
||||
void SendInt ( G4int val );
|
||||
void SendDouble( G4double val );
|
||||
|
||||
|
||||
|
||||
private:
|
||||
G4FukuiRenderer& fSystem; // Graphics system for this scene.
|
||||
static G4int fSceneIdCount;
|
||||
static G4int fSceneCount; // No. of existing scenes.
|
||||
|
||||
G4FRClientServer& fPrimDest ; // defined in G4FukuiRenderer
|
||||
G4bool flag_in_modeling ;
|
||||
// true: FR_BEGIN_MODELING has sent to DAWN, and
|
||||
// FR_END_MODELING has not sent yet.
|
||||
// false: otherwise
|
||||
//
|
||||
// The flag flag_in_modeling is set to "true"
|
||||
// in BeginModeling(), and to "false"
|
||||
// in FREndModeling().
|
||||
// ( EndModeling() is not used.)
|
||||
|
||||
G4bool flag_saving_g4_prim ;
|
||||
|
||||
const int COMMAND_BUF_SIZE ;
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWN_DRIVER
|
||||
@@ -0,0 +1,55 @@
|
||||
// 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: G4FukuiRendererView.hh,v 2.1 1998/11/06 13:41:41 allison Exp $
|
||||
// GEANT4 tag $Name: geant4-00 $
|
||||
//
|
||||
//
|
||||
// Satoshi TANAKA, Fri Jun 28 12:10:14 JST 1996
|
||||
// FukuiRenderer view - opens window, hard copy, etc.
|
||||
|
||||
//=================//
|
||||
#ifdef G4VIS_BUILD_DAWN_DRIVER
|
||||
//=================//
|
||||
|
||||
|
||||
#ifndef G4FUKUI_RENDERER_VIEW_HH
|
||||
#define G4FUKUI_RENDERER_VIEW_HH
|
||||
|
||||
#include "G4VView.hh"
|
||||
#include "globals.hh"
|
||||
|
||||
class G4FukuiRendererScene ;
|
||||
|
||||
class G4FukuiRendererView: public G4VView {
|
||||
|
||||
enum FRDEV {FRDEV_PS=1, FRDEV_XWIN=2, FRDEV_PS2=3, FRDEV_XWIN2=4, FRDEV_OPEN_GL=5, FRDEV_DEVICE_END=6} ;
|
||||
|
||||
public:
|
||||
//----- constructor and destructor
|
||||
G4FukuiRendererView (G4FukuiRendererScene& scene, const G4String& name);
|
||||
~G4FukuiRendererView ();
|
||||
|
||||
//----- overriding base class methods
|
||||
void SetView (); // Do nothing. SendViewParameters will do its job.
|
||||
void ClearView ();
|
||||
void DrawView ();
|
||||
void ShowView ();
|
||||
void FlushView (); // ShowView() without calling Wait()
|
||||
|
||||
//---- methods inherent to this class
|
||||
void Wait() ;
|
||||
void SendViewParameters () ;
|
||||
|
||||
private:
|
||||
void SendDevice( FRDEV dev );
|
||||
void SendDrawingStyle() ;
|
||||
G4FukuiRendererScene& fScene; // Reference to Graphics Scene for this view.
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif //G4VIS_BUILD_DAWN_DRIVER
|
||||
Reference in New Issue
Block a user