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;
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."
210 else if (command == fpCommandSetDaughtersInvisible) {
219 else if (command == fpCommandSetForceAuxEdgeVisible) {
228 else if (command == fpCommandSetLineSegmentsPerCircle) {
238 else if (command == fpCommandSetForceSolid) {
247 else if (command == fpCommandSetForceWireframe) {
256 else if (command == fpCommandSetLineStyle) {
258 if (newValue ==
"dashed") {
260 }
else if (newValue ==
"dotted") {
272 else if (command == fpCommandSetLineWidth) {
281 else if (command == fpCommandSetVisibility) {
293 "ERROR: G4VisCommandsTouchableSet::SetNewValue: unrecognised command."
G4DLLIMPORT std::ostream G4cout
static G4bool GetColour(const G4String &key, G4Colour &result)
G4double GetGreen() const
@ VASForceLineSegmentsPerCircle
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
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)
void SetDefaultValue(G4int defVal)
void SetParameter(G4UIparameter *const newParameter)
void SetGuidance(const char *aGuidance)
static G4int ConvertToInt(const char *st)
static G4bool ConvertToBool(const char *st)
static G4double ConvertToDouble(const char *st)
void SetDefaultValue(const char *theDefaultValue)
void SetGuidance(const char *theGuidance)
const G4ViewParameters & GetViewParameters() const
void SetViewParameters(G4VViewer *, const G4ViewParameters &)
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath
static G4VisManager * fpVisManager
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetForceAuxEdgeVisible(G4bool)
void SetVisibility(G4bool)
void SetColour(const G4Colour &)
void SetDaughtersInvisible(G4bool)
void SetForceWireframe(G4bool)
void SetLineWidth(G4double)
void SetForceSolid(G4bool)
void SetLineStyle(LineStyle)
void SetForceLineSegmentsPerCircle(G4int nSegments)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandsTouchableSet()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandsTouchableSet()
G4VViewer * GetCurrentViewer() const
static Verbosity GetVerbosity()