mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 04:37:52 -06:00
Enhanced behaviour of scale 3D gizmo
This commit is contained in:
parent
889d0f1434
commit
0924bedd28
3 changed files with 117 additions and 52 deletions
|
@ -89,6 +89,10 @@ class Linef3
|
|||
explicit Linef3(Pointf3 _a, Pointf3 _b): a(_a), b(_b) {};
|
||||
Pointf3 intersect_plane(double z) const;
|
||||
void scale(double factor);
|
||||
|
||||
double length() const { return this->a.distance_to(this->b); }
|
||||
Vectorf3 vector() const { return Vectorf3(this->b.x - this->a.x, this->b.y - this->a.y, this->b.z - this->a.z); }
|
||||
Vectorf3 unit_vector() const { return (length() == 0.0) ? Vectorf3(0.0, 0.0, 0.0) : normalize(vector()); }
|
||||
};
|
||||
|
||||
} // namespace Slic3r
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue