#include <G4VisCommandsGeometrySet.hh>
Inheritance diagram for G4VisCommandGeometrySetDaughtersInvisible:
Public Member Functions | |
G4VisCommandGeometrySetDaughtersInvisible () | |
virtual | ~G4VisCommandGeometrySetDaughtersInvisible () |
G4String | GetCurrentValue (G4UIcommand *command) |
void | SetNewValue (G4UIcommand *command, G4String newValue) |
Definition at line 191 of file G4VisCommandsGeometrySet.hh.
G4VisCommandGeometrySetDaughtersInvisible::G4VisCommandGeometrySetDaughtersInvisible | ( | ) |
Definition at line 174 of file G4VisCommandsGeometrySet.cc.
References G4UIparameter::SetDefaultValue(), G4UIparameter::SetGuidance(), G4UIcommand::SetGuidance(), and G4UIcommand::SetParameter().
00175 { 00176 G4bool omitable; 00177 fpCommand = new G4UIcommand("/vis/geometry/set/daughtersInvisible", this); 00178 fpCommand->SetGuidance("Makes daughters of logical volume(s) invisible."); 00179 fpCommand->SetGuidance("\"all\" sets all logical volumes."); 00180 fpCommand->SetGuidance 00181 ("Optionally propagates down hierarchy to given depth."); 00182 G4UIparameter* parameter; 00183 parameter = new G4UIparameter ("logical-volume-name", 's', omitable = true); 00184 parameter->SetDefaultValue("all"); 00185 fpCommand->SetParameter(parameter); 00186 parameter = new G4UIparameter("depth", 'd', omitable = true); 00187 parameter->SetDefaultValue(0); 00188 parameter->SetGuidance 00189 ("Depth of propagation (-1 means unlimited depth)."); 00190 fpCommand->SetParameter(parameter); 00191 parameter = new G4UIparameter("daughtersInvisible", 'b', omitable = true); 00192 parameter->SetDefaultValue(false); 00193 fpCommand->SetParameter(parameter); 00194 }
G4VisCommandGeometrySetDaughtersInvisible::~G4VisCommandGeometrySetDaughtersInvisible | ( | ) | [virtual] |
G4String G4VisCommandGeometrySetDaughtersInvisible::GetCurrentValue | ( | G4UIcommand * | command | ) | [virtual] |
void G4VisCommandGeometrySetDaughtersInvisible::SetNewValue | ( | G4UIcommand * | command, | |
G4String | newValue | |||
) | [virtual] |
Reimplemented from G4UImessenger.
Definition at line 208 of file G4VisCommandsGeometrySet.cc.
References G4UIcommand::ConvertToBool(), G4cout, G4endl, G4VViewer::GetViewParameters(), G4ViewParameters::IsCulling(), and G4VisManager::warnings.
00209 { 00210 G4String name; 00211 G4int requestedDepth; 00212 G4String daughtersInvisibleString; 00213 std::istringstream iss(newValue); 00214 iss >> name >> requestedDepth >> daughtersInvisibleString; 00215 G4bool daughtersInvisible = 00216 G4UIcommand::ConvertToBool(daughtersInvisibleString); 00217 00218 if (requestedDepth !=0) { 00219 requestedDepth = 0; 00220 if (fpVisManager->GetVerbosity() >= G4VisManager::warnings) { 00221 G4cout << "Recursive application suppressed for this attribute." 00222 << G4endl; 00223 } 00224 } 00225 00226 G4VisCommandGeometrySetDaughtersInvisibleFunction 00227 setDaughtersInvisible(daughtersInvisible); 00228 Set(name, setDaughtersInvisible, requestedDepth); 00229 00230 G4VViewer* pViewer = fpVisManager->GetCurrentViewer(); 00231 if (pViewer) { 00232 const G4ViewParameters& viewParams = pViewer->GetViewParameters(); 00233 if (fpVisManager->GetVerbosity() >= G4VisManager::warnings) { 00234 if (!viewParams.IsCulling()) { 00235 G4cout << 00236 "Culling must be on - \"/vis/viewer/set/culling global true\" - to see effect." 00237 << G4endl; 00238 } 00239 } 00240 } 00241 }