mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Return MultiPoint::first_point() by reference.
This commit is contained in:
parent
6d11bfe96a
commit
0abde9a2a8
2 changed files with 12 additions and 32 deletions
|
@ -17,7 +17,8 @@ class MultiPoint
|
|||
public:
|
||||
Points points;
|
||||
|
||||
operator Points() const;
|
||||
operator Points() const { return this->points; }
|
||||
|
||||
MultiPoint() {}
|
||||
MultiPoint(const MultiPoint &other) : points(other.points) {}
|
||||
MultiPoint(MultiPoint &&other) : points(std::move(other.points)) {}
|
||||
|
@ -32,8 +33,9 @@ public:
|
|||
void rotate(double angle) { this->rotate(cos(angle), sin(angle)); }
|
||||
void rotate(double cos_angle, double sin_angle);
|
||||
void rotate(double angle, const Point ¢er);
|
||||
void reverse();
|
||||
Point first_point() const;
|
||||
void reverse() { std::reverse(this->points.begin(), this->points.end()); }
|
||||
|
||||
const Point& first_point() const { return this->points.front(); }
|
||||
virtual const Point& last_point() const = 0;
|
||||
virtual Lines lines() const = 0;
|
||||
size_t size() const { return points.size(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue