Просмотр исходного кода

Removed the Point::coincides_with_epsilon() method

bubnikv 6 лет назад
Родитель
Сommit
c5256bdd2c
3 измененных файлов с 0 добавлено и 8 удалено
  1. 0 5
      xs/src/libslic3r/Point.cpp
  2. 0 1
      xs/src/libslic3r/Point.hpp
  3. 0 2
      xs/xsp/Point.xsp

+ 0 - 5
xs/src/libslic3r/Point.cpp

@@ -28,11 +28,6 @@ void Point::rotate(double angle, const Point &center)
     (*this)(1) = (coord_t)round( (double)center(1) + c * dy + s * dx );
     (*this)(1) = (coord_t)round( (double)center(1) + c * dy + s * dx );
 }
 }
 
 
-bool Point::coincides_with_epsilon(const Point &point) const
-{
-    return std::abs((*this)(0) - point(0)) < SCALED_EPSILON && std::abs((*this)(1) - point(1)) < SCALED_EPSILON;
-}
-
 int Point::nearest_point_index(const Points &points) const
 int Point::nearest_point_index(const Points &points) const
 {
 {
     PointConstPtrs p;
     PointConstPtrs p;

+ 0 - 1
xs/src/libslic3r/Point.hpp

@@ -91,7 +91,6 @@ public:
     void   rotate(double angle, const Point &center);
     void   rotate(double angle, const Point &center);
     Point  rotated(double angle) const { Point res(*this); res.rotate(angle); return res; }
     Point  rotated(double angle) const { Point res(*this); res.rotate(angle); return res; }
     Point  rotated(double angle, const Point &center) const { Point res(*this); res.rotate(angle, center); return res; }
     Point  rotated(double angle, const Point &center) const { Point res(*this); res.rotate(angle, center); return res; }
-    bool   coincides_with_epsilon(const Point &point) const;
     int    nearest_point_index(const Points &points) const;
     int    nearest_point_index(const Points &points) const;
     int    nearest_point_index(const PointConstPtrs &points) const;
     int    nearest_point_index(const PointConstPtrs &points) const;
     int    nearest_point_index(const PointPtrs &points) const;
     int    nearest_point_index(const PointPtrs &points) const;

+ 0 - 2
xs/xsp/Point.xsp

@@ -50,8 +50,6 @@
         %code{% RETVAL = new Point(THIS->projection_onto(*line)); %};
         %code{% RETVAL = new Point(THIS->projection_onto(*line)); %};
     Point* negative()
     Point* negative()
         %code{% RETVAL = new Point(- *THIS); %};
         %code{% RETVAL = new Point(- *THIS); %};
-    bool coincides_with_epsilon(Point* point)
-        %code{% RETVAL = (*THIS) == *point; %};
     std::string serialize() %code{% char buf[2048]; sprintf(buf, "%ld,%ld", (*THIS)(0), (*THIS)(1)); RETVAL = buf; %};
     std::string serialize() %code{% char buf[2048]; sprintf(buf, "%ld,%ld", (*THIS)(0), (*THIS)(1)); RETVAL = buf; %};
 
 
 %{
 %{