59 scenePrimitives( scenePrimitives ), drawRadialLine( NULL ),
60 clearRadialLines( NULL ), markTargetCenter( NULL ),
61 highlightInnerCrystals( NULL ), setColour( NULL )
65 drawRadialLine->
SetGuidance(
"Draw radial line with specified theta, phi "
66 "(both in deg!)\n and length (in cm!)" );
68 "RadialLineLength",
true );
69 drawRadialLine->
SetRange(
"RadialLineLength >= 0." );
75 clearRadialLines->
SetGuidance(
"Clear all existing radial lines" );
80 markTargetCenter->
SetGuidance(
"Mark/unmark target center" );
87 highlightInnerCrystals->
SetGuidance(
"Highlight inner crystals in "
88 "calorimeters on/off" );
95 setColour->
SetGuidance(
"Set colour of specified scene primitive" );
98 parameter->
SetGuidance(
"Scene primitive, possible values:\n"
99 " tc - target center mark,\n"
100 " rl - radial lines,\n"
101 " ic - inner crystal highlights" );
105 parameter->
SetGuidance(
"Red component or string, e.g. \"blue\", in which "
106 "case succeeding colour\n components are ignored" );
127 delete drawRadialLine;
128 delete clearRadialLines;
129 delete markTargetCenter;
130 delete highlightInnerCrystals;
140 if ( cmd == drawRadialLine )
147 if ( cmd == clearRadialLines )
152 if ( cmd == markTargetCenter )
158 if ( cmd == highlightInnerCrystals )
164 if ( cmd == setColour )
171 G4Colour colour( 1, green, blue, opacity );
172 std::istringstream iss( value );
174 iss >> name >> redOrString >> green >> blue >> opacity;
176 if ( std::isalpha( redOrString[
size_t( 0 ) ] ) )
209 scenePrimitives->
SetColour( primitive, colour );
void SetParameter(G4UIparameter *const newParameter)
CLHEP::Hep3Vector G4ThreeVector
void SetColour(CexmcSPType primitive, const G4Colour &colour)
void SetParameterCandidates(const char *theString)
void ClearRadialLines(void)
void SetParameterName(const char *theNameX, const char *theNameY, const char *theNameZ, G4bool omittable, G4bool currentAsDefault=false)
static G4bool GetColour(const G4String &key, G4Colour &result)
void MarkTargetCenter(G4bool on=true)
void SetDefaultValue(const char *theDefaultValue)
CexmcScenePrimitivesMessenger(CexmcScenePrimitives *scenePrimitives)
static G4bool GetNewBoolValue(const char *paramString)
void SetDefaultValue(G4bool defVal)
void SetParameterName(const char *theName, G4bool omittable, G4bool currentAsDefault=false)
static G4ThreeVector GetNew3VectorValue(const char *paramString)
const XML_Char int const XML_Char * value
G4double GetGreen() const
void SetRange(const char *rs)
void SetGuidance(const char *aGuidance)
static G4double ConvertToDouble(const char *st)
void AvailableForStates(G4ApplicationState s1)
void SetNewValue(G4UIcommand *cmd, G4String value)
~CexmcScenePrimitivesMessenger()
static G4String visDirName
void SetDefaultValue(G4ThreeVector defVal)
void SetGuidance(const char *theGuidance)
void HighlightInnerCrystals(G4bool=true)
void DrawRadialLine(const G4ThreeVector &line)