43 for (
unsigned i = 0; i < a.size(); ++i)
45 bl[i] = std::min(a[i], b[i]);
46 tr[i] = std::max(a[i], b[i]);
49 elems[0] =
static_cast<int> (bl[0]);
50 elems[1] =
static_cast<int> (tr[0]);
51 elems[2] =
static_cast<int> (bl[1]);
52 elems[3] =
static_cast<int> (tr[1]);
53 elems[4] =
static_cast<int> (bl[2]);
54 elems[5] =
static_cast<int> (tr[2]);
59 Eigen::Vector3i bl, tr;
60 for (
unsigned i = 0; i < a.size(); ++i)
62 bl[i] = std::min(a[i], b[i]);
63 tr[i] = std::max(a[i], b[i]);
66 elems[0] =
static_cast<int> (bl[0]);
67 elems[1] =
static_cast<int> (tr[0]);
68 elems[2] =
static_cast<int> (bl[1]);
69 elems[3] =
static_cast<int> (tr[1]);
70 elems[4] =
static_cast<int> (bl[2]);
71 elems[5] =
static_cast<int> (tr[2]);
76 for (
unsigned i = 0; i < size(); ++i)
77 elems[i] =
static_cast<int> (data[i]);
82 std::copy(data, data + size(), elems);
87 return Eigen::Vector3i(elems[0], elems[2], elems[4]);
91 return Eigen::Vector3i(elems[1], elems[3], elems[5]);
108 c[0] = x ? elems[1] : elems[0];
109 c[1] = y ? elems[3] : elems[2];
110 c[2] = z ? elems[5] : elems[4];
120 for (
unsigned i = 0; i < 3; ++i)
121 inside &= ((elems[2 * i] <= p[i]) && (p[i] <= elems[2 * i + 1]));
150 for (
unsigned i = 0; i < a.size(); ++i)
152 bl[i] = std::min(a[i], b[i]);
153 tr[i] = std::max(a[i], b[i]);
165 std::copy(data, data + size(), elems);
169 std::copy(data, data + size(), elems);
173 for (
unsigned i = 0; i < size(); ++i)
175 elems[i] = bb.elems[i];
190 return Vector3D(elems[0], elems[2], elems[4]);
194 return Vector3D(elems[1], elems[3], elems[5]);
211 c[0] = x ? elems[1] : elems[0];
212 c[1] = y ? elems[3] : elems[2];
213 c[2] = z ? elems[5] : elems[4];
223 for (
unsigned i = 0; i < 3; ++i)
224 inside &= ((elems[2 * i] <= p[i]) && (p[i] <= elems[2 * i + 1]));
247 for (
unsigned int i = 0; i < cloud.size(); ++i)
249 for (
unsigned int j = 0; j < 3; ++j)
251 a[j] = std::min(a[j], cloud[i][j]);
252 b[j] = std::max(b[j], cloud[i][j]);
268 std::vector<Vector3D> cloud;
269 cloud.push_back(
corner(0,0,0));
270 cloud.push_back(other.
corner(0,0,0));
271 cloud.push_back(
corner(0,0,1));
272 cloud.push_back(other.
corner(0,0,1));
273 cloud.push_back(
corner(0,1,0));
274 cloud.push_back(other.
corner(0,1,0));
275 cloud.push_back(
corner(0,1,1));
276 cloud.push_back(other.
corner(0,1,1));
277 cloud.push_back(
corner(1,0,0));
278 cloud.push_back(other.
corner(1,0,0));
279 cloud.push_back(
corner(1,0,1));
280 cloud.push_back(other.
corner(1,0,1));
281 cloud.push_back(
corner(1,1,0));
282 cloud.push_back(other.
corner(1,1,0));
283 cloud.push_back(
corner(1,1,1));
284 cloud.push_back(other.
corner(1,1,1));
292 for (
int i=0; i<3; ++i)
294 bb[2*i] = std::max(a[2*i], b[2*i]);
295 bb[2*i+1] = std::min(a[2*i+1], b[2*i+1]);
300 for (
int i=0; i<3; ++i)