mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Removed Point::scale(),translate(),coincides_with(),distance_to(),
distance_to_squared(),perp_distance_to(),negative(),vector_to(), translate(), distance_to() etc, replaced with the Eigen equivalents.
This commit is contained in:
parent
3b89717149
commit
1ba64da3fe
45 changed files with 526 additions and 792 deletions
|
@ -18,10 +18,11 @@ public:
|
|||
Points points;
|
||||
|
||||
operator Points() const;
|
||||
MultiPoint() {};
|
||||
MultiPoint() {}
|
||||
MultiPoint(const MultiPoint &other) : points(other.points) {}
|
||||
MultiPoint(MultiPoint &&other) : points(std::move(other.points)) {}
|
||||
explicit MultiPoint(const Points &_points): points(_points) {}
|
||||
MultiPoint(std::initializer_list<Point> list) : points(list) {}
|
||||
explicit MultiPoint(const Points &_points) : points(_points) {}
|
||||
MultiPoint& operator=(const MultiPoint &other) { points = other.points; return *this; }
|
||||
MultiPoint& operator=(MultiPoint &&other) { points = std::move(other.points); return *this; }
|
||||
void scale(double factor);
|
||||
|
@ -43,9 +44,9 @@ public:
|
|||
int idx = -1;
|
||||
if (! this->points.empty()) {
|
||||
idx = 0;
|
||||
double dist_min = this->points.front().distance_to(point);
|
||||
double dist_min = (point - this->points.front()).cast<double>().norm();
|
||||
for (int i = 1; i < int(this->points.size()); ++ i) {
|
||||
double d = this->points[i].distance_to(point);
|
||||
double d = (this->points[i] - point).cast<double>().norm();
|
||||
if (d < dist_min) {
|
||||
dist_min = d;
|
||||
idx = i;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue