17 namespace po = boost::program_options;
19 namespace ActsExamples {
28 template <
typename aopt_t>
30 opt.add_options()(
"obj-precision", po::value<int>()->default_value(6),
31 "Floating number output precission.")(
32 "obj-scalor", po::value<double>()->default_value(1.),
33 "Optional scaling from Acts units to ouput units.")(
35 po::value<read_series>()->multitoken()->default_value(
36 {0, 220, 220, 220, 0}),
37 "View configuration of container volumes (vis/novis, r, g, b, trimesh).")(
39 po::value<read_series>()->multitoken()->default_value(
41 "View configuration of navigation volumes (vis/novis, r, g, b, "
44 po::value<read_series>()->multitoken()->default_value(
45 {1, 100, 180, 240, 0}),
46 "View configuration of layer structures (vis/novis, r, g, b, trimesh).")(
48 po::value<read_series>()->multitoken()->default_value(
50 "View configuration of sensitive surfaces (vis/novis, r, g, b, "
51 "trimesh).")(
"obj-passive-view",
52 po::value<read_series>()->multitoken()->default_value(
54 "View configuration of sensitive surfaces (vis/novis, r, g, "
57 po::value<read_series>()->multitoken()->default_value({1, 220, 0, 0, 0}),
58 "View configuration of grid structures (vis/novis, r, g, b, trimesh).")(
59 "obj-grid-offset", po::value<double>()->default_value(0.),
60 "View offset of grid values.")(
"obj-grid-thickness",
61 po::value<double>()->default_value(0.5),
62 "Thickness of grid objects.");
66 template <
class amap_t>
69 const amap_t& vm,
const std::string&
name,
74 objTgConfig.
outputScalor = vm[
"obj-scalor"].template as<double>();
76 auto setView = [&](
const std::string& vname,
78 read_series cview = vm[vname].template as<read_series>();
79 if (not cview.empty()) {
81 viewCfg.visible =
false;
82 }
else if (cview.size() > 3) {
83 viewCfg.color = {cview[1], cview[2], cview[3]};
84 if (cview.size() > 4 and cview[4] != 0) {
85 viewCfg.triangulate =
true;
94 setView(
"obj-passive-view", objTgConfig.
passiveView);
95 setView(
"obj-grid-view", objTgConfig.
gridView);
96 objTgConfig.
gridView.
offset = vm[
"obj-grid-offset"].template as<double>();
98 vm[
"obj-grid-thickness"].template as<double>();