diff --git a/GeoLib/Polyline.cpp b/GeoLib/Polyline.cpp index 808f3159bf5dcb4d6edaa789f5ff1110722f46ae..ebaa167dee847ee6bc340d7a1c15dc2dd70c80ca 100644 --- a/GeoLib/Polyline.cpp +++ b/GeoLib/Polyline.cpp @@ -377,7 +377,8 @@ void Polyline::updatePointIDs(const std::vector<std::size_t> &pnt_ids) } } -double Polyline::getDistanceAlongPolyline(const GeoLib::Point& pnt, const double epsilon_radius) const +double Polyline::getDistanceAlongPolyline(const MathLib::MathPoint& pnt, + const double epsilon_radius) const { double dist, lambda; bool found = false; diff --git a/GeoLib/Polyline.h b/GeoLib/Polyline.h index 0107fede8f6679360cec60c79d88549b12249663..7242e8ff0e7f1e688cddbef8e67d06ca3d4636ed 100644 --- a/GeoLib/Polyline.h +++ b/GeoLib/Polyline.h @@ -22,6 +22,9 @@ #include "GeoObject.h" #include "Point.h" +// MathLib +#include "MathLib/MathPoint.h" + namespace GeoLib { enum class Location @@ -151,7 +154,8 @@ public: * @return the distance along the polyline between the given point and the beginning of the polyline. * If the given point is not on the polyine, negative value is returned. */ - double getDistanceAlongPolyline(const GeoLib::Point& pnt, const double epsilon_radius) const; + double getDistanceAlongPolyline(const MathLib::MathPoint& pnt, + const double epsilon_radius) const; friend bool operator==(Polyline const& lhs, Polyline const& rhs); protected: diff --git a/NumLib/Function/ISpatialFunction.h b/NumLib/Function/ISpatialFunction.h index 9762259996101e1b0b47c2b4c5fe5259fa4de9c2..16b9a79301d1509e3c0c0bcf971384b5b7939d54 100644 --- a/NumLib/Function/ISpatialFunction.h +++ b/NumLib/Function/ISpatialFunction.h @@ -16,7 +16,7 @@ #include <vector> -#include "GeoLib/Point.h" +#include "MathLib/MathPoint.h" namespace NumLib { @@ -34,7 +34,7 @@ public: * \param pnt a point object * \return evaluated value */ - virtual double operator()(const GeoLib::Point& pnt) const = 0; + virtual double operator()(const MathLib::MathPoint& pnt) const = 0; }; } // NumLib diff --git a/NumLib/Function/LinearInterpolationAlongPolyline.cpp b/NumLib/Function/LinearInterpolationAlongPolyline.cpp index fa24d532c91e40b5f60a850465a340061241d6a8..f3f442b81f8500e69492e07490c2134f49618611 100644 --- a/NumLib/Function/LinearInterpolationAlongPolyline.cpp +++ b/NumLib/Function/LinearInterpolationAlongPolyline.cpp @@ -57,7 +57,7 @@ MathLib::PiecewiseLinearInterpolation LinearInterpolationAlongPolyline::createIn return MathLib::PiecewiseLinearInterpolation(vec_known_dist, vec_known_values); } -double LinearInterpolationAlongPolyline::operator()(const GeoLib::Point& pnt) const +double LinearInterpolationAlongPolyline::operator()(const MathLib::MathPoint& pnt) const { const double dist = _ply.getDistanceAlongPolyline(pnt, _search_length); return dist>=0 ? _interpolation.getValue(dist) : _default_value; diff --git a/NumLib/Function/LinearInterpolationAlongPolyline.h b/NumLib/Function/LinearInterpolationAlongPolyline.h index 62f3a324afccc77d7bbdebe470e882785d0de96c..acaa268b2bdfa25f72071a0ac0b67752d59998d4 100644 --- a/NumLib/Function/LinearInterpolationAlongPolyline.h +++ b/NumLib/Function/LinearInterpolationAlongPolyline.h @@ -62,7 +62,7 @@ public: * @return interpolated value. A default value is returned if the given point * is not located on a polyline */ - double operator()(const GeoLib::Point& pnt) const; + double operator()(const MathLib::MathPoint& pnt) const; private: /// construct an interpolation algorithm diff --git a/NumLib/Function/LinearInterpolationOnSurface.cpp b/NumLib/Function/LinearInterpolationOnSurface.cpp index 0a9a98b043018fc5ffa96383946aa2339bbb3a98..760ea20d0a7c4f5d6724239224661fdcfbcdf76b 100644 --- a/NumLib/Function/LinearInterpolationOnSurface.cpp +++ b/NumLib/Function/LinearInterpolationOnSurface.cpp @@ -39,7 +39,7 @@ LinearInterpolationOnSurface::LinearInterpolationOnSurface( assert(vec_interpolate_point_ids.size()==vec_interpolate_point_values.size()); } -double LinearInterpolationOnSurface::operator()(const GeoLib::Point& pnt) const +double LinearInterpolationOnSurface::operator()(const MathLib::MathPoint& pnt) const { const double* coords = pnt.getCoords(); if (!_sfc.isPntInBoundingVolume(coords)) diff --git a/NumLib/Function/LinearInterpolationOnSurface.h b/NumLib/Function/LinearInterpolationOnSurface.h index edd19a3a9facde5413641eaa9e79e31aa8d47773..9e98ec043a81a380a6fdb09e816a99e8f90e97a4 100644 --- a/NumLib/Function/LinearInterpolationOnSurface.h +++ b/NumLib/Function/LinearInterpolationOnSurface.h @@ -61,7 +61,7 @@ public: * @return interpolated value. A default value is returned if the given point * is not located on a surface */ - double operator()(const GeoLib::Point& pnt) const; + double operator()(const MathLib::MathPoint& pnt) const; private: /// rotate a triangle to XY plane diff --git a/NumLib/Function/TemplateSpatialFunction.h b/NumLib/Function/TemplateSpatialFunction.h index a75e48d157197deb88ad893216a08bcf72658206..d7c3f0ccda0ef8446201a5e6666f13c842e70c3c 100644 --- a/NumLib/Function/TemplateSpatialFunction.h +++ b/NumLib/Function/TemplateSpatialFunction.h @@ -39,7 +39,7 @@ public: * @param pnt a point object * @return evaluated value */ - virtual double operator()(const GeoLib::Point& pnt) const + virtual double operator()(const MathLib::MathPoint& pnt) const { return _f(pnt.getCoords()); }