50 (
"Defines number of line segments per circle for drawing 3D arrows"
51 " for future \"/vis/scene/add/\" commands.");
75 "Number of line segments per circle for drawing 3D arrows for future"
76 "\n \"/vis/scene/add/\" commands has been set to "
89 (
"Defines colour and opacity for future \"/vis/scene/add/\" commands.");
91 (
"(Except \"/vis/scene/add/text\" commands - see \"/vis/set/textColour\".)");
97 (
"Red component or a string, e.g., \"cyan\" (green and blue parameters are ignored).");
100 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
103 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
106 parameter =
new G4UIparameter (
"alpha",
'd', omitable =
true);
128 std::istringstream iss(newValue);
129 iss >> redOrString >> green >> blue >> opacity;
135 "Colour for future \"/vis/scene/add/\" commands has been set to "
137 ".\n(Except \"/vis/scene/add/text\" commands - use \"/vis/set/textColour\".)"
149 (
"Sets an extent for future \"/vis/scene/add/*Field\" commands.");
151 (
"The default is a null extent, which is interpreted by the commands as the"
152 "\nextent of the whole scene.");
154 parameter =
new G4UIparameter (
"xmin",
'd', omitable =
false);
156 parameter =
new G4UIparameter (
"xmax",
'd', omitable =
false);
158 parameter =
new G4UIparameter (
"ymin",
'd', omitable =
false);
160 parameter =
new G4UIparameter (
"ymax",
'd', omitable =
false);
162 parameter =
new G4UIparameter (
"zmin",
'd', omitable =
false);
164 parameter =
new G4UIparameter (
"zmax",
'd', omitable =
false);
166 parameter =
new G4UIparameter (
"unit",
's', omitable =
false);
184 G4double xmin, xmax, ymin, ymax, zmin, zmax;
186 std::istringstream iss(newValue);
187 iss >> xmin >> xmax >> ymin >> ymax >> zmin >> zmax >> unitString;
189 xmin *= unit; xmax *= unit;
190 ymin *= unit; ymax *= unit;
191 zmin *= unit; zmax *= unit;
198 "Extent for future \"/vis/scene/add/*Field\" commands has been set to "
200 <<
"\nVolume for field has been cleared."
212 (
"Defines line width for future \"/vis/scene/add/\" commands.");
236 "Line width for future \"/vis/scene/add/\" commands has been set to "
249 (
"Defines colour and opacity for future \"/vis/scene/add/text\" commands.");
255 (
"Red component or a string, e.g., \"cyan\" (green and blue parameters are ignored).");
258 parameter =
new G4UIparameter (
"green",
'd', omitable =
true);
261 parameter =
new G4UIparameter (
"blue",
'd', omitable =
true);
264 parameter =
new G4UIparameter (
"alpha",
'd', omitable =
true);
286 std::istringstream iss(newValue);
287 iss >> redOrString >> green >> blue >> opacity;
293 "Colour for future \"/vis/scene/add/text\" commands has been set to "
306 (
"Defines layout future \"/vis/scene/add/text\" commands.");
308 (
"\"left\" (default) for left justification to provided coordinate.");
310 (
"\"centre\" or \"center\" for text centered on provided coordinate.");
312 (
"\"right\" for right justification to provided coordinate.");
333 else if (newValue ==
"centre" || newValue ==
"center")
341 G4cout <<
"Text layout (for future \"text\" commands) has been set to \""
354 (
"Defines text size (pixels) for future \"/vis/scene/add/\" commands.");
378 "Text size for future \"/vis/scene/add/\" commands has been set to "
392 (
"Defines touchable for future \"/vis/touchable/set/\" commands.");
394 (
"Please provide a list of space-separated physical volume names and"
395 "\ncopy number pairs starting at the world volume, e.g:"
396 "\n /vis/set/touchable World 0 Envelope 0 Shape1 0"
397 "\n(To get list of touchables, use \"/vis/drawTree\")"
398 "\n(To save, use \"/vis/viewer/save\")");
399 parameter =
new G4UIparameter (
"list",
's', omitable =
true);
401 (
"List of physical volume names and copy number pairs");
419 if (newValue.empty()) {
432 G4String::size_type iBegin, iEnd;
433 iBegin = newValue.find_first_not_of(
' ');
434 while (iBegin != G4String::npos) {
435 iEnd = newValue.find_first_of(
' ',iBegin);
436 if (iEnd == G4String::npos) {
437 iEnd = newValue.length();
440 iBegin = newValue.find_first_not_of(
' ',iEnd);
441 if (iBegin == G4String::npos) {
444 "WARNING: G4VisCommandSetTouchable::SetNewValue"
445 "\n A pair not found. (There should be an even number of parameters.)"
446 "\n Command ignored."
451 iEnd = newValue.find_first_of(
' ',iBegin);
452 if (iEnd == G4String::npos) {
453 iEnd = newValue.length();
456 std::istringstream iss(newValue.substr(iBegin,iEnd-iBegin));
457 if (!(iss >> copyNo)) {
460 "WARNING: G4VisCommandSetTouchable::SetNewValue"
461 "\n Error reading copy number - it was not numeric?"
462 "\n Command ignored."
467 currentTouchablePath.push_back
469 iBegin = newValue.find_first_not_of(
' ',iEnd);
473 G4bool successful =
false;
476 size_t nWorlds = transportationManager->
GetNoWorlds();
477 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
479 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
502 "WARNING: G4VisCommandSetTouchable::SetNewValue"
503 "\n Touchable not found."
518 (
"Sets a volume for \"/vis/scene/add/*Field\" commands.");
520 (
"Takes a volume name or a /regular expression/ -- see guidance for"
521 "\n\"/vis/drawVolume\"");
522 parameter =
new G4UIparameter (
"physical-volume-name",
's', omitable =
false);
524 parameter =
new G4UIparameter (
"copy-no",
'i', omitable =
true);
525 parameter -> SetGuidance (
"If negative, matches any copy no.");
526 parameter -> SetDefaultValue (-1);
528 parameter =
new G4UIparameter (
"draw",
'b', omitable =
true);
529 parameter -> SetGuidance (
"If true, draw extent of found volumes.");
530 parameter -> SetDefaultValue (
false);
550 std::istringstream is (newValue);
551 is >>
name >> copyNo >> drawString;
556 size_t nWorlds = transportationManager->
GetNoWorlds();
557 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
561 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
568 for (
const auto& findings: searchScene.
GetFindings()) {
570 G4VisExtent extent = findings.fpFoundPV->GetLogicalVolume()->GetSolid()->GetExtent();
571 extent.
Transform(findings.fFoundObjectTransformation);
580 G4cerr <<
", copy no. " << copyNo <<
",";
594 <<
"\"" << findings.fpFoundPV->GetName()
595 <<
"\", copy no. " << findings.fFoundPVCopyNo
596 <<
", found\nin searched volume \""
597 << findings.fpSearchPV->GetName()
598 <<
"\" at depth " << findings.fFoundDepth
599 <<
",\nbase path: \"" << findings.fFoundBasePVPath
600 <<
"\",\nand has been set as volume for field."
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
void AccrueBoundingExtent(const G4VisExtent &)
const G4VisExtent & GetExtent() const
std::vector< PVNameCopyNo > PVNameCopyNoPath
void DescribeYourselfTo(G4VGraphicsScene &)
const std::vector< Findings > & GetFindings() const
const G4PhysicalVolumeModel::TouchableProperties & GetFoundTouchableProperties() const
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
size_t GetNoWorlds() const
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4double GetNewDoubleValue(const char *paramString)
void SetDefaultValue(G4double defVal)
void SetCandidates(const char *candidateList)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4int GetNewIntValue(const char *paramString)
void SetDefaultValue(G4int defVal)
static G4double ValueOf(const char *unitName)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
static G4bool ConvertToBool(const char *st)
void SetRange(const char *rs)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
void SetModelingParameters(const G4ModelingParameters *)
static G4double fCurrentTextSize
static G4Colour fCurrentTextColour
static std::vector< G4PhysicalVolumesSearchScene::Findings > fCurrrentPVFindingsForField
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
static G4VisManager * fpVisManager
static G4VisExtent fCurrentExtentForField
void DrawExtent(const G4VisExtent &)
const G4String & ConvertToColourGuidance()
static G4int fCurrentArrow3DLineSegmentsPerCircle
static G4PhysicalVolumeModel::TouchableProperties fCurrentTouchableProperties
static G4Text::Layout fCurrentTextLayout
static G4double fCurrentLineWidth
static G4Colour fCurrentColour
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetArrow3DLineSegmentsPerCircle()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithAnInteger * fpCommand
virtual ~G4VisCommandSetArrow3DLineSegmentsPerCircle()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSetColour()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetExtentForField()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSetExtentForField()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetLineWidth()
G4UIcmdWithADouble * fpCommand
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSetLineWidth()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetTextColour()
virtual ~G4VisCommandSetTextColour()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSetTextLayout()
virtual ~G4VisCommandSetTextLayout()
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithAString * fpCommand
void SetNewValue(G4UIcommand *command, G4String newValue)
G4VisCommandSetTextSize()
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSetTextSize()
G4UIcmdWithADouble * fpCommand
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetTouchable()
virtual ~G4VisCommandSetTouchable()
void SetNewValue(G4UIcommand *command, G4String newValue)
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandSetVolumeForField()
G4String GetCurrentValue(G4UIcommand *command)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandSetVolumeForField()
G4VisExtent & Transform(const G4Transform3D &)
static Verbosity GetVerbosity()
const char * name(G4int ptype)
G4ModelingParameters::PVNameCopyNoPath fTouchablePath
G4VPhysicalVolume * fpTouchablePV