51 (
"/vis/touchable/set/colour",
this);
52 fpCommandSetColour->
SetGuidance(
"Set colour of current touchable.");
54 (
"Use \"/vis/set/touchable\" to set current touchable.");
65 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
70 (
"/vis/touchable/set/daughtersInvisible",
this);
72 (
"Daughters of current touchable invisible: true/false.");
74 (
"Use \"/vis/set/touchable\" to set current touchable.");
75 fpCommandSetDaughtersInvisible->
SetParameterName(
"daughtersInvisible", omitable =
true);
79 (
"/vis/touchable/set/forceAuxEdgeVisible",
this);
81 (
"Force auxiliary (soft) edges of current touchable to be visible: true/false.");
83 (
"Use \"/vis/set/touchable\" to set current touchable.");
84 fpCommandSetForceAuxEdgeVisible->
SetParameterName(
"forceAuxEdgeVisible", omitable =
true);
88 (
"/vis/touchable/set/forceCloud",
this);
90 (
"Force current touchable always to be drawn as a cloud.");
92 (
"Use \"/vis/set/touchable\" to set current touchable.");
97 (
"/vis/touchable/set/forceSolid",
this);
99 (
"Force current touchable always to be drawn solid (surface drawing).");
101 (
"Use \"/vis/set/touchable\" to set current touchable.");
106 (
"/vis/touchable/set/forceWireframe",
this);
108 (
"Force current touchable always to be drawn as wireframe.");
110 (
"Use \"/vis/set/touchable\" to set current touchable.");
111 fpCommandSetForceWireframe->
SetParameterName(
"forceWireframe", omitable =
true);
115 (
"/vis/touchable/set/lineSegmentsPerCircle",
this);
117 (
"For current touchable, set number of line segments per circle, the"
118 "\nprecision with which a curved line or surface is represented by a"
119 "\npolygon or polyhedron, regardless of the view parameters."
120 "\nNegative to pick up G4Polyhedron default value.");
122 (
"Use \"/vis/set/touchable\" to set current touchable.");
123 fpCommandSetLineSegmentsPerCircle->
SetParameterName(
"lineSegmentsPerCircle", omitable =
true);
127 (
"/vis/touchable/set/lineStyle",
this);
128 fpCommandSetLineStyle->
SetGuidance(
"Set line style of current touchable drawing.");
130 (
"Use \"/vis/set/touchable\" to set current touchable.");
132 fpCommandSetLineStyle->
SetCandidates(
"unbroken dashed dotted");
136 (
"/vis/touchable/set/lineWidth",
this);
137 fpCommandSetLineWidth->
SetGuidance(
"Set line width of current touchable.");
139 (
"Use \"/vis/set/touchable\" to set current touchable.");
144 (
"/vis/touchable/set/numberOfCloudPoints",
this);
146 (
"For current touchable, set number of cloud points for cloud drawing."
147 "\n<= 0 means under control of viewer.");
149 (
"Use \"/vis/set/touchable\" to set current touchable.");
150 fpCommandSetNumberOfCloudPoints->
SetParameterName(
"numberOfCloudPoints", omitable =
true);
154 (
"/vis/touchable/set/visibility",
this);
156 (
"Set visibility of current touchable: true/false.");
158 (
"Use \"/vis/set/touchable\" to set current touchable.");
164 delete fpCommandSetVisibility;
165 delete fpCommandSetNumberOfCloudPoints;
166 delete fpCommandSetLineWidth;
167 delete fpCommandSetLineStyle;
168 delete fpCommandSetForceWireframe;
169 delete fpCommandSetForceSolid;
170 delete fpCommandSetForceCloud;
171 delete fpCommandSetLineSegmentsPerCircle;
172 delete fpCommandSetForceAuxEdgeVisible;
173 delete fpCommandSetDaughtersInvisible;
174 delete fpCommandSetColour;
187 if (!currentViewer) {
190 "ERROR: G4VisCommandsTouchableSet::SetNewValue: no current viewer."
199 if (command == fpCommandSetColour)
203 std::istringstream iss(newValue);
204 iss >> redOrString >> green >> blue >> opacity;
215 else if (command == fpCommandSetDaughtersInvisible) {
224 else if (command == fpCommandSetForceAuxEdgeVisible) {
233 else if (command == fpCommandSetLineSegmentsPerCircle) {
243 else if (command == fpCommandSetForceCloud) {
252 else if (command == fpCommandSetForceSolid) {
261 else if (command == fpCommandSetForceWireframe) {
270 else if (command == fpCommandSetLineStyle) {
272 if (newValue ==
"dashed") {
274 }
else if (newValue ==
"dotted") {
286 else if (command == fpCommandSetLineWidth) {
295 else if (command == fpCommandSetNumberOfCloudPoints) {
305 else if (command == fpCommandSetVisibility) {
313 static G4bool first =
true;
316 G4warn <<
"WARNING: If \"/vis/touchable/set/visibility\" does not appear to"
317 "\n work, check that opacity (4th component of colour) is non-zero." <<
G4endl;
318 G4warn <<
"ALSO: The volume must be in a requested physical volume tree,"
319 "\n not in the \"base path\". E.g., if"
320 "\n /vis/drawVolume volume-name"
321 "\n there is no way to make a parent of volume-name visible except by"
322 "\n explicitly adding the parent:"
323 "\n /vis/scene/add/volume parent-name" <<
G4endl;
331 "ERROR: G4VisCommandsTouchableSet::SetNewValue: unrecognised command."
@ VASForceNumberOfCloudPoints
@ 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)
G4int ApplyCommand(const char *aCommand)
static G4UImanager * GetUIpointer()
void SetDefaultValue(const char *theDefaultValue)
const G4ViewParameters & GetViewParameters() const
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
static G4VisManager * fpVisManager
void SetViewParameters(G4VViewer *viewer, const G4ViewParameters &viewParams)
const G4String & ConvertToColourGuidance()
static G4PhysicalVolumeModel::TouchableProperties fCurrentTouchableProperties
void AddVisAttributesModifier(const G4ModelingParameters::VisAttributesModifier &)
void SetColour(const G4Colour &)
void SetVisibility(G4bool=true)
void SetForceAuxEdgeVisible(G4bool=true)
void SetForceCloud(G4bool=true)
void SetForceWireframe(G4bool=true)
void SetLineWidth(G4double)
void SetForceSolid(G4bool=true)
void SetLineStyle(LineStyle)
void SetForceLineSegmentsPerCircle(G4int nSegments)
void SetDaughtersInvisible(G4bool=true)
void SetForceNumberOfCloudPoints(G4int nPoints)
void SetNewValue(G4UIcommand *command, G4String newValue)
virtual ~G4VisCommandsTouchableSet()
G4String GetCurrentValue(G4UIcommand *command)
G4VisCommandsTouchableSet()
G4VViewer * GetCurrentViewer() const
static Verbosity GetVerbosity()
G4ModelingParameters::PVNameCopyNoPath fTouchablePath