mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
New get_extents(const std::vector<Points> &pts),
refactored Lian Barsky line clipping
This commit is contained in:
parent
32362cff0b
commit
84693a5810
5 changed files with 29 additions and 19 deletions
|
@ -13,6 +13,7 @@
|
|||
|
||||
namespace Slic3r {
|
||||
|
||||
class BoundingBox;
|
||||
class Line;
|
||||
class MultiPoint;
|
||||
class Point;
|
||||
|
@ -178,6 +179,9 @@ inline Point lerp(const Point &a, const Point &b, double t)
|
|||
return ((1. - t) * a.cast<double>() + t * b.cast<double>()).cast<coord_t>();
|
||||
}
|
||||
|
||||
extern BoundingBox get_extents(const Points &pts);
|
||||
extern BoundingBox get_extents(const std::vector<Points> &pts);
|
||||
|
||||
namespace int128 {
|
||||
// Exact orientation predicate,
|
||||
// returns +1: CCW, 0: collinear, -1: CW.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue