mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-18 16:05:54 +08:00
Some inlining optimizations.
This commit is contained in:
parent
d9a92bc4dc
commit
5d769bd9da
@ -61,12 +61,6 @@ MultiPoint::length() const
|
|||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
MultiPoint::is_valid() const
|
|
||||||
{
|
|
||||||
return this->points.size() >= 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
MultiPoint::find_point(const Point &point) const
|
MultiPoint::find_point(const Point &point) const
|
||||||
{
|
{
|
||||||
|
@ -28,7 +28,8 @@ class MultiPoint
|
|||||||
virtual Point last_point() const = 0;
|
virtual Point last_point() const = 0;
|
||||||
virtual Lines lines() const = 0;
|
virtual Lines lines() const = 0;
|
||||||
double length() const;
|
double length() const;
|
||||||
bool is_valid() const;
|
bool is_valid() const { return this->points.size() >= 2; }
|
||||||
|
|
||||||
int find_point(const Point &point) const;
|
int find_point(const Point &point) const;
|
||||||
bool has_boundary_point(const Point &point) const;
|
bool has_boundary_point(const Point &point) const;
|
||||||
BoundingBox bounding_box() const;
|
BoundingBox bounding_box() const;
|
||||||
|
@ -63,12 +63,6 @@ Point::rotate(double angle, const Point ¢er)
|
|||||||
this->y = (coord_t)round( (double)center.y + cos(angle) * (cur_y - (double)center.y) + sin(angle) * (cur_x - (double)center.x) );
|
this->y = (coord_t)round( (double)center.y + cos(angle) * (cur_y - (double)center.y) + sin(angle) * (cur_x - (double)center.x) );
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
Point::coincides_with(const Point &point) const
|
|
||||||
{
|
|
||||||
return this->x == point.x && this->y == point.y;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Point::coincides_with_epsilon(const Point &point) const
|
Point::coincides_with_epsilon(const Point &point) const
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@ class Point
|
|||||||
void translate(double x, double y);
|
void translate(double x, double y);
|
||||||
void translate(const Vector &vector);
|
void translate(const Vector &vector);
|
||||||
void rotate(double angle, const Point ¢er);
|
void rotate(double angle, const Point ¢er);
|
||||||
bool coincides_with(const Point &point) const;
|
bool coincides_with(const Point &point) const { return this->x == point.x && this->y == point.y; }
|
||||||
bool coincides_with_epsilon(const Point &point) const;
|
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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user