Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/visualization/management/src/G4VisCommandsTouchableSet.cc

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /visualization/management/src/G4VisCommandsTouchableSet.cc (Version 11.3.0) and /visualization/management/src/G4VisCommandsTouchableSet.cc (Version 11.2.1)


  1 //                                                  1 //
  2 // *******************************************      2 // ********************************************************************
  3 // * License and Disclaimer                         3 // * License and Disclaimer                                           *
  4 // *                                                4 // *                                                                  *
  5 // * The  Geant4 software  is  copyright of th      5 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
  6 // * the Geant4 Collaboration.  It is provided      6 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
  7 // * conditions of the Geant4 Software License      7 // * conditions of the Geant4 Software License,  included in the file *
  8 // * LICENSE and available at  http://cern.ch/      8 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
  9 // * include a list of copyright holders.           9 // * include a list of copyright holders.                             *
 10 // *                                               10 // *                                                                  *
 11 // * Neither the authors of this software syst     11 // * Neither the authors of this software system, nor their employing *
 12 // * institutes,nor the agencies providing fin     12 // * institutes,nor the agencies providing financial support for this *
 13 // * work  make  any representation or  warran     13 // * work  make  any representation or  warranty, express or implied, *
 14 // * regarding  this  software system or assum     14 // * regarding  this  software system or assume any liability for its *
 15 // * use.  Please see the license in the file      15 // * use.  Please see the license in the file  LICENSE  and URL above *
 16 // * for the full disclaimer and the limitatio     16 // * for the full disclaimer and the limitation of liability.         *
 17 // *                                               17 // *                                                                  *
 18 // * This  code  implementation is the result      18 // * This  code  implementation is the result of  the  scientific and *
 19 // * technical work of the GEANT4 collaboratio     19 // * technical work of the GEANT4 collaboration.                      *
 20 // * By using,  copying,  modifying or  distri     20 // * By using,  copying,  modifying or  distributing the software (or *
 21 // * any work based  on the software)  you  ag     21 // * any work based  on the software)  you  agree  to acknowledge its *
 22 // * use  in  resulting  scientific  publicati     22 // * use  in  resulting  scientific  publications,  and indicate your *
 23 // * acceptance of all terms of the Geant4 Sof     23 // * acceptance of all terms of the Geant4 Software license.          *
 24 // *******************************************     24 // ********************************************************************
 25 //                                                 25 //
 26 //                                                 26 //
 27                                                    27 
 28 // /vis/touchable/set commands - John Allison      28 // /vis/touchable/set commands - John Allison  8th October 2012
 29                                                    29 
 30 #include "G4VisCommandsTouchableSet.hh"            30 #include "G4VisCommandsTouchableSet.hh"
 31                                                    31 
 32 #include "G4UImanager.hh"                          32 #include "G4UImanager.hh"
 33 #include "G4UIcommand.hh"                          33 #include "G4UIcommand.hh"
 34 #include "G4UIcmdWithABool.hh"                     34 #include "G4UIcmdWithABool.hh"
 35 #include "G4UIcmdWithADouble.hh"                   35 #include "G4UIcmdWithADouble.hh"
 36 #include "G4UIcmdWithAnInteger.hh"                 36 #include "G4UIcmdWithAnInteger.hh"
 37 #include "G4UIcmdWithAString.hh"                   37 #include "G4UIcmdWithAString.hh"
 38                                                    38 
 39 #include <sstream>                                 39 #include <sstream>
 40                                                    40 
 41 #define G4warn G4cout                              41 #define G4warn G4cout
 42                                                    42 
 43 ////////////// /vis/touchable/set/colour /////     43 ////////////// /vis/touchable/set/colour ///////////////////////////////////////
 44                                                    44 
 45 G4VisCommandsTouchableSet::G4VisCommandsToucha     45 G4VisCommandsTouchableSet::G4VisCommandsTouchableSet()
 46 {                                                  46 {
 47   G4bool omitable;                                 47   G4bool omitable;
 48   G4UIparameter* parameter;                        48   G4UIparameter* parameter;
 49                                                    49   
 50   fpCommandSetColour = new G4UIcommand             50   fpCommandSetColour = new G4UIcommand
 51   ("/vis/touchable/set/colour", this);             51   ("/vis/touchable/set/colour", this);
 52   fpCommandSetColour->SetGuidance("Set colour      52   fpCommandSetColour->SetGuidance("Set colour of current touchable.");
 53   fpCommandSetColour->SetGuidance                  53   fpCommandSetColour->SetGuidance
 54   ("Use \"/vis/set/touchable\" to set current      54   ("Use \"/vis/set/touchable\" to set current touchable.");
 55   fpCommandSetColour->SetGuidance(ConvertToCol     55   fpCommandSetColour->SetGuidance(ConvertToColourGuidance());
 56   parameter = new G4UIparameter("red", 's', om     56   parameter = new G4UIparameter("red", 's', omitable = true);
 57   parameter->SetDefaultValue("1.");                57   parameter->SetDefaultValue("1.");
 58   fpCommandSetColour->SetParameter(parameter);     58   fpCommandSetColour->SetParameter(parameter);
 59   parameter = new G4UIparameter("green", 'd',      59   parameter = new G4UIparameter("green", 'd', omitable = true);
 60   parameter->SetDefaultValue(1.);                  60   parameter->SetDefaultValue(1.);
 61   fpCommandSetColour->SetParameter(parameter);     61   fpCommandSetColour->SetParameter(parameter);
 62   parameter = new G4UIparameter("blue", 'd', o     62   parameter = new G4UIparameter("blue", 'd', omitable = true);
 63   parameter->SetDefaultValue(1.);                  63   parameter->SetDefaultValue(1.);
 64   fpCommandSetColour->SetParameter(parameter);     64   fpCommandSetColour->SetParameter(parameter);
 65   parameter = new G4UIparameter("opacity", 'd'     65   parameter = new G4UIparameter("opacity", 'd', omitable = true);
 66   parameter->SetDefaultValue(1.);                  66   parameter->SetDefaultValue(1.);
 67   fpCommandSetColour->SetParameter(parameter);     67   fpCommandSetColour->SetParameter(parameter);
 68                                                    68 
 69   fpCommandSetDaughtersInvisible = new G4UIcmd     69   fpCommandSetDaughtersInvisible = new G4UIcmdWithABool
 70   ("/vis/touchable/set/daughtersInvisible", th     70   ("/vis/touchable/set/daughtersInvisible", this);
 71   fpCommandSetDaughtersInvisible->SetGuidance      71   fpCommandSetDaughtersInvisible->SetGuidance
 72   ("Daughters of current touchable invisible:      72   ("Daughters of current touchable invisible: true/false.");
 73   fpCommandSetDaughtersInvisible->SetGuidance      73   fpCommandSetDaughtersInvisible->SetGuidance
 74   ("Use \"/vis/set/touchable\" to set current      74   ("Use \"/vis/set/touchable\" to set current touchable.");
 75   fpCommandSetDaughtersInvisible->SetParameter     75   fpCommandSetDaughtersInvisible->SetParameterName("daughtersInvisible", omitable = true);
 76   fpCommandSetDaughtersInvisible->SetDefaultVa     76   fpCommandSetDaughtersInvisible->SetDefaultValue(true);
 77                                                    77 
 78   fpCommandSetForceAuxEdgeVisible = new G4UIcm     78   fpCommandSetForceAuxEdgeVisible = new G4UIcmdWithABool
 79   ("/vis/touchable/set/forceAuxEdgeVisible", t     79   ("/vis/touchable/set/forceAuxEdgeVisible", this);
 80   fpCommandSetForceAuxEdgeVisible->SetGuidance     80   fpCommandSetForceAuxEdgeVisible->SetGuidance
 81     ("Force auxiliary (soft) edges of current      81     ("Force auxiliary (soft) edges of current touchable to be visible: true/false.");
 82   fpCommandSetForceAuxEdgeVisible->SetGuidance     82   fpCommandSetForceAuxEdgeVisible->SetGuidance
 83   ("Use \"/vis/set/touchable\" to set current      83   ("Use \"/vis/set/touchable\" to set current touchable.");
 84   fpCommandSetForceAuxEdgeVisible->SetParamete     84   fpCommandSetForceAuxEdgeVisible->SetParameterName("forceAuxEdgeVisible", omitable = true);
 85   fpCommandSetForceAuxEdgeVisible->SetDefaultV     85   fpCommandSetForceAuxEdgeVisible->SetDefaultValue(true);
 86                                                    86 
 87   fpCommandSetForceCloud = new G4UIcmdWithABoo     87   fpCommandSetForceCloud = new G4UIcmdWithABool
 88   ("/vis/touchable/set/forceCloud", this);         88   ("/vis/touchable/set/forceCloud", this);
 89   fpCommandSetForceCloud->SetGuidance              89   fpCommandSetForceCloud->SetGuidance
 90   ("Force current touchable always to be drawn     90   ("Force current touchable always to be drawn as a cloud.");
 91   fpCommandSetForceCloud->SetGuidance              91   fpCommandSetForceCloud->SetGuidance
 92   ("Use \"/vis/set/touchable\" to set current      92   ("Use \"/vis/set/touchable\" to set current touchable.");
 93   fpCommandSetForceCloud->SetParameterName("fo     93   fpCommandSetForceCloud->SetParameterName("force", omitable = true);
 94   fpCommandSetForceCloud->SetDefaultValue(true     94   fpCommandSetForceCloud->SetDefaultValue(true);
 95                                                    95 
 96   fpCommandSetForceSolid = new G4UIcmdWithABoo     96   fpCommandSetForceSolid = new G4UIcmdWithABool
 97   ("/vis/touchable/set/forceSolid", this);         97   ("/vis/touchable/set/forceSolid", this);
 98   fpCommandSetForceSolid->SetGuidance              98   fpCommandSetForceSolid->SetGuidance
 99   ("Force current touchable always to be drawn     99   ("Force current touchable always to be drawn solid (surface drawing).");
100   fpCommandSetForceSolid->SetGuidance             100   fpCommandSetForceSolid->SetGuidance
101   ("Use \"/vis/set/touchable\" to set current     101   ("Use \"/vis/set/touchable\" to set current touchable.");
102   fpCommandSetForceSolid->SetParameterName("fo    102   fpCommandSetForceSolid->SetParameterName("force", omitable = true);
103   fpCommandSetForceSolid->SetDefaultValue(true    103   fpCommandSetForceSolid->SetDefaultValue(true);
104                                                   104 
105   fpCommandSetForceWireframe = new G4UIcmdWith    105   fpCommandSetForceWireframe = new G4UIcmdWithABool
106   ("/vis/touchable/set/forceWireframe", this);    106   ("/vis/touchable/set/forceWireframe", this);
107   fpCommandSetForceWireframe->SetGuidance         107   fpCommandSetForceWireframe->SetGuidance
108   ("Force current touchable always to be drawn    108   ("Force current touchable always to be drawn as wireframe.");
109   fpCommandSetForceWireframe->SetGuidance         109   fpCommandSetForceWireframe->SetGuidance
110   ("Use \"/vis/set/touchable\" to set current     110   ("Use \"/vis/set/touchable\" to set current touchable.");
111   fpCommandSetForceWireframe->SetParameterName    111   fpCommandSetForceWireframe->SetParameterName("forceWireframe", omitable = true);
112   fpCommandSetForceWireframe->SetDefaultValue(    112   fpCommandSetForceWireframe->SetDefaultValue(true);
113                                                   113 
114   fpCommandSetLineSegmentsPerCircle = new G4UI    114   fpCommandSetLineSegmentsPerCircle = new G4UIcmdWithAnInteger
115   ("/vis/touchable/set/lineSegmentsPerCircle",    115   ("/vis/touchable/set/lineSegmentsPerCircle", this);
116   fpCommandSetLineSegmentsPerCircle->SetGuidan    116   fpCommandSetLineSegmentsPerCircle->SetGuidance
117     ("For current touchable, set number of lin    117     ("For current touchable, set number of line segments per circle, the"
118      "\nprecision with which a curved line or     118      "\nprecision with which a curved line or surface is represented by a"
119      "\npolygon or polyhedron, regardless of t    119      "\npolygon or polyhedron, regardless of the view parameters."
120      "\nNegative to pick up G4Polyhedron defau    120      "\nNegative to pick up G4Polyhedron default value.");
121   fpCommandSetLineSegmentsPerCircle->SetGuidan    121   fpCommandSetLineSegmentsPerCircle->SetGuidance
122   ("Use \"/vis/set/touchable\" to set current     122   ("Use \"/vis/set/touchable\" to set current touchable.");
123   fpCommandSetLineSegmentsPerCircle->SetParame    123   fpCommandSetLineSegmentsPerCircle->SetParameterName("lineSegmentsPerCircle", omitable = true);
124   fpCommandSetLineSegmentsPerCircle->SetDefaul    124   fpCommandSetLineSegmentsPerCircle->SetDefaultValue(0);
125                                                   125 
126   fpCommandSetLineStyle = new G4UIcmdWithAStri    126   fpCommandSetLineStyle = new G4UIcmdWithAString
127   ("/vis/touchable/set/lineStyle", this);         127   ("/vis/touchable/set/lineStyle", this);
128   fpCommandSetLineStyle->SetGuidance("Set line    128   fpCommandSetLineStyle->SetGuidance("Set line style of current touchable drawing.");
129   fpCommandSetLineStyle->SetGuidance              129   fpCommandSetLineStyle->SetGuidance
130   ("Use \"/vis/set/touchable\" to set current     130   ("Use \"/vis/set/touchable\" to set current touchable.");
131   fpCommandSetLineStyle->SetParameterName("lin    131   fpCommandSetLineStyle->SetParameterName("lineStyle", omitable = true);
132   fpCommandSetLineStyle->SetCandidates("unbrok    132   fpCommandSetLineStyle->SetCandidates("unbroken dashed dotted");
133   fpCommandSetLineStyle->SetDefaultValue("unbr    133   fpCommandSetLineStyle->SetDefaultValue("unbroken");
134                                                   134 
135   fpCommandSetLineWidth = new G4UIcmdWithADoub    135   fpCommandSetLineWidth = new G4UIcmdWithADouble
136   ("/vis/touchable/set/lineWidth", this);         136   ("/vis/touchable/set/lineWidth", this);
137   fpCommandSetLineWidth->SetGuidance("Set line    137   fpCommandSetLineWidth->SetGuidance("Set line width of current touchable.");
138   fpCommandSetLineWidth->SetGuidance              138   fpCommandSetLineWidth->SetGuidance
139   ("Use \"/vis/set/touchable\" to set current     139   ("Use \"/vis/set/touchable\" to set current touchable.");
140   fpCommandSetLineWidth->SetParameterName("lin    140   fpCommandSetLineWidth->SetParameterName("lineWidth", omitable = true);
141   fpCommandSetLineWidth->SetDefaultValue(1.);     141   fpCommandSetLineWidth->SetDefaultValue(1.);
142                                                   142 
143   fpCommandSetNumberOfCloudPoints = new G4UIcm    143   fpCommandSetNumberOfCloudPoints = new G4UIcmdWithAnInteger
144   ("/vis/touchable/set/numberOfCloudPoints", t    144   ("/vis/touchable/set/numberOfCloudPoints", this);
145   fpCommandSetNumberOfCloudPoints->SetGuidance    145   fpCommandSetNumberOfCloudPoints->SetGuidance
146   ("For current touchable, set number of cloud    146   ("For current touchable, set number of cloud points for cloud drawing."
147    "\n<= 0 means under control of viewer.");      147    "\n<= 0 means under control of viewer.");
148   fpCommandSetNumberOfCloudPoints->SetGuidance    148   fpCommandSetNumberOfCloudPoints->SetGuidance
149   ("Use \"/vis/set/touchable\" to set current     149   ("Use \"/vis/set/touchable\" to set current touchable.");
150   fpCommandSetNumberOfCloudPoints->SetParamete    150   fpCommandSetNumberOfCloudPoints->SetParameterName("numberOfCloudPoints", omitable = true);
151   fpCommandSetNumberOfCloudPoints->SetDefaultV    151   fpCommandSetNumberOfCloudPoints->SetDefaultValue(0);
152                                                   152 
153   fpCommandSetVisibility = new G4UIcmdWithABoo    153   fpCommandSetVisibility = new G4UIcmdWithABool
154   ("/vis/touchable/set/visibility", this);        154   ("/vis/touchable/set/visibility", this);
155   fpCommandSetVisibility->SetGuidance             155   fpCommandSetVisibility->SetGuidance
156   ("Set visibility of current touchable: true/    156   ("Set visibility of current touchable: true/false.");
157   fpCommandSetVisibility->SetGuidance             157   fpCommandSetVisibility->SetGuidance
158   ("Use \"/vis/set/touchable\" to set current     158   ("Use \"/vis/set/touchable\" to set current touchable.");
159   fpCommandSetVisibility->SetParameterName("vi    159   fpCommandSetVisibility->SetParameterName("visibility", omitable = true);
160   fpCommandSetVisibility->SetDefaultValue(true    160   fpCommandSetVisibility->SetDefaultValue(true);
161 }                                                 161 }
162                                                   162 
163 G4VisCommandsTouchableSet::~G4VisCommandsTouch    163 G4VisCommandsTouchableSet::~G4VisCommandsTouchableSet() {
164   delete fpCommandSetVisibility;                  164   delete fpCommandSetVisibility;
165   delete fpCommandSetNumberOfCloudPoints;         165   delete fpCommandSetNumberOfCloudPoints;
166   delete fpCommandSetLineWidth;                   166   delete fpCommandSetLineWidth;
167   delete fpCommandSetLineStyle;                   167   delete fpCommandSetLineStyle;
168   delete fpCommandSetForceWireframe;              168   delete fpCommandSetForceWireframe;
169   delete fpCommandSetForceSolid;                  169   delete fpCommandSetForceSolid;
170   delete fpCommandSetForceCloud;                  170   delete fpCommandSetForceCloud;
171   delete fpCommandSetLineSegmentsPerCircle;       171   delete fpCommandSetLineSegmentsPerCircle;
172   delete fpCommandSetForceAuxEdgeVisible;         172   delete fpCommandSetForceAuxEdgeVisible;
173   delete fpCommandSetDaughtersInvisible;          173   delete fpCommandSetDaughtersInvisible;
174   delete fpCommandSetColour;                      174   delete fpCommandSetColour;
175 }                                                 175 }
176                                                   176 
177 G4String G4VisCommandsTouchableSet::GetCurrent    177 G4String G4VisCommandsTouchableSet::GetCurrentValue(G4UIcommand*) {
178   return "";                                      178   return "";
179 }                                                 179 }
180                                                   180 
181 void G4VisCommandsTouchableSet::SetNewValue       181 void G4VisCommandsTouchableSet::SetNewValue
182 (G4UIcommand* command,G4String newValue)          182 (G4UIcommand* command,G4String newValue)
183 {                                                 183 {
184   G4VisManager::Verbosity verbosity = fpVisMan    184   G4VisManager::Verbosity verbosity = fpVisManager->GetVerbosity();
185                                                   185 
186   G4VViewer* currentViewer = fpVisManager->Get    186   G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
187   if (!currentViewer) {                           187   if (!currentViewer) {
188     if (verbosity >= G4VisManager::errors) {      188     if (verbosity >= G4VisManager::errors) {
189       G4warn <<                                   189       G4warn <<
190       "ERROR: G4VisCommandsTouchableSet::SetNe    190       "ERROR: G4VisCommandsTouchableSet::SetNewValue: no current viewer."
191       << G4endl;                                  191       << G4endl;
192     }                                             192     }
193     return;                                       193     return;
194   }                                               194   }
195                                                   195 
196   G4ViewParameters workingVP = currentViewer->    196   G4ViewParameters workingVP = currentViewer->GetViewParameters();
197   G4VisAttributes workingVisAtts;                 197   G4VisAttributes workingVisAtts;
198                                                   198   
199   if (command == fpCommandSetColour)              199   if (command == fpCommandSetColour)
200   {                                               200   {
201     G4String redOrString;                         201     G4String redOrString;
202     G4double green, blue, opacity;                202     G4double green, blue, opacity;
203     std::istringstream iss(newValue);             203     std::istringstream iss(newValue);
204     iss >> redOrString >> green >> blue >> opa    204     iss >> redOrString >> green >> blue >> opacity;
205     G4Colour colour(1,1,1,1);  // Default whit    205     G4Colour colour(1,1,1,1);  // Default white and opaque.
206     ConvertToColour(colour, redOrString, green    206     ConvertToColour(colour, redOrString, green, blue, opacity);    
207     workingVisAtts.SetColour(colour);             207     workingVisAtts.SetColour(colour);
208     workingVP.AddVisAttributesModifier            208     workingVP.AddVisAttributesModifier
209     (G4ModelingParameters::VisAttributesModifi    209     (G4ModelingParameters::VisAttributesModifier
210      (workingVisAtts,                             210      (workingVisAtts,
211       G4ModelingParameters::VASColour,            211       G4ModelingParameters::VASColour,
212       fCurrentTouchableProperties.fTouchablePa    212       fCurrentTouchableProperties.fTouchablePath));
213   }                                               213   }
214                                                   214   
215   else if (command == fpCommandSetDaughtersInv    215   else if (command == fpCommandSetDaughtersInvisible) {
216     workingVisAtts.SetDaughtersInvisible(G4UIc    216     workingVisAtts.SetDaughtersInvisible(G4UIcommand::ConvertToBool(newValue));
217     workingVP.AddVisAttributesModifier            217     workingVP.AddVisAttributesModifier
218     (G4ModelingParameters::VisAttributesModifi    218     (G4ModelingParameters::VisAttributesModifier
219      (workingVisAtts,                             219      (workingVisAtts,
220       G4ModelingParameters::VASDaughtersInvisi    220       G4ModelingParameters::VASDaughtersInvisible,
221       fCurrentTouchableProperties.fTouchablePa    221       fCurrentTouchableProperties.fTouchablePath));
222   }                                               222   }
223                                                   223   
224   else if (command == fpCommandSetForceAuxEdge    224   else if (command == fpCommandSetForceAuxEdgeVisible) {
225     workingVisAtts.SetForceAuxEdgeVisible(G4UI    225     workingVisAtts.SetForceAuxEdgeVisible(G4UIcommand::ConvertToBool(newValue));
226     workingVP.AddVisAttributesModifier            226     workingVP.AddVisAttributesModifier
227     (G4ModelingParameters::VisAttributesModifi    227     (G4ModelingParameters::VisAttributesModifier
228      (workingVisAtts,                             228      (workingVisAtts,
229       G4ModelingParameters::VASForceAuxEdgeVis    229       G4ModelingParameters::VASForceAuxEdgeVisible,
230       fCurrentTouchableProperties.fTouchablePa    230       fCurrentTouchableProperties.fTouchablePath));
231   }                                               231   }
232                                                   232   
233   else if (command == fpCommandSetLineSegments    233   else if (command == fpCommandSetLineSegmentsPerCircle) {
234     workingVisAtts.SetForceLineSegmentsPerCirc    234     workingVisAtts.SetForceLineSegmentsPerCircle
235     (G4UIcommand::ConvertToInt(newValue));        235     (G4UIcommand::ConvertToInt(newValue));
236     workingVP.AddVisAttributesModifier            236     workingVP.AddVisAttributesModifier
237     (G4ModelingParameters::VisAttributesModifi    237     (G4ModelingParameters::VisAttributesModifier
238      (workingVisAtts,                             238      (workingVisAtts,
239       G4ModelingParameters::VASForceLineSegmen    239       G4ModelingParameters::VASForceLineSegmentsPerCircle,
240       fCurrentTouchableProperties.fTouchablePa    240       fCurrentTouchableProperties.fTouchablePath));
241   }                                               241   }
242                                                   242   
243   else if (command == fpCommandSetForceCloud)     243   else if (command == fpCommandSetForceCloud) {
244     workingVisAtts.SetForceCloud(G4UIcommand::    244     workingVisAtts.SetForceCloud(G4UIcommand::ConvertToBool(newValue));
245     workingVP.AddVisAttributesModifier            245     workingVP.AddVisAttributesModifier
246     (G4ModelingParameters::VisAttributesModifi    246     (G4ModelingParameters::VisAttributesModifier
247      (workingVisAtts,                             247      (workingVisAtts,
248       G4ModelingParameters::VASForceCloud,        248       G4ModelingParameters::VASForceCloud,
249       fCurrentTouchableProperties.fTouchablePa    249       fCurrentTouchableProperties.fTouchablePath));
250   }                                               250   }
251                                                   251 
252   else if (command == fpCommandSetForceSolid)     252   else if (command == fpCommandSetForceSolid) {
253     workingVisAtts.SetForceSolid(G4UIcommand::    253     workingVisAtts.SetForceSolid(G4UIcommand::ConvertToBool(newValue));
254     workingVP.AddVisAttributesModifier            254     workingVP.AddVisAttributesModifier
255     (G4ModelingParameters::VisAttributesModifi    255     (G4ModelingParameters::VisAttributesModifier
256      (workingVisAtts,                             256      (workingVisAtts,
257       G4ModelingParameters::VASForceSolid,        257       G4ModelingParameters::VASForceSolid,
258       fCurrentTouchableProperties.fTouchablePa    258       fCurrentTouchableProperties.fTouchablePath));
259   }                                               259   }
260                                                   260 
261   else if (command == fpCommandSetForceWirefra    261   else if (command == fpCommandSetForceWireframe) {
262     workingVisAtts.SetForceWireframe(G4UIcomma    262     workingVisAtts.SetForceWireframe(G4UIcommand::ConvertToBool(newValue));
263     workingVP.AddVisAttributesModifier            263     workingVP.AddVisAttributesModifier
264     (G4ModelingParameters::VisAttributesModifi    264     (G4ModelingParameters::VisAttributesModifier
265      (workingVisAtts,                             265      (workingVisAtts,
266       G4ModelingParameters::VASForceWireframe,    266       G4ModelingParameters::VASForceWireframe,
267       fCurrentTouchableProperties.fTouchablePa    267       fCurrentTouchableProperties.fTouchablePath));
268   }                                               268   }
269                                                   269   
270   else if (command == fpCommandSetLineStyle) {    270   else if (command == fpCommandSetLineStyle) {
271     G4VisAttributes::LineStyle lineStyle = G4V    271     G4VisAttributes::LineStyle lineStyle = G4VisAttributes::unbroken;
272     if (newValue == "dashed") {                   272     if (newValue == "dashed") {
273       lineStyle = G4VisAttributes::dashed;        273       lineStyle = G4VisAttributes::dashed;
274     } else if (newValue == "dotted") {            274     } else if (newValue == "dotted") {
275       lineStyle = G4VisAttributes::dotted;        275       lineStyle = G4VisAttributes::dotted;
276     }                                             276     }
277     // All other values are "unbroken".           277     // All other values are "unbroken".
278     workingVisAtts.SetLineStyle(lineStyle);       278     workingVisAtts.SetLineStyle(lineStyle);
279     workingVP.AddVisAttributesModifier            279     workingVP.AddVisAttributesModifier
280     (G4ModelingParameters::VisAttributesModifi    280     (G4ModelingParameters::VisAttributesModifier
281      (workingVisAtts,                             281      (workingVisAtts,
282       G4ModelingParameters::VASLineStyle,         282       G4ModelingParameters::VASLineStyle,
283       fCurrentTouchableProperties.fTouchablePa    283       fCurrentTouchableProperties.fTouchablePath));
284   }                                               284   }
285                                                   285   
286   else if (command == fpCommandSetLineWidth) {    286   else if (command == fpCommandSetLineWidth) {
287     workingVisAtts.SetLineWidth(G4UIcommand::C    287     workingVisAtts.SetLineWidth(G4UIcommand::ConvertToDouble(newValue));
288     workingVP.AddVisAttributesModifier            288     workingVP.AddVisAttributesModifier
289     (G4ModelingParameters::VisAttributesModifi    289     (G4ModelingParameters::VisAttributesModifier
290      (workingVisAtts,                             290      (workingVisAtts,
291       G4ModelingParameters::VASLineWidth,         291       G4ModelingParameters::VASLineWidth,
292       fCurrentTouchableProperties.fTouchablePa    292       fCurrentTouchableProperties.fTouchablePath));
293   }                                               293   }
294                                                   294   
295   else if (command == fpCommandSetNumberOfClou    295   else if (command == fpCommandSetNumberOfCloudPoints) {
296     workingVisAtts.SetForceNumberOfCloudPoints    296     workingVisAtts.SetForceNumberOfCloudPoints
297     (G4UIcommand::ConvertToInt(newValue));        297     (G4UIcommand::ConvertToInt(newValue));
298     workingVP.AddVisAttributesModifier            298     workingVP.AddVisAttributesModifier
299     (G4ModelingParameters::VisAttributesModifi    299     (G4ModelingParameters::VisAttributesModifier
300      (workingVisAtts,                             300      (workingVisAtts,
301       G4ModelingParameters::VASForceNumberOfCl    301       G4ModelingParameters::VASForceNumberOfCloudPoints,
302       fCurrentTouchableProperties.fTouchablePa    302       fCurrentTouchableProperties.fTouchablePath));
303   }                                               303   }
304                                                   304 
305   else if (command == fpCommandSetVisibility)     305   else if (command == fpCommandSetVisibility) {
306     workingVisAtts.SetVisibility(G4UIcommand::    306     workingVisAtts.SetVisibility(G4UIcommand::ConvertToBool(newValue));
307     workingVP.AddVisAttributesModifier            307     workingVP.AddVisAttributesModifier
308     (G4ModelingParameters::VisAttributesModifi    308     (G4ModelingParameters::VisAttributesModifier
309      (workingVisAtts,                             309      (workingVisAtts,
310       G4ModelingParameters::VASVisibility,        310       G4ModelingParameters::VASVisibility,
311       fCurrentTouchableProperties.fTouchablePa    311       fCurrentTouchableProperties.fTouchablePath));
312     if (verbosity >= G4VisManager::warnings) {    312     if (verbosity >= G4VisManager::warnings) {
313       static G4bool first = true;                 313       static G4bool first = true;
314       if (first) {                                314       if (first) {
315         first = false;                            315         first = false;
316         G4warn << "WARNING: If \"/vis/touchabl    316         G4warn << "WARNING: If \"/vis/touchable/set/visibility\" does not appear to"
317         "\n  work, check that opacity (4th com    317         "\n  work, check that opacity (4th component of colour) is non-zero." << G4endl;
318         G4warn << "ALSO: The volume must be in    318         G4warn << "ALSO: The volume must be in a requested physical volume tree,"
319         "\n  not in the \"base path\". E.g., i    319         "\n  not in the \"base path\". E.g., if"
320         "\n    /vis/drawVolume volume-name"       320         "\n    /vis/drawVolume volume-name"
321         "\n  there is no way to make a parent     321         "\n  there is no way to make a parent of volume-name visible except by"
322         "\n  explicitly adding the parent:"       322         "\n  explicitly adding the parent:"
323         "\n    /vis/scene/add/volume parent-na    323         "\n    /vis/scene/add/volume parent-name" << G4endl;
324       }                                           324       }
325     }                                             325     }
326   }                                               326   }
327                                                   327   
328   else {                                          328   else {
329     if (verbosity >= G4VisManager::errors) {      329     if (verbosity >= G4VisManager::errors) {
330       G4warn <<                                   330       G4warn <<
331       "ERROR: G4VisCommandsTouchableSet::SetNe    331       "ERROR: G4VisCommandsTouchableSet::SetNewValue: unrecognised command."
332       << G4endl;                                  332       << G4endl;
333     }                                             333     }
334     return;                                       334     return;
335   }                                               335   }
336                                                   336 
337   SetViewParameters(currentViewer,workingVP);     337   SetViewParameters(currentViewer,workingVP);
338                                                   338 
339   // To update all views                          339   // To update all views
340   G4UImanager::GetUIpointer()->ApplyCommand("/    340   G4UImanager::GetUIpointer()->ApplyCommand("/vis/scene/notifyHandlers");
341 }                                                 341 }
342                                                   342