51 (
"Use \"/vis/set/touchable\" to set current touchable.");
53 (
"You may also need \"/vis/touchable/findPath\".");
55 (
"Use \"/vis/touchable/set\" to set attributes.");
82 (
"Prints the path to touchable and its logical volume mother"
83 "\ngiven a physical volume name and copy no.");
85 (
"A search of all worlds is made and all physical volume names are"
86 "\nmatched against the argument of this command. If this is of the"
87 "\nform \"/regexp/\", where regexp is a regular expression (see C++ regex),"
88 "\nthe physical volume name is matched against regexp by the usual rules"
89 "\nof regular expression matching. Otherwise an exact match is required."
90 "\nFor example, \"/Shap/\" matches \"Shape1\" and \"Shape2\".");
92 (
"It may help to see a textual representation of the geometry hierarchy of"
93 "\nthe worlds. Try \"/vis/drawTree [worlds]\" or one of the driver/browser"
94 "\ncombinations that have the required functionality, e.g., HepRep.");
96 parameter =
new G4UIparameter (
"physical-volume-name",
's', omitable =
true);
97 parameter -> SetDefaultValue (
"world");
99 parameter =
new G4UIparameter (
"copy-no",
'i', omitable =
true);
100 parameter -> SetGuidance (
"If negative, matches any copy no.");
101 parameter -> SetDefaultValue (-1);
153 size_t nWorlds = transportationManager->
GetNoWorlds();
159 "ERROR: G4VisCommandsTouchable::SetNewValue:"
160 "\n No world. Maybe the geometry has not yet been defined."
161 "\n Try \"/run/initialize\""
168 if (!currentViewer) {
171 "ERROR: No current viewer - \"/vis/viewer/list\" to see possibilities."
181 "ERROR: No current scene - \"/vis/scene/list\" to see possibilities."
202 G4Scene tempScene(
"Centre Scene");
208 <<
",\n has been added to temporary scene \"" << tempScene.
GetName() <<
"\"."
229 <<
"Viewer \"" << currentViewer->
GetName()
232 G4cout <<
"and zoomed in";
272 <<
"\", copy no. " << properties.
fCopyNo <<
" drawn"
297 const std::map<G4String,G4AttDef>* attDefs = tempPVModel.
GetAttDefs();
303 G4cout <<
"\nLocal polyhedron coordinates:\n" << *polyhedron;
306 G4cout <<
"\nGlobal polyhedron coordinates:\n" << *polyhedron;
323 G4cout <<
"Extent for field set to " << extent
324 <<
"\nVolume for field has been cleared."
339 std::istringstream iss(newValue);
340 iss >> pvName >> copyNo;
341 std::vector<G4PhysicalVolumesSearchScene::Findings> findingsVector;
342 std::vector<G4VPhysicalVolume*>::iterator iterWorld =
344 for (
size_t i = 0; i < nWorlds; ++i, ++iterWorld) {
351 for (
const auto& findings: searchScene.
GetFindings()) {
352 findingsVector.push_back(findings);
355 for (
const auto& findings: findingsVector) {
357 << findings.fFoundBasePVPath
358 <<
' ' << findings.fpFoundPV->GetName()
359 <<
' ' << findings.fFoundPVCopyNo
360 <<
" (mother logical volume: "
361 << findings.fpFoundPV->GetMotherLogical()->GetName()
365 if (findingsVector.size()) {
367 <<
"Use this to set a particular touchable with \"/vis/set/touchable <path>\""
368 <<
"\nor to see overlaps: \"/vis/drawLogicalVolume <mother-logical-volume-name>\""
372 if (copyNo >= 0)
G4cout <<
':' << copyNo;
381 const G4double intLog10LengthMax = std::floor(std::log10(lengthMax));
382 G4double length = std::pow(10,intLog10LengthMax);
383 if (5.*length < lengthMax) length *= 5.;
384 else if (2.*length < lengthMax) length *= 2.;
435 "ERROR: G4VisCommandsTouchable::SetNewValue: unrecognised command."
G4GLOB_DLL std::ostream G4cerr
G4GLOB_DLL std::ostream G4cout
void DescribeYourselfTo(G4VGraphicsScene &) override
G4VSolid * GetSolid() const
const G4Transform3D & GetCurrentTransform() const
std::vector< G4AttValue > * CreateCurrentAttValues() const
void DescribeYourselfTo(G4VGraphicsScene &)
const std::map< G4String, G4AttDef > * GetAttDefs() const
const std::vector< Findings > & GetFindings() const
G4bool AddRunDurationModel(G4VModel *, G4bool warn=false)
const G4VisExtent & GetExtent() const
const G4Point3D & GetStandardTargetPoint() const
const G4String & GetName() const
static G4TransportationManager * GetTransportationManager()
std::vector< G4VPhysicalVolume * >::iterator GetWorldsIterator()
size_t GetNoWorlds() const
static G4bool GetNewBoolValue(const char *paramString)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetGuidance(const char *aGuidance)
G4int ApplyCommand(const char *aCommand)
G4int GetVerboseLevel() const
static G4UImanager * GetUIpointer()
void SetVerboseLevel(G4int val)
void SetModelingParameters(const G4ModelingParameters *)
void SetGlobalTag(const G4String &)
virtual void SetCopyNo(G4int CopyNo)=0
G4LogicalVolume * GetLogicalVolume() const
const G4String & GetName() const
virtual G4VisExtent GetExtent() const
virtual G4Polyhedron * GetPolyhedron() const
const G4String & GetName() const
const G4ViewParameters & GetViewParameters() const
void G4VisCommandsSceneAddUnsuccessful(G4VisManager::Verbosity verbosity)
static std::vector< G4PhysicalVolumesSearchScene::Findings > fCurrrentPVFindingsForField
static G4VisManager * fpVisManager
static G4VisExtent fCurrentExtentForField
void DrawExtent(const G4VisExtent &)
void InterpolateToNewView(G4VViewer *currentViewer, const G4ViewParameters &oldVP, const G4ViewParameters &newVP, const G4int nInterpolationPoints=50, const G4int waitTimePerPointmilliseconds=20, const G4String exportString="")
void SetViewParameters(G4VViewer *viewer, const G4ViewParameters &viewParams)
static G4PhysicalVolumeModel::TouchableProperties fCurrentTouchableProperties
void CopyGuidanceFrom(const G4UIcommand *fromCmd, G4UIcommand *toCmd, G4int startLine=0)
void SetCurrentTargetPoint(const G4Point3D ¤tTargetPoint)
void SetZoomFactor(G4double zoomFactor)
G4UIcmdWithoutParameter * fpCommandDraw
virtual ~G4VisCommandsTouchable()
G4UIcommand * fpCommandFindPath
G4UIcmdWithABool * fpCommandExtentForField
G4String GetCurrentValue(G4UIcommand *command)
G4UIcmdWithoutParameter * fpCommandDump
G4UIcmdWithoutParameter * fpCommandLocalAxes
G4UIcmdWithABool * fpCommandVolumeForField
void SetNewValue(G4UIcommand *command, G4String newValue)
G4UIcmdWithoutParameter * fpCommandCentreAndZoomInOn
G4UIcmdWithoutParameter * fpCommandCentreOn
G4UIcmdWithABool * fpCommandShowExtent
G4double GetExtentRadius() const
G4VisExtent & Transform(const G4Transform3D &)
const G4Point3D & GetExtentCentre() const
G4Scene * GetCurrentScene() const
G4VSceneHandler * GetCurrentSceneHandler() const
static Verbosity GetVerbosity()
HepPolyhedron & Transform(const G4Transform3D &t)
G4PhysicalVolumeModel::TouchableProperties FindTouchableProperties(G4ModelingParameters::PVNameCopyNoPath path)
G4ModelingParameters::PVNameCopyNoPath fTouchablePath
G4VPhysicalVolume * fpTouchablePV
std::vector< G4PhysicalVolumeNodeID > fTouchableBaseFullPVPath
G4Transform3D fTouchableGlobalTransform