mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-22 16:21:24 -06:00
Visual preview for bed shape dialog
This commit is contained in:
parent
3ff613d166
commit
f462af20f9
7 changed files with 164 additions and 14 deletions
|
@ -268,6 +268,15 @@ Pointf::translate(double x, double y)
|
|||
this->y += y;
|
||||
}
|
||||
|
||||
void
|
||||
Pointf::rotate(double angle, const Pointf ¢er)
|
||||
{
|
||||
double cur_x = this->x;
|
||||
double cur_y = this->y;
|
||||
this->x = center.x + cos(angle) * (cur_x - center.x) - sin(angle) * (cur_y - center.y);
|
||||
this->y = center.y + cos(angle) * (cur_y - center.y) + sin(angle) * (cur_x - center.x);
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
|
||||
REGISTER_CLASS(Pointf, "Pointf");
|
||||
|
|
|
@ -71,6 +71,7 @@ class Pointf
|
|||
explicit Pointf(coordf_t _x = 0, coordf_t _y = 0): x(_x), y(_y) {};
|
||||
void scale(double factor);
|
||||
void translate(double x, double y);
|
||||
void rotate(double angle, const Pointf ¢er);
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
bool from_SV(SV* point_sv);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue