From 4ccac56d9465516f8567a051c471f3448ce7679b Mon Sep 17 00:00:00 2001 From: Thomas Fischer <thomas.fischer@ufz.de> Date: Sat, 26 Dec 2020 14:20:16 +0100 Subject: [PATCH] [T/GL] Rm Vector3 include. --- Tests/GeoLib/AutoCheckGenerators.cpp | 2 +- Tests/GeoLib/AutoCheckGenerators.h | 3 +-- Tests/GeoLib/TestBoundingSphere.cpp | 1 - Tests/GeoLib/TestLineSegmentIntersect2d.cpp | 4 ++-- Tests/GeoLib/TestSurfaceIsPointInSurface.cpp | 6 +++--- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Tests/GeoLib/AutoCheckGenerators.cpp b/Tests/GeoLib/AutoCheckGenerators.cpp index 91ee1d081b8..4505fc23ae8 100644 --- a/Tests/GeoLib/AutoCheckGenerators.cpp +++ b/Tests/GeoLib/AutoCheckGenerators.cpp @@ -19,7 +19,7 @@ MathLib::Point3d reflect(MathLib::Point3d const& c, MathLib::Point3d const& p) std::array<double, 3>{{2 * c[0] - p[0], 2 * c[1] - p[1], 0.0}}); } -GeoLib::LineSegment translate(MathLib::Vector3 const& translation, +GeoLib::LineSegment translate(Eigen::Vector3d const& translation, GeoLib::LineSegment const& line_seg) { auto a = std::make_unique<GeoLib::Point>(line_seg.getBeginPoint()); diff --git a/Tests/GeoLib/AutoCheckGenerators.h b/Tests/GeoLib/AutoCheckGenerators.h index cb2d06a615d..58ee27a414a 100644 --- a/Tests/GeoLib/AutoCheckGenerators.h +++ b/Tests/GeoLib/AutoCheckGenerators.h @@ -16,7 +16,6 @@ #include "autocheck/autocheck.hpp" #include "MathLib/Point3d.h" -#include "MathLib/Vector3.h" #include "GeoLib/LineSegment.h" namespace autocheck @@ -75,7 +74,7 @@ struct SymmSegmentGeneratorXY std::function<MathLib::Point3d(MathLib::Point3d const&)> function; }; -GeoLib::LineSegment translate(MathLib::Vector3 const& translation, +GeoLib::LineSegment translate(Eigen::Vector3d const& translation, GeoLib::LineSegment const& line_seg); template <typename Gen = SymmSegmentGeneratorXY< diff --git a/Tests/GeoLib/TestBoundingSphere.cpp b/Tests/GeoLib/TestBoundingSphere.cpp index 6b08b883868..6d76af5e1e8 100644 --- a/Tests/GeoLib/TestBoundingSphere.cpp +++ b/Tests/GeoLib/TestBoundingSphere.cpp @@ -18,7 +18,6 @@ #include "GeoLib/MinimalBoundingSphere.h" #include "MathLib/Point3d.h" -#include "MathLib/Vector3.h" TEST(GeoLib, TestBoundingSphere) { diff --git a/Tests/GeoLib/TestLineSegmentIntersect2d.cpp b/Tests/GeoLib/TestLineSegmentIntersect2d.cpp index ee055d60966..f3ef01b5ed1 100644 --- a/Tests/GeoLib/TestLineSegmentIntersect2d.cpp +++ b/Tests/GeoLib/TestLineSegmentIntersect2d.cpp @@ -38,12 +38,12 @@ public: SymmSegmentGenerator segment_generator2 = SymmSegmentGenerator{point_generator2, std::bind(ac::reflect, point_generator2.center, std::placeholders::_1)}; - MathLib::Vector3 const translation_vector1 = {2,2,0}; + Eigen::Vector3d const translation_vector1 = {2, 2, 0}; PairSegmentGenerator pair_segment_generator1 = PairSegmentGenerator{ segment_generator1, std::bind(ac::translate, translation_vector1, std::placeholders::_1)}; - MathLib::Vector3 const translation_vector2 = {0,0,0}; + Eigen::Vector3d const translation_vector2 = {0, 0, 0}; PairSegmentGenerator pair_segment_generator2 = PairSegmentGenerator{ segment_generator1, std::bind(ac::translate, translation_vector2, std::placeholders::_1)}; diff --git a/Tests/GeoLib/TestSurfaceIsPointInSurface.cpp b/Tests/GeoLib/TestSurfaceIsPointInSurface.cpp index 8e4cc2eae79..029d65c2ccc 100644 --- a/Tests/GeoLib/TestSurfaceIsPointInSurface.cpp +++ b/Tests/GeoLib/TestSurfaceIsPointInSurface.cpp @@ -129,10 +129,10 @@ TEST(GeoLib, SurfaceIsPointInSurface) std::vector<MeshLib::Node*> const& nodes(sfc_mesh->getNodes()); GeoLib::rotatePoints<MeshLib::Node>(rot_mat, nodes); - MathLib::Vector3 const normal(0,0,1.0); - MathLib::Vector3 const surface_normal(rot_mat * normal); + Eigen::Vector3d const normal({0, 0, 1.0}); + Eigen::Vector3d const surface_normal(rot_mat * normal); double const scaling(1e-6); - MathLib::Vector3 const displacement(scaling * surface_normal); + Eigen::Vector3d const displacement(scaling * surface_normal); GeoLib::GEOObjects geometries; MeshLib::convertMeshToGeo(*sfc_mesh, geometries); -- GitLab