Go to the documentation of this file.
45 struct CollisionRequest;
70 : min_(
a.cwiseMin(
b)), max_(
a.cwiseMax(
b)) {}
74 : min_(core.min_ - delta), max_(core.max_ + delta) {}
78 : min_(
a.cwiseMin(
b).cwiseMin(
c)), max_(
a.cwiseMax(
b).cwiseMax(
c)) {}
82 AABB& operator=(
const AABB& other) =
default;
92 return min_ == other.
min_ && max_ == other.
max_;
103 if (p[0] < min_[0] || p[0] > max_[0])
return false;
104 if (p[1] < min_[1] || p[1] > max_[1])
return false;
105 if (p[2] < min_[2] || p[2] > max_[2])
return false;
112 if (min_[0] > other.
max_[0])
return false;
113 if (min_[1] > other.
max_[1])
return false;
114 if (min_[2] > other.
max_[2])
return false;
116 if (max_[0] < other.
min_[0])
return false;
117 if (max_[1] < other.
min_[1])
return false;
118 if (max_[2] < other.
min_[2])
return false;
142 min_ = min_.cwiseMin(p);
143 max_ = max_.cwiseMax(p);
149 min_ = min_.cwiseMin(other.
min_);
150 max_ = max_.cwiseMax(other.
max_);
182 return (other.
min_[0] >= min_[0]) && (other.
max_[0] <= max_[0]) &&
183 (other.
min_[1] >= min_[1]) && (other.
max_[1] <= max_[1]) &&
184 (other.
min_[2] >= min_[2]) && (other.
max_[2] <= max_[2]);
193 overlap_part.
min_ = min_.cwiseMax(other.
min_);
194 overlap_part.
max_ = max_.cwiseMin(other.
max_);
200 if (min_[axis_id] > other.
max_[axis_id])
return false;
201 if (max_[axis_id] < other.
min_[axis_id])
return false;
217 min_.array() -= delta;
218 max_.array() += delta;
224 min_ = min_ * ratio - core.
min_;
225 max_ = max_ * ratio - core.
max_;
229 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
243 const Eigen::DenseIndex bit[3] = {1, 2, 4};
244 for (Eigen::DenseIndex ic = 1; ic < 8;
246 for (Eigen::DenseIndex i = 0; i < 3; ++i) {
247 corner[i] = (ic & bit[i]) ? aabb.
max_[i] : aabb.
min_[i];
262 const AABB& b2,
const CollisionRequest& request,
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
AABB & expand(const CoalScalar delta)
expand the half size of the AABB by a scalar delta, and keep the center unchanged.
AABB & operator+=(const Vec3s &p)
Merge the AABB and a point.
Half Space: this is equivalent to the Plane in ODE. A Half space has a priviledged direction: the dir...
CoalScalar width() const
Width of the AABB.
COAL_DLLAPI CoalScalar distance(const Matrix3s &R0, const Vec3s &T0, const kIOS &b1, const kIOS &b2, Vec3s *P=NULL, Vec3s *Q=NULL)
Approximate distance between two kIOS bounding volumes.
bool operator!=(const AABB &other) const
CoalScalar depth() const
Depth of the AABB.
bool overlap(const AABB &other, AABB &overlap_part) const
Check whether two AABB are overlap and return the overlap part.
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
Infinite plane. A plane can be viewed as two half spaces; it has no priviledged direction....
CoalScalar height() const
Height of the AABB.
Vec3s max_
The max point in the AABB.
AABB & update(const Vec3s &a, const Vec3s &b)
bool overlap(const AABB &other) const
Check whether two AABB are overlap.
CoalScalar volume() const
Volume of the AABB.
AABB & expand(const AABB &core, CoalScalar ratio)
expand the aabb by increase the thickness of the plate by a ratio
request to the collision algorithm
AABB(const Vec3s &a, const Vec3s &b, const Vec3s &c)
Creating an AABB contains three points.
static AABB translate(const AABB &aabb, const Vec3s &t)
translate the center of AABB by t
bool contain(const Vec3s &p) const
Check whether the AABB contains a point.
Vec3s center() const
Center of the AABB.
bool contain(const AABB &other) const
Check whether the AABB contains another AABB.
COAL_DLLAPI bool overlap(const Matrix3s &R0, const Vec3s &T0, const AABB &b1, const AABB &b2)
Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
Vec3s min_
The min point in the AABB.
AABB operator+(const AABB &other) const
Return the merged AABB of current AABB and the other one.
static AABB rotate(const AABB &aabb, const Matrix3s &R)
AABB & operator+=(const AABB &other)
Merge the AABB and another AABB.
bool axisOverlap(const AABB &other, int axis_id) const
Check whether two AABB are overlapped along specific axis.
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
bool operator==(const AABB &other) const
Comparison operator.
AABB(const Vec3s &v)
Creating an AABB at position v with zero size.
AABB(const AABB &core, const Vec3s &delta)
Creating an AABB centered as core and is of half-dimension delta.
AABB(const Vec3s &a, const Vec3s &b)
Creating an AABB with two endpoints a and b.
AABB & expand(const Vec3s &delta)
expand the half size of the AABB by delta, and keep the center unchanged.
CoalScalar size() const
Size of the AABB (used in BV_Splitter to order two AABBs)
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:57