diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-04-12 12:06:09 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-04-12 12:06:09 +0300 |
commit | 978c3a6c8984bdf7d852bd071718e70ee11e0063 (patch) | |
tree | 5e62926a8c962c7b6d5ccb1c1a1c2c525bafe4a9 /src/libslic3r/BoundingBox.cpp | |
parent | 580d739d6f377fcf76456051e1816aae2fb35bad (diff) | |
parent | fcabe8a0f47807bb7efff3fdcecf35c49d02556b (diff) |
Merge tag 'version_2.3.0' into stable
version_2.3.0
Diffstat (limited to 'src/libslic3r/BoundingBox.cpp')
-rw-r--r-- | src/libslic3r/BoundingBox.cpp | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/src/libslic3r/BoundingBox.cpp b/src/libslic3r/BoundingBox.cpp index d3cca7ff2..eb4e042a0 100644 --- a/src/libslic3r/BoundingBox.cpp +++ b/src/libslic3r/BoundingBox.cpp @@ -11,17 +11,6 @@ template BoundingBoxBase<Vec2d>::BoundingBoxBase(const std::vector<Vec2d> &point template BoundingBox3Base<Vec3d>::BoundingBox3Base(const std::vector<Vec3d> &points); -BoundingBox::BoundingBox(const Lines &lines) -{ - Points points; - points.reserve(lines.size()); - for (const Line &line : lines) { - points.emplace_back(line.a); - points.emplace_back(line.b); - } - *this = BoundingBox(points); -} - void BoundingBox::polygon(Polygon* polygon) const { polygon->points.clear(); @@ -86,6 +75,7 @@ BoundingBoxBase<PointClass>::merge(const PointClass &point) } } template void BoundingBoxBase<Point>::merge(const Point &point); +template void BoundingBoxBase<Vec2f>::merge(const Vec2f &point); template void BoundingBoxBase<Vec2d>::merge(const Vec2d &point); template <class PointClass> void @@ -112,6 +102,7 @@ BoundingBoxBase<PointClass>::merge(const BoundingBoxBase<PointClass> &bb) } } template void BoundingBoxBase<Point>::merge(const BoundingBoxBase<Point> &bb); +template void BoundingBoxBase<Vec2f>::merge(const BoundingBoxBase<Vec2f> &bb); template void BoundingBoxBase<Vec2d>::merge(const BoundingBoxBase<Vec2d> &bb); template <class PointClass> void @@ -126,6 +117,7 @@ BoundingBox3Base<PointClass>::merge(const PointClass &point) this->defined = true; } } +template void BoundingBox3Base<Vec3f>::merge(const Vec3f &point); template void BoundingBox3Base<Vec3d>::merge(const Vec3d &point); template <class PointClass> void @@ -158,6 +150,7 @@ BoundingBoxBase<PointClass>::size() const return PointClass(this->max(0) - this->min(0), this->max(1) - this->min(1)); } template Point BoundingBoxBase<Point>::size() const; +template Vec2f BoundingBoxBase<Vec2f>::size() const; template Vec2d BoundingBoxBase<Vec2d>::size() const; template <class PointClass> PointClass @@ -165,6 +158,7 @@ BoundingBox3Base<PointClass>::size() const { return PointClass(this->max(0) - this->min(0), this->max(1) - this->min(1), this->max(2) - this->min(2)); } +template Vec3f BoundingBox3Base<Vec3f>::size() const; template Vec3d BoundingBox3Base<Vec3d>::size() const; template <class PointClass> double BoundingBoxBase<PointClass>::radius() const @@ -211,6 +205,7 @@ BoundingBoxBase<PointClass>::center() const return (this->min + this->max) / 2; } template Point BoundingBoxBase<Point>::center() const; +template Vec2f BoundingBoxBase<Vec2f>::center() const; template Vec2d BoundingBoxBase<Vec2d>::center() const; template <class PointClass> PointClass @@ -218,6 +213,7 @@ BoundingBox3Base<PointClass>::center() const { return (this->min + this->max) / 2; } +template Vec3f BoundingBox3Base<Vec3f>::center() const; template Vec3d BoundingBox3Base<Vec3d>::center() const; template <class PointClass> coordf_t @@ -226,6 +222,7 @@ BoundingBox3Base<PointClass>::max_size() const PointClass s = size(); return std::max(s(0), std::max(s(1), s(2))); } +template coordf_t BoundingBox3Base<Vec3f>::max_size() const; template coordf_t BoundingBox3Base<Vec3d>::max_size() const; // Align a coordinate to a grid. The coordinate may be negative, |