49 for (
size_t iLV = 0; iLV < pLVStore->size(); iLV++ ) {
52 if (logVolName == requestedName) found =
true;
53 if (requestedName ==
"all" || logVolName == requestedName) {
54 SetLVVisAtts(pLV, setFunction, 0, requestedDepth);
57 if (requestedName !=
"all" && !found) {
59 G4cout <<
"ERROR: Logical volume \"" << requestedName
60 <<
"\" not found in logical volume store." <<
G4endl;
64 if (fpVisManager->GetCurrentViewer()) {
76 fVisAttsMap.insert(std::make_pair(pLV,oldVisAtts));
79 *newVisAtts = *oldVisAtts;
81 setFunction(newVisAtts);
86 <<
"\": setting vis attributes:\nwas: " << *oldVisAtts
87 <<
"\nnow: " << *newVisAtts
90 if (requestedDepth < 0 || depth++ < requestedDepth) {
92 for (
G4int i = 0; i < nDaughters; ++i) {
94 setFunction, depth, requestedDepth);
108 (
"Optionally propagates down hierarchy to given depth.");
110 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
113 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
116 (
"Depth of propagation (-1 means unlimited depth).");
121 (
"Red component or a string, e.g., \"blue\", in which case succeeding colour components are ignored.");
123 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
129 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
148 G4int requestedDepth;
150 std::istringstream iss(newValue);
151 iss >> name >> requestedDepth >> redOrString >> green >> blue >> opacity;
153 const size_t iPos0 = 0;
154 if (std::isalpha(redOrString[iPos0])) {
157 G4cout <<
"WARNING: Colour \"" << redOrString
158 <<
"\" not found. Defaulting to white and opaque."
169 Set(name, setColour, requestedDepth);
181 (
"Optionally propagates down hierarchy to given depth.");
183 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
186 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
189 (
"Depth of propagation (-1 means unlimited depth).");
191 parameter =
new G4UIparameter(
"daughtersInvisible",
'b', omitable =
true);
211 G4int requestedDepth;
213 std::istringstream iss(newValue);
214 iss >> name >> requestedDepth >> daughtersInvisibleString;
215 G4bool daughtersInvisible =
218 if (requestedDepth !=0) {
221 G4cout <<
"Recursive application suppressed for this attribute."
227 setDaughtersInvisible(daughtersInvisible);
228 Set(name, setDaughtersInvisible, requestedDepth);
230 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
236 "Culling must be on - \"/vis/viewer/set/culling global true\" - to see effect."
250 (
"Forces auxiliary (soft) edges of logical volume(s) to be visible,"
251 "\nregardless of the view parameters.");
254 (
"Optionally propagates down hierarchy to given depth.");
256 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
259 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
262 (
"Depth of propagation (-1 means unlimited depth).");
264 parameter =
new G4UIparameter(
"forceAuxEdgeVisible",
'b', omitable =
true);
284 G4int requestedDepth;
286 std::istringstream iss(newValue);
287 iss >> name >> requestedDepth >> forceAuxEdgeVisibleString;
288 G4bool forceAuxEdgeVisible =
292 setForceAuxEdgeVisible(forceAuxEdgeVisible);
293 Set(name, setForceAuxEdgeVisible, requestedDepth);
303 (
"Forces number of line segments per circle, the precision with which a"
304 "\ncurved line or surface is represented by a polygon or polyhedron,"
305 "\nregardless of the view parameters.");
308 (
"Optionally propagates down hierarchy to given depth.");
310 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
313 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
316 (
"Depth of propagation (-1 means unlimited depth).");
318 parameter =
new G4UIparameter(
"lineSegmentsPerCircle",
'd', omitable =
true);
320 (
"< 0 means not forced, i.e., under control of viewer.");
340 G4int requestedDepth;
341 G4int lineSegmentsPerCircle;
342 std::istringstream iss(newValue);
343 iss >> name >> requestedDepth >> lineSegmentsPerCircle;
346 Set(name, setForceLineSegmentsPerCircle, requestedDepth);
356 (
"Forces logical volume(s) always to be drawn solid (surface drawing),"
357 "\nregardless of the view parameters.");
360 (
"Optionally propagates down hierarchy to given depth.");
362 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
365 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
368 (
"Depth of propagation (-1 means unlimited depth).");
370 parameter =
new G4UIparameter(
"forceSolid",
'b', omitable =
true);
390 G4int requestedDepth;
392 std::istringstream iss(newValue);
393 iss >> name >> requestedDepth >> forceSolidString;
397 Set(name, setForceSolid, requestedDepth);
407 (
"Forces logical volume(s) always to be drawn as wireframe,"
408 "\nregardless of the view parameters.");
411 (
"Optionally propagates down hierarchy to given depth.");
413 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
416 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
419 (
"Depth of propagation (-1 means unlimited depth).");
421 parameter =
new G4UIparameter(
"forceWireframe",
'b', omitable =
true);
441 G4int requestedDepth;
443 std::istringstream iss(newValue);
444 iss >> name >> requestedDepth >> forceWireframeString;
448 setForceWireframe(forceWireframe);
449 Set(name, setForceWireframe, requestedDepth);
461 (
"Optionally propagates down hierarchy to given depth.");
463 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
466 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
469 (
"Depth of propagation (-1 means unlimited depth).");
471 parameter =
new G4UIparameter(
"lineStyle",
's', omitable =
true);
492 G4int requestedDepth;
493 std::istringstream iss(newValue);
494 iss >> name >> requestedDepth >> lineStyleString;
501 Set(name, setLineStyle, requestedDepth);
513 (
"Optionally propagates down hierarchy to given depth.");
515 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
518 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
521 (
"Depth of propagation (-1 means unlimited depth).");
523 parameter =
new G4UIparameter(
"lineWidth",
'd', omitable =
true);
543 G4int requestedDepth;
545 std::istringstream iss(newValue);
546 iss >> name >> requestedDepth >> lineWidth;
549 Set(name, setLineWidth, requestedDepth);
561 (
"Optionally propagates down hierarchy to given depth.");
563 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
566 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
569 (
"Depth of propagation (-1 means unlimited depth).");
571 parameter =
new G4UIparameter(
"visibility",
'b', omitable =
true);
590 G4int requestedDepth;
592 std::istringstream iss(newValue);
593 iss >> name >> requestedDepth >> visibilityString;
597 Set(name, setVisibility, requestedDepth);
599 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
606 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
607 "\n \"/vis/viewer/set/culling invisible true\" - to see effect."
619 SetLVVisAtts(pLV, setVisibility, 0, requestedDepth);
621 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
629 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
630 "\n \"/vis/viewer/set/culling invisible true\" - to see effect."
void SetParameter(G4UIparameter *const newParameter)
virtual ~G4VisCommandGeometrySetForceWireframe()
G4VisCommandGeometrySetDaughtersInvisible()
virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible()
G4VisCommandGeometrySetForceSolid()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetParameterCandidates(const char *theString)
G4bool IsCullingInvisible() const
void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction &, G4int requestedDepth)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
const G4ViewParameters & GetViewParameters() const
static G4bool GetColour(const G4String &key, G4Colour &result)
G4VPhysicalVolume * GetDaughter(const G4int i) const
void SetDefaultValue(const char *theDefaultValue)
virtual ~G4VisCommandGeometrySetLineStyle()
G4VisCommandGeometrySetForceWireframe()
void SetNewValueOnLV(G4LogicalVolume *pLV, G4int, G4bool)
G4String GetCurrentValue(G4UIcommand *command)
static G4UImanager * GetUIpointer()
virtual ~G4VisCommandGeometrySetVisibility()
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4GLOB_DLL std::ostream G4cout
static G4bool ConvertToBool(const char *st)
G4String GetCurrentValue(G4UIcommand *command)
G4double GetGreen() const
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandGeometrySetForceLineSegmentsPerCircle()
void SetGuidance(const char *aGuidance)
G4VisCommandGeometrySetLineWidth()
static G4double ConvertToDouble(const char *st)
const G4VisAttributes * GetVisAttributes() const
static G4LogicalVolumeStore * GetInstance()
G4int GetNoDaughters() const
virtual ~G4VisCommandGeometrySetDaughtersInvisible()
G4VisCommandGeometrySetLineStyle()
G4LogicalVolume * GetLogicalVolume() const
G4String GetCurrentValue(G4UIcommand *command)
void SetLVVisAtts(G4LogicalVolume *, const G4VVisCommandGeometrySetFunction &, G4int depth, G4int requestedDepth)
void SetNewValue(G4UIcommand *command, G4String newValue)
void Set(G4int Elements, T *To, T Value)
Set's all the values in an array to a constant.
G4VisCommandGeometrySetVisibility()
G4VisCommandGeometrySetColour()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandGeometrySetForceAuxEdgeVisible()
virtual ~G4VisCommandGeometrySetForceSolid()
G4String GetCurrentValue(G4UIcommand *command)
void SetGuidance(const char *theGuidance)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetColour()
void SetVisAttributes(const G4VisAttributes *pVA)
virtual ~G4VisCommandGeometrySetLineWidth()
G4int ApplyCommand(const char *aCommand)
virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle()
G4String GetCurrentValue(G4UIcommand *command)