26 namespace VolumeView3DTest {
39 auto identity = Transform3::Identity();
40 std::stringstream cStream;
42 double halfPhiSector = M_PI / 4.;
49 auto box = std::make_shared<CuboidVolumeBounds>(4., 3., 6.);
50 auto cuboid = std::make_shared<AbstractVolume>(
identity,
box);
54 helper.
write(cStream);
61 std::make_shared<ConeVolumeBounds>(0., 0., 0.45, 5., 5., 0., M_PI);
62 auto cone = std::make_shared<AbstractVolume>(
identity, solidCone);
65 helper.
write(
"Volumes_ConeVolumeSolid");
66 helper.
write(cStream);
71 std::make_shared<ConeVolumeBounds>(0., 0., 0.45, 8., 5., 0., M_PI);
72 cone = std::make_shared<AbstractVolume>(
identity, cutOffCone);
75 helper.
write(
"Volumes_ConeVolumeSolidCutOff");
76 helper.
write(cStream);
80 auto cutOffHollowCone =
81 std::make_shared<ConeVolumeBounds>(0.35, 7., 0.45, 8., 5, 0., M_PI);
82 cone = std::make_shared<AbstractVolume>(
identity, cutOffHollowCone);
85 helper.
write(
"Volumes_ConeVolumeConeCone");
86 helper.
write(cStream);
90 auto cutOffHollowSectoralCone =
91 std::make_shared<ConeVolumeBounds>(0.35, 7., 0.45, 8., 5., 0., 0.456);
92 cone = std::make_shared<AbstractVolume>(
identity, cutOffHollowSectoralCone);
95 helper.
write(
"Volumes_ConeVolumeConeConeSectoral");
96 helper.
write(cStream);
100 auto cutOffHollowCylCone =
101 std::make_shared<ConeVolumeBounds>(1., 0.45, 8., 5., 0., M_PI);
102 cone = std::make_shared<AbstractVolume>(
identity, cutOffHollowCylCone);
105 helper.
write(
"Volumes_ConeVolumeConeCylinder");
106 helper.
write(cStream);
110 auto cutOffHollowConeCyl =
111 std::make_shared<ConeVolumeBounds>(12., 0.35, 7., 5., 0., M_PI);
112 cone = std::make_shared<AbstractVolume>(
identity, cutOffHollowConeCyl);
115 helper.
write(
"Volumes_ConeVolumeCylinderCone");
116 helper.
write(cStream);
121 double cylinderInnerR = 1.;
122 double cylinderOuterR = 5.;
123 double cylinderHalfZ = 10.;
126 std::make_shared<CylinderVolumeBounds>(0., cylinderOuterR, cylinderHalfZ);
127 auto cylinder = std::make_shared<AbstractVolume>(
identity, fullCylinder);
130 helper.
write(
"Volumes_CylinderVolumeFull");
131 helper.
write(cStream);
134 auto tubeCylinder = std::make_shared<CylinderVolumeBounds>(
135 cylinderInnerR, cylinderOuterR, cylinderHalfZ);
136 cylinder = std::make_shared<AbstractVolume>(
identity, tubeCylinder);
139 helper.
write(
"Volumes_CylinderVolumeTube");
140 helper.
write(cStream);
143 tubeCylinder = std::make_shared<CylinderVolumeBounds>(
144 cylinderInnerR, cylinderOuterR, cylinderHalfZ, halfPhiSector);
145 cylinder = std::make_shared<AbstractVolume>(
identity, tubeCylinder);
148 helper.
write(
"Volumes_CylinderVolumeTubeSector");
149 helper.
write(cStream);
155 vertices = {{{0, 0, 0},
163 auto genericCuboid = std::make_shared<GenericCuboidVolumeBounds>(
vertices);
164 auto generic = std::make_shared<AbstractVolume>(
identity, genericCuboid);
167 helper.
write(
"Volumes_GenericCuboidVolume");
168 helper.
write(cStream);
173 auto trapezoid = std::make_shared<TrapezoidVolumeBounds>(2., 4., 5., 6.);
174 auto trapezoidVolume = std::make_shared<AbstractVolume>(
identity, trapezoid);
176 Transform3::Identity(), vConfig);
177 helper.
write(
"Volumes_TrapezoidVolume");
178 helper.
write(cStream);
181 return cStream.str();