Skip to content
Snippets Groups Projects
Commit 8fa5cc91 authored by Tom Fischer's avatar Tom Fischer
Browse files

[GL/NL] Using MathLib::MathPoint instead of GeoLib::Point.

parent 6207b7bf
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
......@@ -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:
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -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))
......
......@@ -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
......
......@@ -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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment