57     (
"Copies view parameters.");
 
   59     (
"Copies view parameters (except the autoRefresh status) from" 
   60      "\nfrom-viewer to current viewer.");
 
   64     (
"/vis/viewer/set/autoRefresh",
this);
 
   65   fpCommandAutoRefresh->
SetGuidance(
"Sets auto-refresh.");
 
   67     (
"If true, view is automatically refreshed after a change of" 
   68      "\nview parameters.");
 
   73     (
"/vis/viewer/set/auxiliaryEdge",
this);
 
   74   fpCommandAuxEdge->
SetGuidance(
"Sets visibility of auxiliary edges");
 
   76     (
"Auxiliary edges, i.e., those that are part of a curved surface," 
   77      "\nsometimes called soft edges, become visible/invisible.");
 
   82     (
"/vis/viewer/set/background",
this);
 
   84     (
"Set background colour and transparency (default black and opaque).");
 
   86     (
"Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or" 
   87      "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..." 
   88      "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\"" 
   89      "\n    or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters)," 
   90      "\n    e.g. \"! ! ! 0.\" for a transparent background.");
 
   91   parameter = 
new G4UIparameter(
"red_or_string", 
's', omitable = 
true);
 
   92   parameter -> SetDefaultValue (
"0.");
 
   93   fpCommandBackground -> SetParameter (parameter);
 
   95   parameter -> SetDefaultValue (0.);
 
   96   fpCommandBackground -> SetParameter (parameter);
 
   98   parameter -> SetDefaultValue (0.);
 
   99   fpCommandBackground -> SetParameter (parameter);
 
  100   parameter = 
new G4UIparameter (
"opacity", 
'd', omitable = 
true);
 
  101   parameter -> SetDefaultValue (1.);
 
  102   fpCommandBackground -> SetParameter (parameter);
 
  104   fpCommandCulling = 
new G4UIcommand(
"/vis/viewer/set/culling",
this);
 
  105   fpCommandCulling->
