64 std::ostringstream oss;
65 oss << x/uv <<
" " << y/uv <<
" " << unitName;
76 std::istringstream is(paramString);
96 (
"Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
97 "\n (b) string such as \"white\", \"black\", \"grey\", \"red\"...or"
98 "\n (c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
99 "\n or \"grey ! ! .6\" (note \"!\"'s for unused parameters).");
120 const size_t iPos0 = 0;
121 if (std::isalpha(redOrString[iPos0])) {
127 G4cout <<
"WARNING: Colour \"" << redOrString
128 <<
"\" not found. Defaulting to " << colour
141 std::istringstream iss(redOrString);
146 G4cout <<
"WARNING: String \"" << redOrString
147 <<
"\" cannot be parsed. Defaulting to " << colour
152 colour =
G4Colour(red,green,blue,opacity);
173 <<
"\n Unit \"" << unit <<
"\" not defined"
180 <<
"\n Unit \"" << unit <<
"\" not a unit of " << category;
181 if (category ==
"Volumic Mass")
G4cerr <<
" (density)";
196 const G4SceneList& sceneList = fpVisManager -> GetSceneList ();
198 G4int iScene, nScenes = sceneList.size ();
199 for (iScene = 0; iScene < nScenes; iScene++) {
200 if (sceneList [iScene] -> GetName () == sceneName)
break;
204 if (iScene < nScenes) {
205 pScene = sceneList [iScene];
210 G4cout <<
"WARNING: Scene \"" << sceneName <<
"\" not found."
216 fpVisManager -> SetCurrentScene (pScene);
220 G4VViewer* pViewer = fpVisManager -> GetCurrentViewer();
221 G4VSceneHandler* sceneHandler = fpVisManager -> GetCurrentSceneHandler();
222 if (sceneHandler && sceneHandler -> GetScene ()) {
225 ApplyCommand (
"/vis/scene/notifyHandlers");
std::vector< PVNameCopyNo > PVNameCopyNoPath
static G4double ValueOf(const char *unitName)
static G4String ConvertToString(G4double x, G4double y, const char *unitName)
static G4double fCurrentLineWidth
static G4bool IsUnitDefined(const G4String &)
static G4UImanager * GetUIpointer()
void UpdateVisManagerScene(const G4String &sceneName="")
void ConvertToColour(G4Colour &colour, const G4String &redOrString, G4double green, G4double blue, G4double opacity)
const XML_Char int const XML_Char * value
static G4double GetValueOf(const G4String &)
static Verbosity GetVerbosity()
const G4String & ConvertToColourGuidance()
G4GLOB_DLL std::ostream G4cerr
static G4Colour fCurrentColour
G4bool ProvideValueOfUnit(const G4String &where, const G4String &unit, const G4String &category, G4double &value)
static G4ModelingParameters::PVNameCopyNoPath fCurrentTouchablePath
G4GLOB_DLL std::ostream G4cout
static G4Text::Layout fCurrentTextLayout
static G4int fCurrentArrow3DLineSegmentsPerCircle
static G4String GetCategory(const G4String &)
static G4Colour fCurrentTextColour
static G4double fCurrentTextSize
static G4VisManager * fpVisManager
static G4bool ConvertToDoublePair(const G4String ¶mString, G4double &xval, G4double &yval)
static G4bool GetColour(const G4String &key, G4Colour &result)