SLIC  6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
VRML2WriterMessenger.cc
Go to the documentation of this file.
2 
3 // SLIC
4 #include "VRML2Writer.hh"
5 
6 // Geant4
7 #include "G4UIcommand.hh"
8 #include "G4UIdirectory.hh"
9 #include "G4UIcmdWithAString.hh"
10 
11 namespace slic {
12 
14  m_vrmlDir = new G4UIdirectory("/vrml/");
15  m_vrmlDir->SetGuidance("Test VRML2Writer. [SLIC]");
16 
17  m_writeVrmlCmd = new G4UIcmdWithAString("/vrml/writeVRML", this);
18  m_writeVrmlCmd->SetGuidance("Write VRML of current geometry to a file.");
19 
20 }
21 
23  ;
24 }
25 
26 void VRML2WriterMessenger::SetNewValue(G4UIcommand* cmd, G4String newVals) {
27  G4String fname;
28  if (newVals == "")
29  fname = "geometry.wrl";
30  else
31  fname = newVals;
32  VRML2Writer* writer = new VRML2Writer(fname);
33  writer->write();
34  delete writer;
35  writer = 0;
36 }
37 }
void SetNewValue(G4UIcommand *cmd, G4String newVals)
G4UIcmdWithAString * m_writeVrmlCmd
A simple, standalone VRML2 writer that dumps the detector geometry in a hierarchical format.
Definition: VRML2Writer.hh:21