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 G4cerr <<
"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:";
88 G4cout <<
"\nwas: " << *oldVisAtts;
90 G4cout <<
"\n(no old attributes)";
92 G4cout <<
"\nnow: " << *newVisAtts
95 if (requestedDepth < 0 || depth < requestedDepth) {
97 for (
G4int i = 0; i < nDaughters; ++i) {
99 setFunction, ++depth, requestedDepth);
113 (
"Optionally propagates down hierarchy to given depth.");
115 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
118 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
121 (
"Depth of propagation (-1 means unlimited depth).");
126 (
"Red component or a string, e.g., \"blue\", in which case succeeding colour components are ignored.");
128 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
134 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
153 G4int requestedDepth;
155 std::istringstream iss(newValue);
156 iss >> name >> requestedDepth >> redOrString >> green >> blue >> opacity;
158 const size_t iPos0 = 0;
159 if (std::isalpha(redOrString[iPos0])) {
162 G4cout <<
"WARNING: Colour \"" << redOrString
163 <<
"\" not found. Defaulting to white and opaque."
174 Set(name, setColour, requestedDepth);
186 (
"Optionally propagates down hierarchy to given depth.");
188 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
191 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
194 (
"Depth of propagation (-1 means unlimited depth).");
196 parameter =
new G4UIparameter(
"daughtersInvisible",
'b', omitable =
true);
216 G4int requestedDepth;
218 std::istringstream iss(newValue);
219 iss >> name >> requestedDepth >> daughtersInvisibleString;
220 G4bool daughtersInvisible =
223 if (requestedDepth !=0) {
226 G4cout <<
"Recursive application suppressed for this attribute."
232 setDaughtersInvisible(daughtersInvisible);
233 Set(name, setDaughtersInvisible, requestedDepth);
235 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
241 "Culling must be on - \"/vis/viewer/set/culling global true\" - to see effect."
255 (
"Forces auxiliary (soft) edges of logical volume(s) to be visible,"
256 "\nregardless of the view parameters.");
259 (
"Optionally propagates down hierarchy to given depth.");
261 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
264 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
267 (
"Depth of propagation (-1 means unlimited depth).");
269 parameter =
new G4UIparameter(
"forceAuxEdgeVisible",
'b', omitable =
true);
289 G4int requestedDepth;
291 std::istringstream iss(newValue);
292 iss >> name >> requestedDepth >> forceAuxEdgeVisibleString;
293 G4bool forceAuxEdgeVisible =
297 setForceAuxEdgeVisible(forceAuxEdgeVisible);
298 Set(name, setForceAuxEdgeVisible, requestedDepth);
308 (
"Forces number of line segments per circle, the precision with which a"
309 "\ncurved line or surface is represented by a polygon or polyhedron,"
310 "\nregardless of the view parameters.");
313 (
"Optionally propagates down hierarchy to given depth.");
315 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
318 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
321 (
"Depth of propagation (-1 means unlimited depth).");
323 parameter =
new G4UIparameter(
"lineSegmentsPerCircle",
'd', omitable =
true);
325 (
"< 0 means not forced, i.e., under control of viewer.");
345 G4int requestedDepth;
346 G4int lineSegmentsPerCircle;
347 std::istringstream iss(newValue);
348 iss >> name >> requestedDepth >> lineSegmentsPerCircle;
351 Set(name, setForceLineSegmentsPerCircle, requestedDepth);
361 (
"Forces logical volume(s) always to be drawn solid (surface drawing),"
362 "\nregardless of the view parameters.");
365 (
"Optionally propagates down hierarchy to given depth.");
367 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
370 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
373 (
"Depth of propagation (-1 means unlimited depth).");
375 parameter =
new G4UIparameter(
"forceSolid",
'b', omitable =
true);
395 G4int requestedDepth;
397 std::istringstream iss(newValue);
398 iss >> name >> requestedDepth >> forceSolidString;
402 Set(name, setForceSolid, requestedDepth);
412 (
"Forces logical volume(s) always to be drawn as wireframe,"
413 "\nregardless of the view parameters.");
416 (
"Optionally propagates down hierarchy to given depth.");
418 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
421 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
424 (
"Depth of propagation (-1 means unlimited depth).");
426 parameter =
new G4UIparameter(
"forceWireframe",
'b', omitable =
true);
446 G4int requestedDepth;
448 std::istringstream iss(newValue);
449 iss >> name >> requestedDepth >> forceWireframeString;
453 setForceWireframe(forceWireframe);
454 Set(name, setForceWireframe, requestedDepth);
466 (
"Optionally propagates down hierarchy to given depth.");
468 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
471 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
474 (
"Depth of propagation (-1 means unlimited depth).");
476 parameter =
new G4UIparameter(
"lineStyle",
's', omitable =
true);
497 G4int requestedDepth;
498 std::istringstream iss(newValue);
499 iss >> name >> requestedDepth >> lineStyleString;
506 Set(name, setLineStyle, requestedDepth);
518 (
"Optionally propagates down hierarchy to given depth.");
520 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
523 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
526 (
"Depth of propagation (-1 means unlimited depth).");
528 parameter =
new G4UIparameter(
"lineWidth",
'd', omitable =
true);
548 G4int requestedDepth;
550 std::istringstream iss(newValue);
551 iss >> name >> requestedDepth >> lineWidth;
554 Set(name, setLineWidth, requestedDepth);
566 (
"Optionally propagates down hierarchy to given depth.");
568 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
571 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
574 (
"Depth of propagation (-1 means unlimited depth).");
576 parameter =
new G4UIparameter(
"visibility",
'b', omitable =
true);
595 G4int requestedDepth;
597 std::istringstream iss(newValue);
598 iss >> name >> requestedDepth >> visibilityString;
602 Set(name, setVisibility, requestedDepth);
604 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
611 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
612 "\n \"/vis/viewer/set/culling invisible true\" - to see effect."
624 SetLVVisAtts(pLV, setVisibility, 0, requestedDepth);
626 G4VViewer* pViewer = fpVisManager->GetCurrentViewer();
634 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
635 "\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()
G4GLOB_DLL std::ostream G4cerr
G4String GetCurrentValue(G4UIcommand *command)