77 , fFlagDestOpen(false)
96 if(std::getenv(
"G4VRMLFILE_MAX_FILE_NUM") != NULL)
98 sscanf(std::getenv(
"G4VRMLFILE_MAX_FILE_NUM"),
"%d", &
fMaxFileNum);
110 if(std::getenv(
"G4VRML_PV_PICKABLE") != NULL)
113 sscanf(std::getenv(
"G4VRML_PV_PICKABLE"),
"%d", &is_pickable);
127#if defined DEBUG_FR_SCENE
134#define G4VRML2SCENEHANDLER G4VRML2FileSceneHandler
135#define IS_CONNECTED this->isConnected()
138#undef G4VRML2SCENEHANDLER
158 if(i == MAX_FILE_INDEX)
162 G4cout <<
"===========================================" <<
G4endl;
163 G4cout <<
"WARNING MESSAGE from VRML2FILE driver: " <<
G4endl;
164 G4cout <<
" This file name is the final one in the " <<
G4endl;
165 G4cout <<
" automatic updation of the output file name." <<
G4endl;
166 G4cout <<
" You may overwrite existing files, i.e. " <<
G4endl;
168 G4cout <<
"===========================================" <<
G4endl;
173 std::ostringstream filename;
183 filename << std::setw(2) << std::setfill(
'0') << i <<
".wrl";
208 G4cout <<
"===========================================" <<
G4endl;
210 G4cout <<
"Maximum number of files in the destination directory: "
212 G4cout <<
" (Customizable with the environment variable: "
213 "G4VRMLFILE_MAX_FILE_NUM) "
215 G4cout <<
"===========================================" <<
G4endl;
245 G4cout <<
" Set an environmental variable ";
247 G4cout <<
" if you want to visualize the generated VRML file"
251 G4cout <<
"ALSO you may change the file header with "
259 std::ostringstream ossCommand;
261 strncpy(command, ossCommand.str().c_str(),
sizeof(command) - 1);
262 command[
sizeof(command) - 1] =
'\0';
263 int iErr = system(command);
267 ed <<
"Error " << iErr <<
" when calling system with \"" << command
269 G4Exception(
"G4VRML2FileSceneHandler::closePort()",
"VRML-2006",
void G4Exception(const char *originOfException, const char *exceptionCode, G4ExceptionSeverity severity, const char *description)
std::ostringstream G4ExceptionDescription
const int DEFAULT_MAX_WRL_FILE_NUM
const char ENV_WRL_FILE_NAME[]
const char WRL_FILE_HEADER[]
const char VRMLFILE_DEST_DIR[]
const char NO_VRML_VIEWER[]
const char ENV_WRL_FILE_HEADER[]
const char ENV_VRML_VIEWER[]
G4GLOB_DLL std::ostream G4cout
static G4int fSceneIdCount
G4VRML2FileSceneHandler(G4VRML2File &system, const G4String &name="")
virtual ~G4VRML2FileSceneHandler()
G4double SetPVTransparency()
void SetPVPickability(G4bool on_off)
char fVRMLFileDestDir[256]
static Verbosity GetVerbosity()
const char * name(G4int ptype)