47 for (
size_t iLV = 0; iLV < pLVStore->size(); iLV++ ) {
50 if (logVolName == requestedName) found =
true;
51 if (requestedName ==
"all" || logVolName == requestedName) {
55 if (requestedName !=
"all" && !found) {
57 G4cerr <<
"ERROR: Logical volume \"" << requestedName
58 <<
"\" not found in logical volume store." <<
G4endl;
77 *newVisAtts = *oldVisAtts;
79 setFunction(newVisAtts);
84 <<
"\": setting vis attributes:";
86 G4cout <<
"\nwas: " << *oldVisAtts;
88 G4cout <<
"\n(no old attributes)";
90 G4cout <<
"\nnow: " << *newVisAtts
93 if (requestedDepth < 0 || depth < requestedDepth) {
95 for (
G4int i = 0; i < nDaughters; ++i) {
97 setFunction, ++depth, requestedDepth);
107 fpCommand =
new G4UIcommand(
"/vis/geometry/set/colour",
this);
108 fpCommand->
SetGuidance(
"Sets colour of logical volume(s).");
109 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
111 (
"Optionally propagates down hierarchy to given depth.");
113 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
116 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
119 (
"Depth of propagation (-1 means unlimited depth).");
124 (
"Red component or a string, e.g., \"blue\", in which case succeeding colour components are ignored.");
126 parameter =
new G4UIparameter(
"green",
'd', omitable =
true);
132 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
151 G4int requestedDepth;
153 std::istringstream iss(newValue);
154 iss >> name >> requestedDepth >> redOrString >> green >> blue >> opacity;
158 Set(name, setColour, requestedDepth);
166 fpCommand =
new G4UIcommand(
"/vis/geometry/set/daughtersInvisible",
this);
167 fpCommand->
SetGuidance(
"Makes daughters of logical volume(s) invisible.");
168 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
170 (
"Optionally propagates down hierarchy to given depth.");
172 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
175 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
178 (
"Depth of propagation (-1 means unlimited depth).");
180 parameter =
new G4UIparameter(
"daughtersInvisible",
'b', omitable =
true);
200 G4int requestedDepth;
202 std::istringstream iss(newValue);
203 iss >> name >> requestedDepth >> daughtersInvisibleString;
204 G4bool daughtersInvisible =
207 if (requestedDepth !=0) {
210 G4cout <<
"Recursive application suppressed for this attribute."
216 setDaughtersInvisible(daughtersInvisible);
217 Set(name, setDaughtersInvisible, requestedDepth);
225 "Culling must be on - \"/vis/viewer/set/culling global true\" - to see effect."
237 fpCommand =
new G4UIcommand(
"/vis/geometry/set/forceAuxEdgeVisible",
this);
239 (
"Forces auxiliary (soft) edges of logical volume(s) to be visible,"
240 "\nregardless of the view parameters.");
241 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
243 (
"Optionally propagates down hierarchy to given depth.");
245 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
248 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
251 (
"Depth of propagation (-1 means unlimited depth).");
253 parameter =
new G4UIparameter(
"forceAuxEdgeVisible",
'b', omitable =
true);
273 G4int requestedDepth;
275 std::istringstream iss(newValue);
276 iss >> name >> requestedDepth >> forceAuxEdgeVisibleString;
277 G4bool forceAuxEdgeVisible =
281 setForceAuxEdgeVisible(forceAuxEdgeVisible);
282 Set(name, setForceAuxEdgeVisible, requestedDepth);
290 fpCommand =
new G4UIcommand(
"/vis/geometry/set/forceCloud",
this);
292 (
"Forces logical volume(s) always to be drawn as a cloud of points,"
293 "\nregardless of the view parameters.");
294 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
296 (
"Optionally propagates down hierarchy to given depth.");
298 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
301 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
304 (
"Depth of propagation (-1 means unlimited depth).");
306 parameter =
new G4UIparameter(
"forceCloud",
'b', omitable =
true);
309 parameter =
new G4UIparameter(
"nPoints",
'd', omitable =
true);
311 (
"<= 0 means under control of viewer.");
331 G4int requestedDepth, nPoints;
332 std::istringstream iss(newValue);
333 iss >> name >> requestedDepth >> forceCloudString >> nPoints;
337 Set(name, setForceCloud, requestedDepth);
345 fpCommand =
new G4UIcommand(
"/vis/geometry/set/forceLineSegmentsPerCircle",
this);
347 (
"Forces number of line segments per circle, the precision with which a"
348 "\ncurved line or surface is represented by a polygon or polyhedron,"
349 "\nregardless of the view parameters.");
350 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
352 (
"Optionally propagates down hierarchy to given depth.");
354 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
357 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
360 (
"Depth of propagation (-1 means unlimited depth).");
362 parameter =
new G4UIparameter(
"lineSegmentsPerCircle",
'd', omitable =
true);
364 (
"<= 0 means not forced, i.e., under control of viewer.");
384 G4int requestedDepth;
385 G4int lineSegmentsPerCircle;
386 std::istringstream iss(newValue);
387 iss >> name >> requestedDepth >> lineSegmentsPerCircle;
390 setForceLineSegmentsPerCircle(lineSegmentsPerCircle);
391 Set(name, setForceLineSegmentsPerCircle, requestedDepth);
399 fpCommand =
new G4UIcommand(
"/vis/geometry/set/forceSolid",
this);
401 (
"Forces logical volume(s) always to be drawn solid (surface drawing),"
402 "\nregardless of the view parameters.");
403 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
405 (
"Optionally propagates down hierarchy to given depth.");
407 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
410 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
413 (
"Depth of propagation (-1 means unlimited depth).");
415 parameter =
new G4UIparameter(
"force",
'b', omitable =
true);
435 G4int requestedDepth;
437 std::istringstream iss(newValue);
438 iss >> name >> requestedDepth >> forceString;
442 Set(name, setForceSolid, requestedDepth);
450 fpCommand =
new G4UIcommand(
"/vis/geometry/set/forceWireframe",
this);
452 (
"Forces logical volume(s) always to be drawn as wireframe,"
453 "\nregardless of the view parameters.");
454 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
456 (
"Optionally propagates down hierarchy to given depth.");
458 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
461 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
464 (
"Depth of propagation (-1 means unlimited depth).");
466 parameter =
new G4UIparameter(
"forceWireframe",
'b', omitable =
true);
486 G4int requestedDepth;
488 std::istringstream iss(newValue);
489 iss >> name >> requestedDepth >> forceWireframeString;
493 setForceWireframe(forceWireframe);
494 Set(name, setForceWireframe, requestedDepth);
502 fpCommand =
new G4UIcommand(
"/vis/geometry/set/lineStyle",
this);
503 fpCommand->
SetGuidance(
"Sets line style of logical volume(s) drawing.");
504 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
506 (
"Optionally propagates down hierarchy to given depth.");
508 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
511 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
514 (
"Depth of propagation (-1 means unlimited depth).");
516 parameter =
new G4UIparameter(
"lineStyle",
's', omitable =
true);
537 G4int requestedDepth;
538 std::istringstream iss(newValue);
539 iss >> name >> requestedDepth >> lineStyleString;
546 Set(name, setLineStyle, requestedDepth);
554 fpCommand =
new G4UIcommand(
"/vis/geometry/set/lineWidth",
this);
555 fpCommand->
SetGuidance(
"Sets line width of logical volume(s) drawing.");
556 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
558 (
"Optionally propagates down hierarchy to given depth.");
560 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
563 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
566 (
"Depth of propagation (-1 means unlimited depth).");
568 parameter =
new G4UIparameter(
"lineWidth",
'd', omitable =
true);
588 G4int requestedDepth;
590 std::istringstream iss(newValue);
591 iss >> name >> requestedDepth >> lineWidth;
594 Set(name, setLineWidth, requestedDepth);
602 fpCommand =
new G4UIcommand(
"/vis/geometry/set/visibility",
this);
603 fpCommand->
SetGuidance(
"Sets visibility of logical volume(s).");
604 fpCommand->
SetGuidance(
"\"all\" sets all logical volumes.");
606 (
"Optionally propagates down hierarchy to given depth.");
608 parameter =
new G4UIparameter (
"logical-volume-name",
's', omitable =
true);
611 parameter =
new G4UIparameter(
"depth",
'd', omitable =
true);
614 (
"Depth of propagation (-1 means unlimited depth).");
616 parameter =
new G4UIparameter(
"visibility",
'b', omitable =
true);
635 G4int requestedDepth;
637 std::istringstream iss(newValue);
638 iss >> name >> requestedDepth >> visibilityString;
642 Set(name, setVisibility, requestedDepth);
651 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
652 "\n \"/vis/viewer/set/culling invisible true\" - to see effect."
674 "Culling must be on - \"/vis/viewer/set/culling global true\" and"
675 "\n \"/vis/viewer/set/culling invisible true\" - to see effect."
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
static G4LogicalVolumeStore * GetInstance()
const G4VisAttributes * GetVisAttributes() const
size_t GetNoDaughters() const
G4VPhysicalVolume * GetDaughter(const G4int i) const
void SetVisAttributes(const G4VisAttributes *pVA)
const G4String & GetName() const
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
static G4bool ConvertToBool(const char *st)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetParameterCandidates(const char *theString)
G4LogicalVolume * GetLogicalVolume() const
const G4ViewParameters & GetViewParameters() const
void SetLVVisAtts(G4LogicalVolume *, const G4VVisCommandGeometrySetFunction &, G4int depth, G4int requestedDepth)
void Set(G4String logVolName, const G4VVisCommandGeometrySetFunction &, G4int requestedDepth)
static std::map< G4LogicalVolume *, const G4VisAttributes * > fVisAttsMap
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
static G4VisManager * fpVisManager
G4bool IsCullingInvisible() const
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetColour()
G4VisCommandGeometrySetColour()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetDaughtersInvisible()
G4VisCommandGeometrySetDaughtersInvisible()
G4String GetCurrentValue(G4UIcommand *command)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandGeometrySetForceAuxEdgeVisible()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandGeometrySetForceAuxEdgeVisible()
virtual ~G4VisCommandGeometrySetForceCloud()
G4VisCommandGeometrySetForceCloud()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetForceLineSegmentsPerCircle()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandGeometrySetForceLineSegmentsPerCircle()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandGeometrySetForceSolid()
virtual ~G4VisCommandGeometrySetForceSolid()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
virtual ~G4VisCommandGeometrySetForceWireframe()
G4VisCommandGeometrySetForceWireframe()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetLineStyle()
G4VisCommandGeometrySetLineStyle()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandGeometrySetLineWidth()
virtual ~G4VisCommandGeometrySetLineWidth()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandGeometrySetVisibility()
void SetNewValueOnLV(G4LogicalVolume *pLV, G4int, G4bool)
G4VisCommandGeometrySetVisibility()
G4VViewer * GetCurrentViewer() const
static Verbosity GetVerbosity()