Go to the documentation of this file.
38 #ifndef FCL_BV_AABB_INL_H
39 #define FCL_BV_AABB_INL_H
53 : min_(
Vector3<
S>::Constant(std::numeric_limits<
S>::
max())),
54 max_(
Vector3<
S>::Constant(-std::numeric_limits<
S>::
max()))
69 : min_(a.cwiseMin(b)),
78 : min_(core.min_ - delta),
79 max_(core.max_ + delta)
90 : min_(a.cwiseMin(b).cwiseMin(c)),
91 max_(a.cwiseMax(b).cwiseMax(c))
100 if ((min_.array() > other.
max_.array()).any())
103 if ((max_.array() < other.
min_.array()).any())
110 template <
typename S>
113 if ((min_.array() > other.
min_.array()).any())
116 if ((max_.array() < other.
max_.array()).any())
123 template <
typename S>
126 if(min_[axis_id] > other.
max_[axis_id])
return false;
128 if(max_[axis_id] < other.
min_[axis_id])
return false;
134 template <
typename S>
142 overlap_part.
min_ = min_.cwiseMax(other.
min_);
143 overlap_part.
max_ = max_.cwiseMin(other.
max_);
148 template <
typename S>
151 if ((min_.array() > p.array()).any())
154 if ((max_.array() < p.array()).any())
161 template <
typename S>
164 min_ = min_.cwiseMin(p);
165 max_ = max_.cwiseMax(p);
170 template <
typename S>
173 min_ = min_.cwiseMin(other.
min_);
174 max_ = max_.cwiseMax(other.
max_);
179 template <
typename S>
187 template <
typename S>
190 return max_[0] - min_[0];
194 template <
typename S>
197 return max_[1] - min_[1];
201 template <
typename S>
204 return max_[2] - min_[2];
208 template <
typename S>
211 return width() * height() * depth();
215 template <
typename S>
218 return (max_ - min_).squaredNorm();
222 template <
typename S>
225 return (max_ - min_).norm() / 2;
229 template <
typename S>
232 return (min_ + max_) * 0.5;
236 template <
typename S>
240 for(std::size_t i = 0; i < 3; ++i)
242 const S& amin = min_[i];
243 const S& amax = max_[i];
244 const S& bmin = other.
min_[i];
245 const S& bmax = other.
max_[i];
249 S delta = bmax - amin;
250 result += delta * delta;
259 S delta = amax - bmin;
260 result += delta * delta;
273 S t = 0.5 * (amax + bmin);
279 S t = 0.5 * (amin + bmax);
287 return std::sqrt(result);
291 template <
typename S>
295 for(std::size_t i = 0; i < 3; ++i)
297 const S& amin = min_[i];
298 const S& amax = max_[i];
299 const S& bmin = other.
min_[i];
300 const S& bmax = other.
max_[i];
304 S delta = bmax - amin;
305 result += delta * delta;
309 S delta = amax - bmin;
310 result += delta * delta;
314 return std::sqrt(result);
318 template <
typename S>
326 template <
typename S>
335 template <
typename S>
338 min_ = min_ * ratio - core.
min_;
339 max_ = max_ * ratio - core.
max_;
344 template <
typename S,
typename Derived>
346 const AABB<S>&
aabb,
const Eigen::MatrixBase<Derived>& t)
S distance(const Eigen::MatrixBase< DerivedA > &R0, const Eigen::MatrixBase< DerivedB > &T0, const kIOS< S > &b1, const kIOS< S > &b2, Vector3< S > *P, Vector3< S > *Q)
Approximate distance between two kIOS bounding volumes.
AABB< S > translate(const AABB< S > &aabb, const Eigen::MatrixBase< Derived > &t)
translate the center of AABB by t
A class describing the AABB collision structure, which is a box in 3D space determined by two diagona...
bool overlap(S a1, S a2, S b1, S b2)
returns 1 if the intervals overlap, and 0 otherwise
Eigen::Matrix< S, 3, 1 > Vector3
Vector3< S > max_
The max point in the AABB.
Vector3< S > min_
The min point in the AABB.
template class FCL_EXPORT AABB< double >
AABB()
Creating an AABB with zero size (low bound +inf, upper bound -inf)
SaPCollisionManager< S >::SaPAABB * aabb
back pointer to SAP interval
template TMatrix3< double > operator+(const Matrix3< double > &m1, const TMatrix3< double > &m2)
fcl
Author(s):
autogenerated on Tue Dec 5 2023 03:40:48