50 (
"/vis/touchable/set/colour",
this);
51 fpCommandSetColour->
SetGuidance(
"Set colour of current touchable.");
53 (
"Use \"/vis/set/touchable\" to set current touchable.");
57 (
"Red component or a string, e.g., \"blue\", in which case succeeding colour"
58 "\ncomponents are ignored.");
66 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
71 (
"/vis/touchable/set/daughtersInvisible",
this);
73 (
"Daughters of current touchable invisible: true/false.");
75 (
"Use \"/vis/set/touchable\" to set current touchable.");
76 fpCommandSetDaughtersInvisible->
SetParameterName(
"daughtersInvisible", omitable =
true);
80 (
"/vis/touchable/set/forceAuxEdgeVisible",
this);
82 (
"Force auxiliary (soft) edges of current touchable to be visible:"
85 (
"Use \"/vis/set/touchable\" to set current touchable.");
86 fpCommandSetForceAuxEdgeVisible->
SetParameterName(
"forceAuxEdgeVisible", omitable =
true);
90 (
"/vis/touchable/set/lineSegmentsPerCircle",
this);
92 (
"For current touchable, set number of line segments per circle, the"
93 "\nprecision with which a curved line or surface is represented by a"
94 "\npolygon or polyhedron, regardless of the view parameters."
95 "\nNegative to pick up G4Polyhedron default value.");
97 (
"Use \"/vis/set/touchable\" to set current touchable.");
98 fpCommandSetLineSegmentsPerCircle->
SetParameterName(
"lineSegmentsPerCircle", omitable =
true);
102 (
"/vis/touchable/set/forceSolid",
this);
104 (
"Force current touchable always to be drawn solid (surface drawing).");
106 (
"Use \"/vis/set/touchable\" to set current touchable.");
111 (
"/vis/touchable/set/forceWireframe",
this);
113 (
"Force current touchable always to be drawn as wireframe.");
115 (
"Use \"/vis/set/touchable\" to set current touchable.");
116 fpCommandSetForceWireframe->
SetParameterName(
"forceWireframe", omitable =
true);
120 (
"/vis/touchable/set/lineStyle",
this);
121 fpCommandSetLineStyle->
SetGuidance(
"Set line style of current touchable drawing.");
123 (
"Use \"/vis/set/touchable\" to set current touchable.");
125 fpCommandSetLineStyle->
SetCandidates(
"unbroken dashed dotted");
129 (
"/vis/touchable/set/lineWidth",
this);
130 fpCommandSetLineWidth->
SetGuidance(
"Set line width of current touchable.");
132 (
"Use \"/vis/set/touchable\" to set current touchable.");
137 (
"/vis/touchable/set/visibility",
this);
139 (
"Set visibility of current touchable: true/false.");
141 (
"Use \"/vis/set/touchable\" to set current touchable.");
147 delete fpCommandSetVisibility;
148 delete fpCommandSetLineWidth;
149 delete fpCommandSetLineStyle;
150 delete fpCommandSetForceWireframe;
151 delete fpCommandSetForceSolid;
152 delete fpCommandSetLineSegmentsPerCircle;
153 delete fpCommandSetForceAuxEdgeVisible;
154 delete fpCommandSetDaughtersInvisible;
155 delete fpCommandSetColour;
167 G4VViewer* currentViewer = fpVisManager->GetCurrentViewer();
168 if (!currentViewer) {
171 "ERROR: G4VisCommandsTouchableSet::SetNewValue: no current viewer."
180 if (command == fpCommandSetColour)
184 std::istringstream iss(newValue);
185 iss >> redOrString >> green >> blue >> opacity;
187 const size_t iPos0 = 0;
188 if (std::isalpha(redOrString[iPos0])) {
191 G4cout <<
"WARNING: Colour \"" << redOrString
192 <<
"\" not found. Defaulting to white and opaque."
207 fCurrentTouchablePath));
210 else if (command == fpCommandSetDaughtersInvisible) {
216 fCurrentTouchablePath));
219 else if (command == fpCommandSetForceAuxEdgeVisible) {
225 fCurrentTouchablePath));
228 else if (command == fpCommandSetLineSegmentsPerCircle) {
235 fCurrentTouchablePath));
238 else if (command == fpCommandSetForceSolid) {
244 fCurrentTouchablePath));
247 else if (command == fpCommandSetForceWireframe) {
253 fCurrentTouchablePath));
256 else if (command == fpCommandSetLineStyle) {
258 if (newValue ==
"dashed") {
260 }
else if (newValue ==
"dotted") {
269 fCurrentTouchablePath));
272 else if (command == fpCommandSetLineWidth) {
278 fCurrentTouchablePath));
281 else if (command == fpCommandSetVisibility) {
287 fCurrentTouchablePath));
293 "ERROR: G4VisCommandsTouchableSet::SetNewValue: unrecognised command."
299 SetViewParameters(currentViewer,workingVP);