13vector<G4SceneText>
getSceneTexts(
const std::shared_ptr<GOptions>& gopts) {
14 vector<G4SceneText> st;
16 auto g4t_node = gopts->getOptionNode(
"g4text");
19 for (
auto g4t_item : g4t_node) {
23 st_item.
color = gopts->get_variable_in_option<
string>(g4t_item,
"color",
"black");
24 st_item.
x = gopts->get_variable_in_option<
double>(g4t_item,
"x", 0);
25 st_item.
y = gopts->get_variable_in_option<
double>(g4t_item,
"y", 0);
27 st_item.
size = gopts->get_variable_in_option<
double>(g4t_item,
"size", 24.0);
29 st.push_back(st_item);
Scene text option structures and helpers for the g4display module.
One text annotation to be inserted into the Geant4 scene.
std::string color
Text color name understood by Geant4 (e.g. "black", "red").
double z
Z position; if left at default sentinel, Z is treated as “not specified”.
std::string text
Text string to be displayed.
int size
Text size parameter passed to Geant4 visualization command.