File indexing completed on 2025-08-06 08:11:38
0001
0002
0003
0004
0005
0006
0007
0008
0009 #include <boost/test/tools/output_test_stream.hpp>
0010 #include <boost/test/unit_test.hpp>
0011
0012 #include "Acts/Visualization/ObjVisualization3D.hpp"
0013 #include "Acts/Visualization/PlyVisualization3D.hpp"
0014
0015 #include <iostream>
0016 #include <string>
0017 #include <vector>
0018
0019 #include "Visualization3DTester.hpp"
0020 #include "VolumeView3DBase.hpp"
0021
0022 namespace Acts {
0023 namespace Test {
0024
0025 BOOST_AUTO_TEST_SUITE(Visualization)
0026
0027
0028 BOOST_AUTO_TEST_CASE(VolumeView3DObj) {
0029 ObjVisualization3D obj;
0030
0031
0032 bool triangulate = false;
0033 auto objTest = VolumeView3DTest::run(obj, triangulate, "");
0034 auto objErrors = testObjString(objTest, triangulate);
0035 std::cout << "Volumes Obj Test : " << objTest.size()
0036 << " characters written with " << objErrors.size() << " errors."
0037 << std::endl;
0038 BOOST_CHECK(objErrors.empty());
0039 for (const auto& objerr : objErrors) {
0040 std::cout << objerr << std::endl;
0041 }
0042
0043
0044 triangulate = true;
0045 auto objTest3M = VolumeView3DTest::run(obj, triangulate, "_3M");
0046 auto objErrors3M = testObjString(objTest3M, triangulate);
0047 std::cout << "Volumes Obj Test 3M : " << objTest3M.size()
0048 << " characters written with " << objErrors3M.size() << " errors."
0049 << std::endl;
0050 BOOST_CHECK(objErrors3M.empty());
0051 for (const auto& objerr : objErrors3M) {
0052 std::cout << objerr << std::endl;
0053 }
0054 }
0055
0056
0057 BOOST_AUTO_TEST_CASE(VolumeView3DPly) {
0058 PlyVisualization3D ply;
0059
0060
0061 bool triangulate = false;
0062 auto plyTest = VolumeView3DTest::run(ply, triangulate, "");
0063 auto plyErrors = testPlyString(plyTest, triangulate);
0064 std::cout << "Volumes Ply Test : " << plyTest.size()
0065 << " characters written with " << plyErrors.size() << " errors."
0066 << std::endl;
0067 BOOST_CHECK(plyErrors.empty());
0068 for (const auto& plyerr : plyErrors) {
0069 std::cout << plyerr << std::endl;
0070 }
0071
0072
0073 triangulate = true;
0074 auto plyTest3M = VolumeView3DTest::run(ply, triangulate, "_3M");
0075 auto plyErrors3M = testPlyString(plyTest3M, triangulate);
0076 std::cout << "Volumes Ply Test 3M : " << plyTest3M.size()
0077 << " characters written with " << plyErrors3M.size() << " errors."
0078 << std::endl;
0079 BOOST_CHECK(plyErrors3M.empty());
0080 for (const auto& plyerr : plyErrors3M) {
0081 std::cout << plyerr << std::endl;
0082 }
0083 }
0084
0085 BOOST_AUTO_TEST_SUITE_END()
0086
0087 }
0088 }