#include <G4VisCommandsViewer.hh>
Definition at line 272 of file G4VisCommandsViewer.hh.
 
      
        
          | G4VisCommandViewerSave::G4VisCommandViewerSave  | 
          ( | 
           | ) | 
           | 
        
      
 
Definition at line 1604 of file G4VisCommandsViewer.cc.
 1607   fpCommand -> SetGuidance
 
 1608   (
"Write commands that define the current view to file.");
 
 1609   fpCommand -> SetGuidance
 
 1610   (
"Read them back into the same or any viewer with \"/control/execute\".");
 
 1611   fpCommand -> SetGuidance
 
 1612   (
"If the filename is omitted the view is saved to a file " 
 1613    "\"g4_nn.g4view\", where nn is a sequential two-digit number.");
 
 1614   fpCommand -> SetGuidance
 
 1615   (
"If the filename is \"-\", the data are written to G4cout.");
 
 1616   fpCommand -> SetGuidance
 
 1617   (
"If you are wanting to save views for future interpolation a recommended " 
 1618    "procedure is: save views to \"g4_nn.g4view\", as above, then move the files " 
 1619    "into a sub-directory, say, \"views\", then interpolate with" 
 1620    "\"/vis/viewer/interpolate views/\" (note the trailing \'/\').");
 
 1621   fpCommand -> SetParameterName (
"filename", omitable = 
true);
 
 1622   fpCommand -> SetDefaultValue (
"");
 
 
 
 
  
  
      
        
          | G4VisCommandViewerSave::~G4VisCommandViewerSave  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtual   | 
  
 
 
Reimplemented from G4UImessenger.
Definition at line 1649 of file G4VisCommandsViewer.cc.
 1654   if (!currentViewer) {
 
 1657       "ERROR: G4VisCommandsViewerSave::SetNewValue: no current viewer." 
 1664   if (!currentScene) {
 
 1667       "ERROR: G4VisCommandsViewerSave::SetNewValue: no current scene." 
 1676   const std::vector<G4ModelingParameters::VisAttributesModifier>*
 
 1679     std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
 
 1680     for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
 
 1687   if (newValue.length() == 0) {
 
 1689     const G4int maxNoOfFiles = 100;
 
 1690     static G4int sequenceNumber = 0;
 
 1691     if (sequenceNumber >= maxNoOfFiles) {
 
 1694         << 
"ERROR: G4VisCommandsViewerSave::SetNewValue: Maximum number, " 
 1696         << 
", of files exceeded." 
 1701     std::ostringstream oss;
 
 1702     oss << std::setw(2) << std::setfill(
'0') << sequenceNumber++;
 
 1703     filename = 
"g4_" + oss.str() + 
".g4view";
 
 1706   if (filename == 
"-") {
 
 1708     WriteCommands(
G4cout,vp,stp);
 
 1711     std::ofstream ofs(filename);
 
 1715         "ERROR: G4VisCommandsViewerSave::SetNewValue: Trouble opening file \"" 
 1716         << filename << 
"\"." 
 1722     WriteCommands(ofs,vp,stp);
 
 1727     G4cout << 
"Viewer \"" << currentViewer -> GetName ()
 
 1728     << 
"\"" << 
" saved to ";
 
 1729     if (filename == 
"-") {
 
 1732       G4cout << 
"file \'" << filename << 
"\"." <<
 
 1733       "\n  Read the view back into this or any viewer with" 
 1734       "\n  \"/control/execute " << filename << 
"\" or use" 
 1735       "\n  \"/vis/viewer/interpolate\" if you have several saved files -" 
 1736       "\n  see \"help /vis/viewer/interpolate\" for guidance.";
 
const G4ViewParameters & GetViewParameters() const 
 
G4GLOB_DLL std::ostream G4cout
 
const G4Point3D & GetStandardTargetPoint() const 
 
G4Scene * GetScene() const 
 
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
 
G4VSceneHandler * GetSceneHandler() const 
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const 
 
static Verbosity GetVerbosity()
 
G4VViewer * GetCurrentViewer() const 
 
G4GLOB_DLL std::ostream G4cerr
 
static G4VisManager * fpVisManager
 
 
 
 
The documentation for this class was generated from the following files: