mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-25 07:34:03 -06:00
Ported toolpaths rendering to C++
This commit is contained in:
parent
bfbcbd55d8
commit
2bbb6c570b
6 changed files with 312 additions and 197 deletions
|
@ -9,6 +9,7 @@
|
|||
namespace Slic3r {
|
||||
|
||||
class Line;
|
||||
class Linef;
|
||||
class MultiPoint;
|
||||
class Point;
|
||||
class Pointf;
|
||||
|
@ -82,6 +83,12 @@ class Pointf
|
|||
coordf_t x;
|
||||
coordf_t y;
|
||||
explicit Pointf(coordf_t _x = 0, coordf_t _y = 0): x(_x), y(_y) {};
|
||||
static Pointf new_unscale(coord_t x, coord_t y) {
|
||||
return Pointf(unscale(x), unscale(y));
|
||||
};
|
||||
static Pointf new_unscale(const Point &p) {
|
||||
return Pointf(unscale(p.x), unscale(p.y));
|
||||
};
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void rotate(double angle, const Pointf ¢er);
|
||||
|
@ -100,6 +107,9 @@ class Pointf3 : public Pointf
|
|||
public:
|
||||
coordf_t z;
|
||||
explicit Pointf3(coordf_t _x = 0, coordf_t _y = 0, coordf_t _z = 0): Pointf(_x, _y), z(_z) {};
|
||||
static Pointf3 new_unscale(coord_t x, coord_t y, coord_t z) {
|
||||
return Pointf3(unscale(x), unscale(y), unscale(z));
|
||||
};
|
||||
void scale(double factor);
|
||||
void translate(const Vectorf3 &vector);
|
||||
void translate(double x, double y, double z);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue