51 (
"/vis/touchable/set/colour",
this);
54 (
"Use \"/vis/set/touchable\" to set current touchable.");
56 (
"If \"red\" is a string understood by the vis system it will be taken."
57 "\n Otherwise the values of \red\", \"green\", etc., are used.");
67 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
72 (
"/vis/touchable/set/daughtersInvisible",
this);
74 (
"Daughters of current touchable invisible: true/false.");
76 (
"Use \"/vis/set/touchable\" to set current touchable.");
81 (
"/vis/touchable/set/forceAuxEdgeVisible",
this);
83 (
"Force auxiliary (soft) edges of current touchable to be visible: true/false.");
85 (
"Use \"/vis/set/touchable\" to set current touchable.");
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.");
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.");
120 (
"/vis/touchable/set/lineStyle",
this);
123 (
"Use \"/vis/set/touchable\" to set current touchable.");
129 (
"/vis/touchable/set/lineWidth",
this);
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.");
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);
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetParameter(G4UIparameter *const newParameter)
void SetColour(const G4Colour &)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4String GetCurrentValue(G4UIcommand *command)
void SetLineStyle(LineStyle)
void SetLineWidth(G4double)
const G4ViewParameters & GetViewParameters() const
static G4bool GetColour(const G4String &key, G4Colour &result)
void SetDefaultValue(const char *theDefaultValue)
G4UIcmdWithAString * fpCommandSetLineStyle
G4UIcmdWithABool * fpCommandSetForceAuxEdgeVisible
void SetForceSolid(G4bool=true)
G4UIcmdWithADouble * fpCommandSetLineWidth
void SetDefaultValue(G4bool defVal)
static G4UImanager * GetUIpointer()
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
G4UIcmdWithABool * fpCommandSetForceSolid
G4GLOB_DLL std::ostream G4cout
G4UIcmdWithABool * fpCommandSetVisibility
virtual ~G4VisCommandsTouchableSet()
static G4bool ConvertToBool(const char *st)
void SetVisibility(G4bool=true)
G4double GetGreen() const
void SetGuidance(const char *aGuidance)
void SetNewValue(G4UIcommand *command, G4String newValue)
static G4double ConvertToDouble(const char *st)
G4UIcmdWithAnInteger * fpCommandSetLineSegmentsPerCircle
static G4int ConvertToInt(const char *st)
void SetDaughtersInvisible(G4bool=true)
G4UIcmdWithABool * fpCommandSetForceWireframe
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetDefaultValue(const char *defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
void SetDefaultValue(G4double defVal)
G4VisCommandsTouchableSet()
void SetCandidates(const char *candidateList)
void SetForceAuxEdgeVisible(G4bool=true)
void SetDefaultValue(G4int defVal)
G4UIcommand * fpCommandSetColour
void SetForceWireframe(G4bool=true)
G4UIcmdWithABool * fpCommandSetDaughtersInvisible
G4int ApplyCommand(const char *aCommand)
G4GLOB_DLL std::ostream G4cerr
void SetForceLineSegmentsPerCircle(G4int nSegments)