SetGuidance (
"Set culling options.");
 
  107     (
"\"global\": enables/disables all other culling options.");
 
  109     (
"\"coveredDaughters\": culls, i.e., eliminates, volumes that would not" 
  110      "\nbe seen because covered by ancester volumes in surface drawing mode," 
  111      "\nand then only if the ancesters are visible and opaque, and then only" 
  112      "\nif no sections or cutaways are in operation.  Intended solely to" 
  113      "\nimprove the speed of rendering visible volumes.");
 
  115     (
"\"invisible\": culls objects with the invisible attribute set.");
 
  117     (
"\"density\": culls volumes with density lower than threshold.  Useful" 
  118      "\nfor eliminating \"container volumes\" with no physical correspondence," 
  119      "\nwhose material is usually air.  If this is selected, provide threshold" 
  120      "\ndensity and unit (g/cm3 mg/cm3 or kg/m3)." 
  122   parameter = 
new G4UIparameter(
"culling-option",
's',omitable = 
false);
 
  124     (
"global coveredDaughters invisible density");
 
  129   parameter = 
new G4UIparameter(
"density-threshold",
'd',omitable = 
true);
 
  137   fpCommandCutawayMode =
 
  140     (
"Sets cutaway mode - add (union) or multiply (intersection).");
 
  142   fpCommandCutawayMode->
SetCandidates (
"add union multiply intersection");
 
  146     (
"/vis/viewer/set/defaultColour",
this);
 
  148     (
"Set defaultColour colour and transparency (default white and opaque).");
 
  150     (
"Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or" 
  151      "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..." 
  152      "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\"" 
  153      "\n    or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters)," 
  154      "\n    e.g. \"! ! ! 0.\" for a transparent colour.");
 
  155   parameter = 
new G4UIparameter(
"red_or_string", 
's', omitable = 
true);
 
  156   parameter -> SetDefaultValue (
"1.");
 
  157   fpCommandDefaultColour -> SetParameter (parameter);
 
  158   parameter = 
new G4UIparameter(
"green", 
'd', omitable = 
true);
 
  159   parameter -> SetDefaultValue (1.);
 
  160   fpCommandDefaultColour -> SetParameter (parameter);
 
  161   parameter = 
new G4UIparameter (
"blue", 
'd', omitable = 
true);
 
  162   parameter -> SetDefaultValue (1.);
 
  163   fpCommandDefaultColour -> SetParameter (parameter);
 
  164   parameter = 
new G4UIparameter (
"opacity", 
'd', omitable = 
true);
 
  165   parameter -> SetDefaultValue (1.);
 
  166   fpCommandDefaultColour -> SetParameter (parameter);
 
  169     (
"/vis/viewer/set/defaultTextColour",
this);
 
  171     (
"Set defaultTextColour colour and transparency (default white and opaque).");
 
  173     (
"Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or" 
  174      "\n(b) string such as \"white\", \"black\", \"grey\", \"red\"..." 
  175      "\n(c) an additional number for opacity, e.g., \".3 .4 .5 .6\"" 
  176      "\n    or \"grey ! ! .6\" (note \"!\"'s for unused green and blue parameters)," 
  177      "\n    e.g. \"! ! ! 0.\" for a transparent colour.");
 
  178   parameter = 
new G4UIparameter(
"red_or_string", 
's', omitable = 
true);
 
  179   parameter -> SetDefaultValue (
"1.");
 
  180   fpCommandDefaultTextColour -> SetParameter (parameter);
 
  181   parameter = 
new G4UIparameter(
"green", 
'd', omitable = 
true);
 
  182   parameter -> SetDefaultValue (1.);
 
  183   fpCommandDefaultTextColour -> SetParameter (parameter);
 
  184   parameter = 
new G4UIparameter (
"blue", 
'd', omitable = 
true);
 
  185   parameter -> SetDefaultValue (1.);
 
  186   fpCommandDefaultTextColour -> SetParameter (parameter);
 
  187   parameter = 
new G4UIparameter (
"opacity", 
'd', omitable = 
true);
 
  188   parameter -> SetDefaultValue (1.);
 
  189   fpCommandDefaultTextColour -> SetParameter (parameter);
 
  193     (
"Edges become visible/invisible in surface mode.");
 
  198     (
"/vis/viewer/set/explodeFactor", 
this);
 
  200     (
"Moves top-level drawn volumes by this factor from this centre.");
 
  201   parameter = 
new G4UIparameter(
"explodeFactor", 
'd', omitable=
true);
 
  207   parameter->
SetGuidance      (
"Coordinate of explode centre.");
 
  211   parameter->
SetGuidance      (
"Coordinate of explode centre.");
 
  215   parameter->
SetGuidance      (
"Coordinate of explode centre.");
 
  219   parameter->
SetGuidance      (
"Unit of explode centre.");
 
  223     (
"/vis/viewer/set/globalLineWidthScale", 
this);
 
  225     (
"Multiplies line widths by this factor.");
 
  226   fpCommandGlobalLineWidthScale->
 
  227     SetParameterName(
"scale-factor", omitable=
true);
 
  231     (
"/vis/viewer/set/globalMarkerScale", 
this);
 
  233     (
"Multiplies marker sizes by this factor.");
 
  234   fpCommandGlobalMarkerScale->
 
  235     SetParameterName(
"scale-factor", omitable=
true);
 
  238   fpCommandHiddenEdge =
 
  241     (
"Edges become hidden/seen in wireframe or surface mode.");
 
  245   fpCommandHiddenMarker =
 
  248     (
"If true, closer objects hide markers. Otherwise, markers always show.");
 
  253     (
"/vis/viewer/set/lightsMove",
this);
 
  255     (
"Lights move with camera or with object");
 
  258     (
"cam camera with-camera obj object with-object");
 
  261     (
"/vis/viewer/set/lightsThetaPhi", 
this);
 
  263     (
"Set direction from target to lights.");
 
  264   parameter = 
new G4UIparameter(
"theta", 
'd', omitable = 
true);
 
  265   parameter -> SetDefaultValue(60.);
 
  266   fpCommandLightsThetaPhi -> SetParameter (parameter);
 
  268   parameter -> SetDefaultValue(45.);
 
  269   fpCommandLightsThetaPhi -> SetParameter (parameter);
 
  270   parameter = 
new G4UIparameter (
"unit", 
's', omitable = 
true);
 
  271   parameter -> SetDefaultValue (
"deg");
 
  272   fpCommandLightsThetaPhi -> SetParameter (parameter);
 
  275     (
"/vis/viewer/set/lightsVector", 
this);
 
  277     (
"Set direction from target to lights.");
 
  279   parameter -> SetDefaultValue (1);
 
  280   fpCommandLightsVector -> SetParameter (parameter);
 
  282   parameter -> SetDefaultValue (1);
 
  283   fpCommandLightsVector -> SetParameter (parameter);
 
  285   parameter -> SetDefaultValue (1);
 
  286   fpCommandLightsVector -> SetParameter (parameter);
 
  289     (
"/vis/viewer/set/lineSegmentsPerCircle",
this);
 
  291     (
"Set number of sides per circle for polygon/polyhedron drawing.");
 
  293  (
"Refers to graphical representation of objects with curved lines/surfaces.");
 
  298     (
"/vis/viewer/set/picking",
this);
 
  299   fpCommandPicking->
SetGuidance(
"Sets picking, if available.");
 
  301     (
"If true, view is set up for picking, if available.");
 
  303     (
"You may need to issue \"/vis/viewer/update\".");
 
  305     (
"For required actions, watch for instructions for viewer.");
 
  309   fpCommandProjection = 
new G4UIcommand(
"/vis/viewer/set/projection",
this);
 
  311     (
"Set projection style - o[rthogonal] or p[erspective]." 
  312      "\nIf p[erspective], also set field half angle.");
 
  313   parameter = 
new G4UIparameter(
"projection",
's',omitable = 
true);
 
  317   parameter = 
new G4UIparameter(
"field-half-angle",
'd',omitable = 
true);
 
  327     (
"/vis/viewer/set/rotationStyle",
this);
 
  329     (
"Set style of rotation - constrainUpDirection or freeRotation.");
 
  331     (
"constrainUpDirection: conventional HEP view.");
 
  333     (
"freeRotation: Google-like rotation, using mouse-grab.");
 
  335   fpCommandRotationStyle->
SetCandidates(
"constrainUpDirection freeRotation");
 
  337   fpCommandSectionPlane = 
new G4UIcommand(
"/vis/viewer/set/sectionPlane",
this);
 
  338   fpCommandSectionPlane -> SetGuidance
 
  339     (
"Set plane for drawing section (DCUT).");
 
  340   fpCommandSectionPlane -> SetGuidance
 
  341     (
"E.g., for a y-z plane at x = 1 cm:" 
  342      "\n\"/vis/viewer/set/sectionPlane on 1 0 0 cm 1 0 0\"." 
  343      "\nTo turn off: /vis/viewer/set/sectionPlane off");
 
  345   parameter  -> SetDefaultValue  (
"on");
 
  348   parameter  -> SetDefaultValue  (0);
 
  349   parameter  -> SetGuidance      (
"Coordinate of point on the plane.");
 
  352   parameter  -> SetDefaultValue  (0);
 
  353   parameter  -> SetGuidance      (
"Coordinate of point on the plane.");
 
  356   parameter  -> SetDefaultValue  (0);
 
  357   parameter  -> SetGuidance      (
"Coordinate of point on the plane.");
 
  360   parameter  -> SetDefaultValue  (
"m");
 
  361   parameter  -> SetGuidance      (
"Unit of point on the plane.");
 
  364   parameter  -> SetDefaultValue  (1);
 
  365   parameter  -> SetGuidance      (
"Component of plane normal.");
 
  368   parameter  -> SetDefaultValue  (0);
 
  369   parameter  -> SetGuidance      (
"Component of plane normal.");
 
  372   parameter  -> SetDefaultValue  (0);
 
  373   parameter  -> SetGuidance      (
"Component of plane normal.");
 
  378     (
"Set style of drawing - w[ireframe] or s[urface].");
 
  380     (
"(Hidden line drawing is controlled by \"/vis/viewer/set/hiddenEdge\".)");
 
  385     (
"/vis/viewer/set/targetPoint", 
this);
 
  387     (
"Set target point.");
 
  389     (
"This sets the \"Current Target Point\" relative to the \"Standard");
 
  391     (
"Target Point\" so that the actual target point is as requested.");
 
  393     (
"(See G4ViewParameters.hh for an explanation of target points.)");
 
  398     (
"/vis/viewer/set/upThetaPhi", 
this);
 
  399   fpCommandUpThetaPhi -> SetGuidance (
"Set up vector.");
 
  400   fpCommandUpThetaPhi -> SetGuidance
 
  401     (
"Viewer will attempt always to show this direction upwards.");
 
  402   parameter = 
new G4UIparameter(
"theta", 
'd', omitable = 
true);
 
  403   parameter -> SetDefaultValue (90.);
 
  404   fpCommandUpThetaPhi -> SetParameter (parameter);
 
  406   parameter -> SetDefaultValue (90.);
 
  407   fpCommandUpThetaPhi -> SetParameter (parameter);
 
  408   parameter = 
new G4UIparameter (
"unit", 
's', omitable = 
true);
 
  409   parameter -> SetDefaultValue (
"deg");
 
  410   fpCommandUpThetaPhi -> SetParameter (parameter);
 
  413     (
"/vis/viewer/set/upVector", 
this);
 
  414   fpCommandUpVector -> SetGuidance (
"Set up vector.");
 
  415   fpCommandUpVector -> SetGuidance
 
  416     (
"Viewer will attempt always to show this direction upwards.");
 
  418   parameter -> SetDefaultValue (0.);
 
  419   fpCommandUpVector -> SetParameter (parameter);
 
  421   parameter -> SetDefaultValue (1.);
 
  422   fpCommandUpVector -> SetParameter (parameter);
 
  424   parameter -> SetDefaultValue (0.);
 
  425   fpCommandUpVector -> SetParameter (parameter);
 
  428     (
"/vis/viewer/set/viewpointThetaPhi", 
this);
 
  429   fpCommandViewpointThetaPhi -> SetGuidance
 
  430     (
"Set direction from target to camera.");
 
  431   fpCommandViewpointThetaPhi -> SetGuidance
 
  432   (
"Also changes lightpoint direction if lights are set to move with camera.");
 
  433   parameter = 
new G4UIparameter(
"theta", 
'd', omitable = 
true);
 
  434   parameter -> SetDefaultValue (60.);
 
  435   fpCommandViewpointThetaPhi -> SetParameter (parameter);
 
  437   parameter -> SetDefaultValue (45.);
 
  438   fpCommandViewpointThetaPhi -> SetParameter (parameter);
 
  439   parameter = 
new G4UIparameter (
"unit", 
's', omitable = 
true);
 
  440   parameter -> SetDefaultValue (
"deg");
 
  441   fpCommandViewpointThetaPhi -> SetParameter (parameter);
 
  444     (
"/vis/viewer/set/viewpointVector", 
this);
 
  445   fpCommandViewpointVector -> SetGuidance
 
  446     (
"Set direction from target to camera.");
 
  447   fpCommandViewpointVector -> SetGuidance
 
  448   (
"Also changes lightpoint direction if lights are set to move with camera.");
 
  450   parameter -> SetDefaultValue (1.);
 
  451   fpCommandViewpointVector -> SetParameter (parameter);
 
  453   parameter -> SetDefaultValue (1.);
 
  454   fpCommandViewpointVector -> SetParameter (parameter);
 
  456   parameter -> SetDefaultValue (1.);
 
  457   fpCommandViewpointVector -> SetParameter (parameter);
 
  462   delete fpCommandAuxEdge;
 
  463   delete fpCommandAutoRefresh;
 
  464   delete fpCommandBackground;
 
  465   delete fpCommandCulling;
 
  466   delete fpCommandCutawayMode;
 
  467   delete fpCommandDefaultColour;
 
  468   delete fpCommandDefaultTextColour;
 
  469   delete fpCommandEdge;
 
  470   delete fpCommandExplodeFactor;
 
  471   delete fpCommandGlobalLineWidthScale;
 
  472   delete fpCommandGlobalMarkerScale;
 
  473   delete fpCommandHiddenEdge;
 
  474   delete fpCommandHiddenMarker;
 
  475   delete fpCommandLineSegments;
 
  476   delete fpCommandLightsMove;
 
  477   delete fpCommandLightsThetaPhi;
 
  478   delete fpCommandLightsVector;
 
  479   delete fpCommandPicking;
 
  480   delete fpCommandProjection;
 
  481   delete fpCommandRotationStyle;
 
  482   delete fpCommandSectionPlane;
 
  483   delete fpCommandStyle;
 
  484   delete fpCommandTargetPoint;
 
  485   delete fpCommandUpThetaPhi;
 
  486   delete fpCommandUpVector;
 
  487   delete fpCommandViewpointThetaPhi;
 
  488   delete fpCommandViewpointVector;
 
  500   G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
 
  501   if (!currentViewer) {
 
  504     "ERROR: G4VisCommandsViewerSet::SetNewValue: no current viewer." 
  512   if (command == fpCommandAll) {
 
  513     G4VViewer* fromViewer = fpVisManager->GetViewer(newValue);
 
  517       "ERROR: G4VisCommandsViewerSet::SetNewValue: all:" 
  518       "\n  unrecognised from-viewer." 
  523     if (fromViewer == currentViewer) {
 
  526     "WARNING: G4VisCommandsViewerSet::SetNewValue: all:" 
  527     "\n  from-viewer and current viewer are identical." 
  533     G4bool currentAutoRefresh =
 
  538     const std::vector<G4ModelingParameters::VisAttributesModifier>*
 
  541       std::vector<G4ModelingParameters::VisAttributesModifier>::const_iterator i;
 
  542       for (i = privateVAMs->begin(); i != privateVAMs->end(); ++i) {
 
  547       G4cout << 
"View parameters of viewer \"" << currentViewer->
GetName()
 
  548          << 
"\"\n  set to those of viewer \"" << fromViewer->
GetName()
 
  554   else if (command == fpCommandAutoRefresh) {
 
  562       << currentViewer->
GetName() << 
" is NOT auto-refesh by default" 
  563       << 
"\n  so cannot be set to auto-refresh." 
  572       G4cout << 
"be automatically refreshed after a change of view parameters." 
  581   else if (command == fpCommandAuxEdge) {
 
  584       G4cout << 
"Auxiliary edges will ";
 
  590   else if (command == fpCommandBackground) {
 
  593     std::istringstream iss(newValue);
 
  594     iss >> redOrString >> green >> blue >> opacity;
 
  596     const size_t iPos0 = 0;
 
  597     if (std::isalpha(redOrString[iPos0])) {
 
  600       G4cout << 
"WARNING: Text colour \"" << redOrString
 
  601          << 
"\" not found.  Defaulting to black and opaque." 
  612       G4cout << 
"Background colour " 
  619   else if (command == fpCommandCulling) {
 
  620     G4String cullingOption, stringFlag, unit;
 
  622     std::istringstream is (newValue);
 
  623     is >> cullingOption >> stringFlag >> density >> unit;
 
  625     if (cullingOption == 
"global") {
 
  629       "G4VisCommandsViewerSet::SetNewValue: culling: global culling flag" 
  631       ".\n  Does not change specific culling flags." 
  635     else if (cullingOption == 
"coveredDaughters") {
 
  639       "G4VisCommandsViewerSet::SetNewValue: culling: culling covered" 
  640       "\n  daughters flag set to " 
  642       ".  Daughters covered by opaque mothers" 
  643       "\n  will be culled, i.e., not drawn, if this flag is true." 
  644       "\n  Note: this is only effective in surface drawing style," 
  645       "\n  and then only if the volumes are visible and opaque, and then" 
  646       "\n  only if no sections or cutaways are in operation." 
  650     else if (cullingOption == 
"invisible") {
 
  654       "G4VisCommandsViewerSet::SetNewValue: culling: culling invisible" 
  657       ".  Volumes marked invisible will be culled," 
  658       "\n  i.e., not drawn, if this flag is true." 
  662     else if (cullingOption == 
"density") {
 
  673       "G4VisCommandsViewerSet::SetNewValue: culling: culling by density" 
  675       ".  Volumes with density less than " <<
 
  677       "\n  will be culled, i.e., not drawn, if this flag is true." 
  684       "ERROR: G4VisCommandsViewerSet::SetNewValue: culling:" 
  685       "\n  option not recognised." 
  691   else if (command == fpCommandCutawayMode) {
 
  692     if (newValue == 
"add" || newValue == 
"union")
 
  694     if (newValue == 
"multiply" || newValue == 
"intersection")
 
  698       G4cout << 
"Cutaway mode set to ";
 
  702     G4cout << 
"cutawayIntersection";
 
  707   else if (command == fpCommandDefaultColour) {
 
  710     std::istringstream iss(newValue);
 
  711     iss >> redOrString >> green >> blue >> opacity;
 
  713     const size_t iPos0 = 0;
 
  714     if (std::isalpha(redOrString[iPos0])) {
 
  717       G4cout << 
"WARNING: Text colour \"" << redOrString
 
  718          << 
"\" not found.  Defaulting to white and opaque." 
  731       G4cout << 
"Default colour " 
  738   else if (command == fpCommandDefaultTextColour) {
 
  741     std::istringstream iss(newValue);
 
  742     iss >> redOrString >> green >> blue >> opacity;
 
  744     const size_t iPos0 = 0;
 
  745     if (std::isalpha(redOrString[iPos0])) {
 
  748       G4cout << 
"WARNING: Text colour \"" << redOrString
 
  749          << 
"\" not found.  Defaulting to white and opaque." 
  762       G4cout << 
"Default colour " 
  769   else if (command == fpCommandEdge) {
 
  772       switch (existingStyle) {
 
  785       switch (existingStyle) {
 
  798       G4cout << 
"Drawing style of viewer \"" << currentViewer->
GetName()
 
  804   else if (command == fpCommandExplodeFactor) {
 
  807     std::istringstream is (newValue);
 
  808     is >> explodeFactor >> x >> y >> z >> unitString;
 
  819   else if (command == fpCommandGlobalLineWidthScale) {
 
  821       = fpCommandGlobalLineWidthScale->GetNewDoubleValue(newValue);
 
  824       G4cout << 
"Global Line Width Scale changed to " 
  829   else if (command == fpCommandGlobalMarkerScale) {
 
  831       = fpCommandGlobalMarkerScale->GetNewDoubleValue(newValue);
 
  834       G4cout << 
"Global Marker Scale changed to " 
  839   else if (command == fpCommandHiddenEdge) {
 
  842       switch (existingStyle) {
 
  856       switch (existingStyle) {
 
  870       G4cout << 
"Drawing style of viewer \"" << currentViewer->
GetName()
 
  876   else if (command == fpCommandHiddenMarker) {
 
  881       G4cout << 
"Markers will ";
 
  887   else if (command == fpCommandLightsMove) {
 
  888     if (newValue.find(
"cam") != G4String::npos)
 
  890     else if(newValue.find(
"obj") != G4String::npos)
 
  894     G4cout << 
"ERROR: \"" << newValue << 
"\" not recognised." 
  895     "  Looking for \"cam\" or \"obj\" in string." << 
G4endl;
 
  899       G4cout << 
"Lights move with ";
 
  901     G4cout << 
"camera (object appears to rotate).";
 
  902       else G4cout << 
"object (the viewer appears to be moving).";
 
  907   else if (command == fpCommandLightsThetaPhi) {
 
  909     ConvertToDoublePair(newValue, theta, phi);
 
  910     G4double x = std::sin (theta) * std::cos (phi);
 
  911     G4double y = std::sin (theta) * std::sin (phi);
 
  916       G4cout << 
"Lights direction set to " 
  921   else if (command == fpCommandLightsVector) {
 
  925       G4cout << 
"Lights direction set to " 
  930   else if (command == fpCommandLineSegments) {
 
  935     "Number of line segements per circle in polygon approximation is " 
  940   else if (command == fpCommandPicking) {
 
  945       else G4cout << 
"inhibited.";
 
  949       G4cout << 
"You may need to issue \"/vis/viewer/update\"." 
  954   else if (command == fpCommandProjection) {
 
  956     const size_t iPos0 = 0;
 
  957     if (newValue[iPos0] == 
'o') {  
 
  960     else if (newValue[iPos0] == 
'p') {  
 
  963       std::istringstream is (newValue);
 
  964       is >> dummy >> fieldHalfAngle >> unit;
 
  966       if (fieldHalfAngle > 89.5 * 
deg || fieldHalfAngle <= 0.0) {
 
  969         "ERROR: Field half angle should be 0 < angle <= 89.5 degrees.";
 
  977     G4cout << 
"ERROR: \"" << newValue << 
"\" not recognised." 
  978       "  Looking for 'o' or 'p' first character." << 
G4endl;
 
  984       G4cout << 
"Projection style of viewer \"" << currentViewer->
GetName()
 
  986       if (fieldHalfAngle == 0.) {
 
  990     G4cout << 
"perspective\n  with half angle " << fieldHalfAngle / 
deg 
  997   else if (command == fpCommandSectionPlane) {
 
 1000     std::istringstream is (newValue);
 
 1001     is >> choice >> x >> y >> z >> unit >> nx >> ny >> nz;
 
 1003     G4int iSelector = -1;
 
 1008     if (iSelector < 0) {
 
 1010     G4cout << 
"Choice not recognised (on/true or off/false)." << 
G4endl;
 
 1011     G4cout << 
"Section drawing is currently: ";
 
 1014     G4cout << 
".\nSection plane is currently: " 
 1023     switch (iSelector) {
 
 1029       x *= F; y *= F; z *= F;
 
 1036       G4cout << 
"Section drawing is now: ";
 
 1039       G4cout << 
".\nSection plane is now: " 
 1045   else if (command == fpCommandRotationStyle) {
 
 1047     if (newValue == 
"constrainUpDirection")
 
 1049     else if (newValue == 
"freeRotation")
 
 1053     G4cout << 
"ERROR: \"" << newValue << 
"\" not recognised." << 
G4endl;
 
 1059       G4cout << 
"Rotation style of viewer \"" << currentViewer->
GetName()
 
 1065   else if (command == fpCommandStyle) {
 
 1067     const size_t iPos0 = 0;
 
 1068     if (newValue[iPos0] == 
'w') {  
 
 1069       switch (existingStyle) {
 
 1082     else if (newValue[iPos0] == 
's') {  
 
 1083       switch (existingStyle) {
 
 1098     G4cout << 
"ERROR: \"" << newValue << 
"\" not recognised." 
 1099       "  Looking for 'w' or 's' first character." << 
G4endl;
 
 1104       G4cout << 
"Drawing style of viewer \"" << currentViewer->
GetName()
 
 1110   else if (command == fpCommandTargetPoint) {
 
 1112       fpCommandTargetPoint->GetNew3VectorValue(newValue);
 
 1117       G4cout << 
"Target point set to " 
 1118          << fpCommandTargetPoint->ConvertToStringWithBestUnit
 
 1120          << 
"\n\"Current Target Point\" set to  " 
 1121          << fpCommandTargetPoint->ConvertToStringWithBestUnit
 
 1123          << 
"\n\"Standard Target Point\" is " 
 1124          << fpCommandTargetPoint->ConvertToStringWithBestUnit
 
 1125     (standardTargetPoint)
 
 1130   else if (command == fpCommandUpThetaPhi) {
 
 1132     ConvertToDoublePair(newValue, theta, phi);
 
 1133     G4double x = std::sin (theta) * std::cos (phi);
 
 1134     G4double y = std::sin (theta) * std::sin (phi);
 
 1143   else if (command == fpCommandUpVector) {
 
 1151   else if (command == fpCommandViewpointThetaPhi) {
 
 1153     ConvertToDoublePair(newValue, theta, phi);
 
 1154     G4double x = std::sin (theta) * std::cos (phi);
 
 1155     G4double y = std::sin (theta) * std::sin (phi);
 
 1160       G4cout << 
"Viewpoint direction set to " 
 1163     G4cout << 
"Lightpoint direction set to " 
 1169   else if (command == fpCommandViewpointVector) {
 
 1173       G4cout << 
"Viewpoint direction set to " 
 1176     G4cout << 
"Lightpoint direction set to " 
 1185     "ERROR: G4VisCommandsViewerSet::SetNewValue: unrecognised command." 
 1191   SetViewParameters(currentViewer,vp);
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
const G4String & GetName() const 
 
void SetParameter(G4UIparameter *const newParameter)
 
void SetMarkerNotHidden()
 
void SetColour(const G4Colour &)
 
const G4Colour & GetBackgroundColour() const 
 
G4Vector3D & GetActualLightpointDirection()
 
void SetLightpointDirection(const G4Vector3D &lightpointDirection)
 
G4double GetVisibleDensity() const 
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
CLHEP::Hep3Vector G4ThreeVector
 
void SetAuxEdgeVisible(G4bool)
 
G4int SetNoOfSides(G4int nSides)
 
void SetRotationStyle(RotationStyle)
 
const G4Point3D & GetExplodeCentre() const 
 
void SetParameterRange(const char *theRange)
 
void SetParameterCandidates(const char *theString)
 
G4double GetExplodeFactor() const 
 
void SetUnitCategory(const char *unitCategory)
 
void SetUpVector(const G4Vector3D &upVector)
 
const G4ViewParameters & GetViewParameters() const 
 
static G4bool GetColour(const G4String &key, G4Colour &result)
 
const G4Colour & GetColour() const 
 
void SetDefaultValue(const char *theDefaultValue)
 
static G4String ConvertToString(G4bool boolVal)
 
void SetViewParameters(const G4ViewParameters &vp)
 
HepGeom::Point3D< G4double > G4Point3D
 
#define G4BestUnit(a, b)
#define G4_USE_G4BESTUNIT_FOR_VERBOSE 1 
 
void SetDensityCulling(G4bool)
 
void SetVisibleDensity(G4double visibleDensity)
 
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
 
static G4ThreeVector ConvertTo3Vector(const char *st)
 
void SetDefaultTextVisAttributes(const G4VisAttributes &)
 
void SetBackgroundColour(const G4Colour &)
 
void SetCutawayMode(CutawayMode)
 
void SetLightsMoveWithCamera(G4bool moves)
 
void SetDefaultValue(G4bool defVal)
 
void SetViewAndLights(const G4Vector3D &viewpointDirection)
 
const G4Point3D & GetCurrentTargetPoint() const 
 
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
 
const G4Vector3D & GetLightpointDirection() const 
 
static G4double GetValueOf(const G4String &)
 
const G4Vector3D & GetViewpointDirection() const 
 
void SetExplodeFactor(G4double explodeFactor)
 
G4GLOB_DLL std::ostream G4cout
 
G4bool IsAuxEdgeVisible() const 
 
const G4ViewParameters & GetDefaultViewParameters() const 
 
void SetGlobalMarkerScale(G4double globalMarkerScale)
 
static G4bool ConvertToBool(const char *st)
 
const G4Point3D & GetStandardTargetPoint() const 
 
G4double GetGreen() const 
 
void SetGuidance(const char *aGuidance)
 
void SetCurrentTargetPoint(const G4Point3D ¤tTargetPoint)
 
RotationStyle GetRotationStyle() const 
 
void SetDefaultVisAttributes(const G4VisAttributes &)
 
void SetFieldHalfAngle(G4double fieldHalfAngle)
 
CutawayMode GetCutawayMode() const 
 
void SetExplodeCentre(const G4Point3D &explodeCentre)
 
G4double GetGlobalLineWidthScale() const 
 
static G4int ConvertToInt(const char *st)
 
void SetNewValue(G4UIcommand *command, G4String newValue)
 
const G4VisAttributes * GetDefaultTextVisAttributes() const 
 
virtual ~G4VisCommandsViewerSet()
 
void SetCullingInvisible(G4bool)
 
subroutine choice(MNUM, RR, ICHAN, PROB1, PROB2, PROB3, AMRX, GAMRX, AMRA, GAMRA, AMRB, GAMRB)
 
void SetAutoRefresh(G4bool)
 
G4Scene * GetScene() const 
 
G4bool IsMarkerNotHidden() const 
 
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
 
void SetDefaultValue(const char *defVal)
 
G4VSceneHandler * GetSceneHandler() const 
 
void SetDrawingStyle(G4ViewParameters::DrawingStyle style)
 
virtual const std::vector< G4ModelingParameters::VisAttributesModifier > * GetPrivateVisAttributesModifiers() const 
 
static G4double ValueOf(const char *unitName)
 
G4String GetCurrentValue(G4UIcommand *command)
 
void SetDefaultValue(G4double defVal)
 
DrawingStyle GetDrawingStyle() const 
 
G4int compareTo(const char *, caseCompare mode=exact) const 
 
void SetGlobalLineWidthScale(G4double globalLineWidthScale)
 
HepGeom::Plane3D< G4double > G4Plane3D
 
void SetCandidates(const char *candidateList)
 
G4bool GetLightsMoveWithCamera() const 
 
const G4Plane3D & GetSectionPlane() const 
 
void SetDefaultValue(G4int defVal)
 
const G4VisAttributes * GetDefaultVisAttributes() const 
 
void SetGuidance(const char *theGuidance)
 
void SetSectionPlane(const G4Plane3D §ionPlane)
 
const G4Vector3D & GetUpVector() const 
 
G4bool IsAutoRefresh() const 
 
void SetCullingCovered(G4bool)
 
void SetViewpointDirection(const G4Vector3D &viewpointDirection)
 
G4double GetGlobalMarkerScale() const 
 
HepGeom::Normal3D< G4double > G4Normal3D