80 max_(core.max_ + delta)
86 max_(a.cwiseMax(b).cwiseMax(c))
92 min_ = a.cwiseMin(b); max_ = a.cwiseMax(b);
99 return min_ == other.
min_ && max_ == other.
max_;
109 if(p[0] < min_[0] || p[0] > max_[0])
return false;
110 if(p[1] < min_[1] || p[1] > max_[1])
return false;
111 if(p[2] < min_[2] || p[2] > max_[2])
return false;
119 if(min_[0] > other.
max_[0])
return false;
120 if(min_[1] > other.
max_[1])
return false;
121 if(min_[2] > other.
max_[2])
return false;
123 if(max_[0] < other.
min_[0])
return false;
124 if(max_[1] < other.
min_[1])
return false;
125 if(max_[2] < other.
min_[2])
return false;
143 min_ = min_.cwiseMin(p);
144 max_ = max_.cwiseMax(p);
151 min_ = min_.cwiseMin(other.
min_);
152 max_ = max_.cwiseMax(other.
max_);
166 return (max_ - min_).squaredNorm();
172 return (min_ + max_) * 0.5;
178 return max_[0] - min_[0];
184 return max_[1] - min_[1];
190 return max_[2] - min_[2];
196 return width() * height() * depth();
204 return (other.
min_[0] >= min_[0]) && (other.
max_[0] <= max_[0]) && (other.
min_[1] >= min_[1]) && (other.
max_[1] <= max_[1]) && (other.
min_[2] >= min_[2]) && (other.
max_[2] <= max_[2]);
215 overlap_part.
min_ = min_.cwiseMax(other.
min_);
216 overlap_part.
max_ = max_.cwiseMin(other.
max_);
231 min_ = min_ * ratio - core.
min_;
232 max_ = max_ * ratio - core.
max_;
236 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
240static inline AABB translate(
const AABB& aabb,
const Vec3f& t)
248static inline AABB rotate(
const AABB& aabb,
const Matrix3f& R)
250 AABB res (R * aabb.min_);
251 Vec3f corner (aabb.min_);
252 const Eigen::DenseIndex bit[3] = { 1, 2, 4 };
253 for (Eigen::DenseIndex ic = 1; ic < 8; ++ic) {
254 for (Eigen::DenseIndex i = 0; i < 3; ++i) {
255 corner[i] = (ic & bit[i]) ? aabb.max_[i] : aabb.min_[i];
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Definition: AABB.h:56
#define HPP_FCL_DLLAPI
Definition: config.hh:64
Vec3f max_
The max point in the AABB.
Definition: AABB.h:62
bool overlap(const AABB &other, const CollisionRequest &request, FCL_REAL &sqrDistLowerBound) const
Check whether two AABB are overlap.
AABB(const Vec3f &v)
Creating an AABB at position v with zero size.
Definition: AABB.h:68
bool contain(const AABB &other) const
Check whether the AABB contains another AABB.
Definition: AABB.h:202
FCL_REAL depth() const
Depth of the AABB.
Definition: AABB.h:188
FCL_REAL volume() const
Volume of the AABB.
Definition: AABB.h:194
AABB & update(const Vec3f &a, const Vec3f &b)
Definition: AABB.h:90
FCL_REAL distance(const AABB &other) const
Distance between two AABBs.
AABB(const AABB &core, const Vec3f &delta)
Creating an AABB centered as core and is of half-dimension delta.
Definition: AABB.h:79
bool overlap(const AABB &other, AABB &overlap_part) const
Check whether two AABB are overlap and return the overlap part.
Definition: AABB.h:208
FCL_REAL width() const
Width of the AABB.
Definition: AABB.h:176
bool operator==(const AABB &other) const
Comparison operator.
Definition: AABB.h:97
bool overlap(const AABB &other) const
Check whether two AABB are overlap.
Definition: AABB.h:117
AABB(const Vec3f &a, const Vec3f &b)
Creating an AABB with two endpoints a and b.
Definition: AABB.h:73
Vec3f min_
The min point in the AABB.
Definition: AABB.h:60
AABB & expand(const Vec3f &delta)
expand the half size of the AABB by delta, and keep the center unchanged.
Definition: AABB.h:221
bool overlap(const Matrix3f &R0, const Vec3f &T0, const AABB &b1, const AABB &b2)
Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
AABB()
Creating an AABB with zero size (low bound +inf, upper bound -inf)
AABB(const Vec3f &a, const Vec3f &b, const Vec3f &c)
Creating an AABB contains three points.
Definition: AABB.h:85
AABB & expand(const AABB &core, FCL_REAL ratio)
expand the aabb by increase the thickness of the plate by a ratio
Definition: AABB.h:229
bool contain(const Vec3f &p) const
Check whether the AABB contains a point.
Definition: AABB.h:107
FCL_REAL height() const
Height of the AABB.
Definition: AABB.h:182
FCL_REAL distance(const AABB &other, Vec3f *P, Vec3f *Q) const
Distance between two AABBs; P and Q, should not be NULL, return the nearest points.
Vec3f center() const
Center of the AABB.
Definition: AABB.h:170
FCL_REAL size() const
Size of the AABB (used in BV_Splitter to order two AABBs)
Definition: AABB.h:164
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
Definition: data_types.h:69
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
Definition: data_types.h:67
double FCL_REAL
Definition: data_types.h:66
Main namespace.
Definition: AABB.h:44
request to the collision algorithm
Definition: collision_data.h:210