mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-05 20:36:07 +08:00
Some inlining optimizations.
This commit is contained in:
parent
d9a92bc4dc
commit
5d769bd9da
@ -61,12 +61,6 @@ MultiPoint::length() const
|
||||
return len;
|
||||
}
|
||||
|
||||
bool
|
||||
MultiPoint::is_valid() const
|
||||
{
|
||||
return this->points.size() >= 2;
|
||||
}
|
||||
|
||||
int
|
||||
MultiPoint::find_point(const Point &point) const
|
||||
{
|
||||
|
@ -28,7 +28,8 @@ class MultiPoint
|
||||
virtual Point last_point() const = 0;
|
||||
virtual Lines lines() const = 0;
|
||||
double length() const;
|
||||
bool is_valid() const;
|
||||
bool is_valid() const { return this->points.size() >= 2; }
|
||||
|
||||
int find_point(const Point &point) const;
|
||||
bool has_boundary_point(const Point &point) 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) );
|
||||
}
|
||||
|
||||
bool
|
||||
Point::coincides_with(const Point &point) const
|
||||
{
|
||||
return this->x == point.x && this->y == point.y;
|
||||
}
|
||||
|
||||
bool
|
||||
Point::coincides_with_epsilon(const Point &point) const
|
||||
{
|
||||
|
@ -43,7 +43,7 @@ class Point
|
||||
void translate(double x, double y);
|
||||
void translate(const Vector &vector);
|
||||
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;
|
||||
int nearest_point_index(const Points &points) const;
|
||||
int nearest_point_index(const PointConstPtrs &points) const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user