Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'xs/src/libslic3r/BoundingBox.hpp')
-rw-r--r--xs/src/libslic3r/BoundingBox.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/xs/src/libslic3r/BoundingBox.hpp b/xs/src/libslic3r/BoundingBox.hpp
index 136ba1f8c..b4f101976 100644
--- a/xs/src/libslic3r/BoundingBox.hpp
+++ b/xs/src/libslic3r/BoundingBox.hpp
@@ -28,6 +28,7 @@ class BoundingBoxBase
void merge(const BoundingBoxBase<PointClass> &bb);
void scale(double factor);
PointClass size() const;
+ double radius() const;
void translate(coordf_t x, coordf_t y);
void offset(coordf_t delta);
PointClass center() const;
@@ -44,6 +45,7 @@ class BoundingBox3Base : public BoundingBoxBase<PointClass>
void merge(const std::vector<PointClass> &points);
void merge(const BoundingBox3Base<PointClass> &bb);
PointClass size() const;
+ double radius() const;
void translate(coordf_t x, coordf_t y, coordf_t z);
void offset(coordf_t delta);
PointClass center() const;
@@ -54,6 +56,10 @@ class BoundingBox : public BoundingBoxBase<Point>
public:
void polygon(Polygon* polygon) const;
Polygon polygon() const;
+ BoundingBox rotated(double angle) const;
+ BoundingBox rotated(double angle, const Point &center) const;
+ void rotate(double angle) { (*this) = this->rotated(angle); }
+ void rotate(double angle, const Point &center) { (*this) = this->rotated(angle, center); }
BoundingBox() : BoundingBoxBase<Point>() {};
BoundingBox(const Point &pmin, const Point &pmax) : BoundingBoxBase<Point>(pmin, pmax) {};
@@ -100,7 +106,9 @@ inline bool empty(const BoundingBoxBase<VT> &bb)
template<typename VT>
inline bool empty(const BoundingBox3Base<VT> &bb)
{
- return bb.min.x > bb.max.x || bb.min.y > bb.max.y || bb.min.z > bb.max.z;}
+ return bb.min.x > bb.max.x || bb.min.y > bb.max.y || bb.min.z > bb.max.z;
}
+} // namespace Slic3r
+
#endif