Go to the documentation of this file.
45 struct CollisionRequest;
55 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
61 return o == other.
o &&
r == other.
r;
65 return !(*
this == other);
77 if (diff_r * diff_r >= dist2) {
84 float dist = (float)std::sqrt(dist2);
86 s.
r = dist + s0.
r + s1.
r;
88 s.
o = s0.
o +
d * ((s.
r - s0.
r) / dist);
96 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
101 if (!
res)
return false;
103 for (
size_t k = 0; k < num_spheres; ++k) {
104 if (spheres[k] != other.
spheres[k])
return false;
113 static constexpr
size_t max_num_spheres = 5;
125 bool contain(
const Vec3s& p)
const;
136 Vec3s* Q = NULL)
const;
143 *
this = *
this + other;
148 kIOS operator+(
const kIOS& other)
const;
182 const kIOS& b2,
const CollisionRequest& request,
188 const kIOS& b1,
const kIOS& b2,
Vec3s* P = NULL,
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
EIGEN_MAKE_ALIGNED_OPERATOR_NEW bool operator==(const kIOS &other) const
Equality operator.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3s o
static kIOS_Sphere encloseSphere(const kIOS_Sphere &s0, const kIOS_Sphere &s1)
generate one sphere enclosing two spheres
A class describing the kIOS collision structure, which is a set of spheres.
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.
kIOS_Sphere spheres[max_num_spheres]
The (at most) five spheres for intersection.
bool operator!=(const kIOS_Sphere &other) const
bool operator==(const kIOS_Sphere &other) const
kIOS & operator+=(const kIOS &other)
Merge the kIOS and another kIOS.
request to the collision algorithm
unsigned int num_spheres
The number of spheres, no larger than 5.
static AABB translate(const AABB &aabb, const Vec3s &t)
translate the center of AABB by t
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.
Eigen::Matrix< CoalScalar, 3, 3 > Matrix3s
OBB obb
@ OBB related with kIOS
Oriented bounding box class.
bool operator!=(const kIOS &other) const
Difference operator.
const Vec3s & center() const
Center of the kIOS.
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:58