49 (
"/vis/touchable/set/colour",
this);
50 fpCommandSetColour->
SetGuidance(
"Set colour of current touchable.");
52 (
"Use \"/vis/set/touchable\" to set current touchable.");
63 parameter =
new G4UIparameter(
"opacity",
'd', omitable =
true);
68 (
"/vis/touchable/set/daughtersInvisible",
this);
70 (
"Daughters of current touchable invisible: true/false.");
72 (
"Use \"/vis/set/touchable\" to set current touchable.");
73 fpCommandSetDaughtersInvisible->
SetParameterName(
"daughtersInvisible", omitable =
true);
77 (
"/vis/touchable/set/forceAuxEdgeVisible",
this);
79 (
"Force auxiliary (soft) edges of current touchable to be visible: true/false.");
81 (
"Use \"/vis/set/touchable\" to set current touchable.");
82 fpCommandSetForceAuxEdgeVisible->
SetParameterName(
"forceAuxEdgeVisible", omitable =
true);
86 (
"/vis/touchable/set/forceCloud",
this);
88 (
"Force current touchable always to be drawn as a cloud.");
90 (
"Use \"/vis/set/touchable\" to set current touchable.");
95 (
"/vis/touchable/set/forceSolid",
this);
97 (
"Force current touchable always to be drawn solid (surface drawing).");
99 (
"Use \"/vis/set/touchable\" to set current touchable.");
104 (
"/vis/touchable/set/forceWireframe",
this);
106 (
"Force current touchable always to be drawn as wireframe.");
108 (
"Use \"/vis/set/touchable\" to set current touchable.");
109 fpCommandSetForceWireframe->
SetParameterName(
"forceWireframe", omitable =
true);
113 (
"/vis/touchable/set/lineSegmentsPerCircle",
this);
115 (
"For current touchable, set number of line segments per circle, the"
116 "\nprecision with which a curved line or surface is represented by a"
117 "\npolygon or polyhedron, regardless of the view parameters."
118 "\nNegative to pick up G4Polyhedron default value.");
120 (
"Use \"/vis/set/touchable\" to set current touchable.");
121 fpCommandSetLineSegmentsPerCircle->
SetParameterName(
"lineSegmentsPerCircle", omitable =
true);
125 (
"/vis/touchable/set/lineStyle",
this);
126 fpCommandSetLineStyle->
SetGuidance(
"Set line style of current touchable drawing.");
128 (
"Use \"/vis/set/touchable\" to set current touchable.");
130 fpCommandSetLineStyle->
SetCandidates(
"unbroken dashed dotted");
134 (
"/vis/touchable/set/lineWidth",
this);
135 fpCommandSetLineWidth->
SetGuidance(
"Set line width of current touchable.");
137 (
"Use \"/vis/set/touchable\" to set current touchable.");
142 (
"/vis/touchable/set/numberOfCloudPoints",
this);
144 (
"For current touchable, set number of cloud points for cloud drawing."
145 "\n<= 0 means under control of viewer.");
147 (
"Use \"/vis/set/touchable\" to set current touchable.");
148 fpCommandSetNumberOfCloudPoints->
SetParameterName(
"numberOfCloudPoints", omitable =
true);
152 (
"/vis/touchable/set/visibility",
this);
154 (
"Set visibility of current touchable: true/false.");
156 (
"Use \"/vis/set/touchable\" to set current touchable.");
162 delete fpCommandSetVisibility;
163 delete fpCommandSetNumberOfCloudPoints;
164 delete fpCommandSetLineWidth;
165 delete fpCommandSetLineStyle;
166 delete fpCommandSetForceWireframe;
167 delete fpCommandSetForceSolid;
168 delete fpCommandSetForceCloud;
169 delete fpCommandSetLineSegmentsPerCircle;
170 delete fpCommandSetForceAuxEdgeVisible;
171 delete fpCommandSetDaughtersInvisible;
172 delete fpCommandSetColour;
185 if (!currentViewer) {
188 "ERROR: G4VisCommandsTouchableSet::SetNewValue: no current viewer."
197 if (command == fpCommandSetColour)
201 std::istringstream iss(newValue);
202 iss >> redOrString >> green >> blue >> opacity;
213 else if (command == fpCommandSetDaughtersInvisible) {
222 else if (command == fpCommandSetForceAuxEdgeVisible) {
231 else if (command == fpCommandSetLineSegmentsPerCircle) {
241 else if (command == fpCommandSetForceCloud) {
250 else if (command == fpCommandSetForceSolid) {
259 else if (command == fpCommandSetForceWireframe) {
268 else if (command == fpCommandSetLineStyle) {
270 if (newValue ==
"dashed") {
272 }
else if (newValue ==
"dotted") {
284 else if (command == fpCommandSetLineWidth) {
293 else if (command == fpCommandSetNumberOfCloudPoints) {
303 else if (command == fpCommandSetVisibility) {
315 "ERROR: G4VisCommandsTouchableSet::SetNewValue: unrecognised command."
G4GLOB_DLL std::ostream G4cerr
@ 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