mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-06-01 09:32:50 +00:00
Visual preview for bed shape dialog
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user