35 #ifdef G4VIS_BUILD_VRML_DRIVER
73 fPVPickable (
false ),
78 if( std::getenv(
"G4VRML_PV_PICKABLE" ) != NULL ) {
81 sscanf( std::getenv(
"G4VRML_PV_PICKABLE"),
"%d", &is_pickable ) ;
83 if ( is_pickable ) { SetPVPickability (
true ) ; }
92 G4VRML2SceneHandler::~G4VRML2SceneHandler()
94 #if defined DEBUG_FR_SCENE
102 #define G4VRML2SCENEHANDLER G4VRML2SceneHandler
103 #define IS_CONNECTED fDest.isConnected()
104 #include "G4VRML2SceneHandlerFunc.icc"
106 #undef G4VRML2SCENEHANDLER
109 void G4VRML2SceneHandler::connectPort(
G4int max_trial)
112 int port = fSystem.getPort();
113 for (trial = 0; !fDest.isConnected()&& trial < max_trial; trial++, port++ ) {
114 if (fDest.connect( (
const char * )fSystem.getHostName(), port)) {
117 G4cout <<
"*** GEANT4 is connected to port ";
118 G4cout << fDest.getPort();
119 G4cout <<
" of server " << fSystem.getHostName() <<
G4endl;
125 G4cout <<
"*** GEANT4 incremented targeting port to ";
134 if (!fDest.isConnected()) {
137 G4cout <<
" Maybe, you have not invoked viewer g4vrmlview yet, " <<
G4endl;
138 G4cout <<
" or too many viewers are already running in the " <<
G4endl;
139 G4cout <<
" server host(" << fSystem.getHostName() <<
"). " <<
G4endl;
144 void G4VRML2SceneHandler::closePort()
152 G4int G4VRML2SceneHandler::fSceneIdCount = 0;