#include <src/libslic3r/BoundingBox.hpp>
◆ PointsType
◆ BoundingBoxf() [1/3]
| Slic3r::BoundingBoxf::BoundingBoxf |
( |
| ) |
|
|
inline |
215: BoundingBoxBase<Vec2d>() {}
◆ BoundingBoxf() [2/3]
216: BoundingBoxBase<Vec2d>(pmin, pmax) {}
◆ BoundingBoxf() [3/3]
| Slic3r::BoundingBoxf::BoundingBoxf |
( |
const std::vector< Vec2d > & |
points | ) |
|
|
inline |
217: BoundingBoxBase<Vec2d>(points) {}
◆ center()
195{
196 return (this->min + this->max) / 2;
197}
◆ construct()
|
|
inlinestaticprivateinherited |
70 {
71 if (from != to) {
72 auto it = from;
73 out.min = it->template cast<typename PointType::Scalar>();
74 out.max = out.min;
75 for (++ it; it != to; ++ it) {
76 auto vec = it->template cast<typename PointType::Scalar>();
77 out.min = out.min.cwiseMin(vec);
78 out.max = out.max.cwiseMax(vec);
79 }
80 out.defined = IncludeBoundary || (out.min.x() < out.max.x() && out.min.y() < out.max.y());
81 }
82 }
◆ contains() [1/2]
50 {
52 }
static int contains(const char c, const char *matrix, size_t len)
Definition semver.c:65
◆ contains() [2/2]
46 {
47 return point.x() >= this->
min.x() && point.x() <= this->
max.x()
48 && point.y() >= this->
min.y() && point.y() <= this->
max.y();
49 }
Vec2d max
Definition BoundingBox.hpp:17
Vec2d min
Definition BoundingBox.hpp:16
◆ inflated()
44{ BoundingBoxBase<PointType, PointsType> out(*this); out.offset(delta); return out; }
◆ merge() [1/3]
87{
88 assert(bb.defined || bb.min.x() >= bb.max.x() || bb.min.y() >= bb.max.y());
89 if (bb.defined) {
90 if (this->defined) {
91 this->
min = this->
min.cwiseMin(bb.min);
92 this->
max = this->
max.cwiseMax(bb.max);
93 } else {
97 }
98 }
99}
bool defined
Definition BoundingBox.hpp:18
◆ merge() [2/3]
79{
81}
void merge(const Vec2d &point)
Definition BoundingBox.cpp:62
BoundingBoxBase()
Definition BoundingBox.hpp:20
◆ merge() [3/3]
63{
64 if (this->defined) {
65 this->
min = this->
min.cwiseMin(point);
66 this->
max = this->
max.cwiseMax(point);
67 } else {
71 }
72}
◆ offset()
176{
180}
PointType
Definition exact_geodesic.cpp:327
◆ operator!=()
58{ return ! (*this == rhs); }
◆ operator==()
57{
return this->
min == rhs.min && this->
max == rhs.max; }
◆ overlap()
53 {
54 return ! (this->
max.x() < other.min.x() || this->
min.x() > other.max.x() ||
55 this->
max.y() < other.min.y() || this->
min.y() > other.max.y());
56 }
◆ radius()
161{
162 assert(this->defined);
163 return 0.5 * (this->
max - this->
min).
template cast<double>().norm();
164}
◆ reset()
34{ this->
defined =
false; this->
min = PointType::Zero(); this->
max = PointType::Zero(); }
◆ scale()
◆ size()
145{
146 return this->
max - this->
min;
147}
◆ translate() [1/2]
42{ this->
min += v; this->
max += v; }
◆ translate() [2/2]
41{ assert(this->defined);
PointType v(x, y); this->
min += v; this->
max += v; }
◆ defined
◆ max
◆ min
The documentation for this class was generated from the following file: