65 std::ostringstream oss;
66 oss << x/uv <<
" " << y/uv <<
" " << unitName;
77 std::istringstream is(paramString);
97 (
"Accepts (a) RGB triplet. e.g., \".3 .4 .5\", or"
98 "\n (b) string such as \"white\", \"black\", \"grey\", \"red\"...or"
99 "\n (c) an additional number for opacity, e.g., \".3 .4 .5 .6\""
100 "\n or \"grey ! ! .6\" (note \"!\"'s for unused parameters).");
121 const size_t iPos0 = 0;
122 if (std::isalpha(redOrString[iPos0])) {
128 G4cout <<
"WARNING: Colour \"" << redOrString
129 <<
"\" not found. Defaulting to " << colour
142 std::istringstream iss(redOrString);
147 G4cout <<
"WARNING: String \"" << redOrString
148 <<
"\" cannot be parsed. Defaulting to " << colour
153 colour =
G4Colour(red,green,blue,opacity);
174 <<
"\n Unit \"" << unit <<
"\" not defined"
181 <<
"\n Unit \"" << unit <<
"\" not a unit of " << category;
182 if (category ==
"Volumic Mass")
G4cerr <<
" (density)";
198 G4cout <<
"WARNING: Scene pointer is null."
205 if (!pSceneHandler) {
207 G4cout <<
"WARNING: Scene handler not found." <<
G4endl;
216 if (pScene == pSceneHandler->
GetScene()) {
227 "WARNING: For some reason, possibly mentioned above, it has not been"
228 "\n possible to add to the scene."
236 RefreshIfRequired(viewer);
243 if (sceneHandler && sceneHandler->
GetScene()) {
249 G4cout <<
"Issue /vis/viewer/refresh or flush to see effect."
258 std::vector<G4ViewParameters> viewVector,
259 const G4int nInterpolationPoints,
260 const G4int waitTimePerPointmilliseconds,
263 const G4int safety = viewVector.size()*nInterpolationPoints;
264 G4int safetyCount = 0;
271 if (exportString ==
"export" &&
277 #ifdef G4VIS_USE_STD11
278 if (waitTimePerPointmilliseconds > 0)
279 std::this_thread::sleep_for(std::chrono::milliseconds(waitTimePerPointmilliseconds));
281 }
while (safetyCount++ < safety);
288 const G4int nInterpolationPoints,
289 const G4int waitTimePerPointmilliseconds,
292 std::vector<G4ViewParameters> viewVector;
293 viewVector.push_back(oldVP);
294 viewVector.push_back(oldVP);
295 viewVector.push_back(newVP);
296 viewVector.push_back(newVP);
301 nInterpolationPoints,
302 waitTimePerPointmilliseconds,
309 if (fromCmd && toCmd) {
311 for (
G4int i = startLine; i < nGuideEntries; ++i) {
321 if (fromCmd && toCmd) {
323 for (
G4int i = 0; i < nParEntries; ++i) {
336 if (halfX > 0. && halfY > 0. && halfZ > 0.) {
337 const G4Box box(
"vis_extent",halfX,halfY,halfZ);