Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2016-04-10 20:06:46 +0300
committerbubnikv <bubnikv@gmail.com>2016-04-10 20:06:46 +0300
commit7d54e28e30a4dddc4ab0b5befc4c46d2fe05794b (patch)
treeda10817ffc8c9a1b6475e8a333e3c4436902b160 /xs/src/libslic3r/Point.hpp
parentc8ff517389264444bd0fa6a1b5dd9db132cf40cd (diff)
Added optimized methods for point and polyline rotation.
Existing methods for rotation were optimized by calculating the sin/cos values once only. Added an operator- for points.
Diffstat (limited to 'xs/src/libslic3r/Point.hpp')
-rw-r--r--xs/src/libslic3r/Point.hpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/xs/src/libslic3r/Point.hpp b/xs/src/libslic3r/Point.hpp
index dbd1219b9..14c5cf70f 100644
--- a/xs/src/libslic3r/Point.hpp
+++ b/xs/src/libslic3r/Point.hpp
@@ -41,6 +41,7 @@ class Point
void scale(double factor);
void translate(double x, double y);
void translate(const Vector &vector);
+ void rotate(double angle);
void rotate(double angle, const Point &center);
bool coincides_with(const Point &point) const;
bool coincides_with_epsilon(const Point &point) const;
@@ -63,6 +64,7 @@ class Point
};
Point operator+(const Point& point1, const Point& point2);
+Point operator-(const Point& point1, const Point& point2);
Point operator*(double scalar, const Point& point2);
class Point3 : public Point
@@ -90,6 +92,7 @@ class Pointf
void scale(double factor);
void translate(double x, double y);
void translate(const Vectorf &vector);
+ void rotate(double angle);
void rotate(double angle, const Pointf &center);
Pointf negative() const;
Vectorf vector_to(const Pointf &point) const;