mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 11:17:51 -06:00
Some inlining optimizations.
This commit is contained in:
parent
c443f49da3
commit
068f71847e
4 changed files with 3 additions and 14 deletions
|
@ -74,12 +74,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
|
||||||
{
|
{
|
||||||
|
|
|
@ -29,7 +29,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;
|
||||||
|
|
|
@ -78,12 +78,6 @@ Point::rotate(double angle, const Point ¢er)
|
||||||
this->y = (coord_t)round( (double)center.y + c * dy + s * dx );
|
this->y = (coord_t)round( (double)center.y + c * dy + s * dx );
|
||||||
}
|
}
|
||||||
|
|
||||||
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
|
||||||
{
|
{
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Point
|
||||||
void translate(const Vector &vector);
|
void translate(const Vector &vector);
|
||||||
void rotate(double angle);
|
void rotate(double angle);
|
||||||
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…
Add table
Add a link
Reference in a new issue