Replaced coincides_with(const Line &line) with operator==

This commit is contained in:
bubnikv 2018-08-17 18:27:07 +02:00
parent 9e7634b6e8
commit ab60d8adb4
6 changed files with 5 additions and 4 deletions

View file

@ -28,7 +28,7 @@ public:
double length() const { return (b - a).cast<double>().norm(); }
Point midpoint() const { return (this->a + this->b) / 2; }
bool intersection_infinite(const Line &other, Point* point) const;
bool coincides_with(const Line &line) const { return this->a == line.a && this->b == line.b; }
bool operator==(const Line &rhs) const { return this->a == rhs.a && this->b == rhs.b; }
double distance_to(const Point &point) const;
double perp_distance_to(const Point &point) const;
bool parallel_to(double angle) const;

View file

@ -269,7 +269,6 @@ public:
typedef coordf_t coord_type;
explicit Pointf3() { (*this)(0) = (*this)(1) = (*this)(2) = 0.; }
// explicit Pointf3(coord_t x, coord_t y, coord_t z) { (*this)(0) = x; (*this)(1) = y; (*this)(2) = z; }
explicit Pointf3(coordf_t x, coordf_t y, coordf_t z) { (*this)(0) = x; (*this)(1) = y; (*this)(2) = z; }
// This constructor allows you to construct Pointf from Eigen expressions
template<typename OtherDerived>