19 std::vector<std::string> cmds;
21 bool gui = gopts->getSwitch(
"gui");
22 bool use_dawn = gopts->getSwitch(
"useDawn");
29 std::vector<std::string> commands;
32 cmds.emplace_back(
"/vis/scene/create gemc");
36 cmds.emplace_back(
"/vis/open DAWNFILE");
37 cmds.emplace_back(
"/vis/geometry/set/visibility World 0 false");
38 cmds.emplace_back(
"/vis/viewer/set/style surface");
40 if (gui || g4view.driver ==
"TOOLSSG_OFFSCREEN") {
42 cmds.emplace_back(
"/vis/open " + g4view.driver +
" " + g4view.dimension + g4view.position);
45 for (
const std::string &c:
addSceneTexts(gopts)) { commands.emplace_back(c); }
48 double toDegrees = 180 / 3.1415;
55 cmds.emplace_back(
"/vis/viewer/set/autoRefresh false");
57 cmds.emplace_back(
"/vis/viewer/set/viewpointThetaPhi " + std::to_string(thetaValue) +
" " + std::to_string(phiValue));
58 cmds.emplace_back(
"/vis/viewer/set/lightsThetaPhi " + std::to_string(lightThetaValue) +
" " + std::to_string(lightPhiValue));
59 cmds.emplace_back(
"/vis/viewer/set/lineSegmentsPerCircle " + std::to_string(g4view.segsPerCircle));
61 cmds.emplace_back(
"/vis/viewer/set/autoRefresh true");
68 std::vector<std::string> commands;
73 for (
const auto &text: text_to_add) {
74 commands.emplace_back(
"/vis/set/textColour " + text.color);
76 std::string position = std::to_string(text.x) +
" " + std::to_string(text.y);
77 std::string size =
" " + std::to_string(text.size) +
" ! ! ";
81 position +=
" " + std::to_string(text.z);
82 commands.emplace_back(
83 std::string(
"/vis/scene/add/text2D ").append(position).append(size).append(text.text));
86 commands.emplace_back(std::string(
"/vis/scene/add/text ").append(position).append(size).append(text.text));
90 commands.emplace_back(
"/vis/set/textColour");
Scene text option structures and helpers for the g4display module.