41 std::remove_if(points.begin(), points.end(),
43 return entity.coordinate().distanceTo(reference) > distance;
53 static void snapPointsCleanup(std::vector<EntityCoordinate> &points,
const geo::Coordinate &reference,
const unsigned int maxNumberOfSnapPoints,
const double minDistanceToSnap) {
59 if (points.size() > maxNumberOfSnapPoints) {
60 points.erase(points.begin() + maxNumberOfSnapPoints, points.end());
virtual geo::Coordinate nearestPointOnPath(const geo::Coordinate &coord) const =0
Find the nearest point on the path for this entity for the coordinate coord The path of a entity that...
DECLARE_SHORT_SHARED_PTR(Document)
static void snapPointsCleanup(std::vector< EntityCoordinate > &points, const geo::Coordinate &reference, const unsigned int maxNumberOfSnapPoints, const double minDistanceToSnap)
Class that represents a Coordinate associated with a distance to a test point and a identifier for th...
static void remove_ifDistanceGreaterThen(std::vector< EntityCoordinate > &points, const geo::Coordinate &reference, const double distance)
virtual std::vector< lc::EntityCoordinate > snapPoints(const geo::Coordinate &coord, const SimpleSnapConstrain &simpleSnapConstrain, double minDistanceToSnap, int maxNumberOfSnapPoints) const =0
Find a number of snap points the line has available This function returns a ordered list...