59 auto parameterExport =
new G4UIparameter (
"name",
's', omitable =
true);
64 parameterExport =
new G4UIparameter (
"name",
's', omitable =
true);
90 G4cout <<
"G4VtkMessenger::SetNewValue: No current viewer.\n"
91 <<
"\"/vis/open\", or similar, to get one."
96 auto* pVtkViewer =
dynamic_cast<G4VtkViewer*
>(pViewer);
98 G4cout <<
"G4OpenGLViewerMessenger::SetNewValue: Current viewer is not of type VTK. \n"
102 <<
"Use \"/vis/viewer/select\" or \"/vis/open\"."
111 std::istringstream iss(newValue);
112 iss >> format >>
name;
114 if(format ==
"jpg" || format ==
"tiff" ||
115 format ==
"png" || format ==
"bmp" ||
116 format ==
"pnm" || format ==
"ps")
117 pVtkViewer->ExportScreenShot(
name, format);
118 else if(format ==
"obj")
119 pVtkViewer->ExportOBJScene(
name);
120 else if(format ==
"vrml")
121 pVtkViewer->ExportVRMLScene(
name);
122 else if(format ==
"vtp")
123 pVtkViewer->ExportVTPScene(
name);
125 G4cout <<
"Unknown /vis/vtk/export file format" <<
G4endl;
129 vtkObject::GlobalWarningDisplayOff();
G4GLOB_DLL std::ostream G4cout
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
const G4String & GetName() const
G4VViewer * GetCurrentViewer() const
static G4VisManager * GetInstance()
virtual void SetNewValue(G4UIcommand *command, G4String newValue)
virtual G4String GetCurrentValue(G4UIcommand *command)
static G4VtkMessenger * GetInstance()
G4UIdirectory * fpDirectory
static G4VtkMessenger * fpInstance
G4UIcmdWithABool * fpCommandWarnings
virtual ~G4VtkMessenger()
G4UIcommand * fpCommandExport
const char * name(G4int ptype)