Go to the documentation of this file.
38 #ifndef HPP_FCL_KIOS_H
39 #define HPP_FCL_KIOS_H
46 struct CollisionRequest;
53 class HPP_FCL_DLLAPI
kIOS {
60 return o == other.
o &&
r == other.
r;
64 return !(*
this == other);
76 if (diff_r * diff_r >= dist2) {
83 float dist = (float)std::sqrt(dist2);
85 s.
r = dist + s0.
r + s1.
r;
87 s.
o = s0.
o + d * ((s.
r - s0.
r) / dist);
98 if (!
res)
return false;
100 for (
size_t k = 0; k < num_spheres; ++k) {
101 if (spheres[k] != other.
spheres[k])
return false;
120 bool contain(
const Vec3f& p)
const;
137 *
this = *
this + other;
142 kIOS operator+(
const kIOS& other)
const;
176 const kIOS& b2,
const CollisionRequest& request,
182 const kIOS& b1,
const kIOS& b2,
bool operator!=(const kIOS_Sphere &other) const
Eigen::Matrix< FCL_REAL, 3, 1 > Vec3f
static kIOS_Sphere encloseSphere(const kIOS_Sphere &s0, const kIOS_Sphere &s1)
generate one sphere enclosing two spheres
bool operator==(const kIOS_Sphere &other) const
A class describing the kIOS collision structure, which is a set of spheres.
HPP_FCL_DLLAPI FCL_REAL distance(const Matrix3f &R0, const Vec3f &T0, const kIOS &b1, const kIOS &b2, Vec3f *P=NULL, Vec3f *Q=NULL)
Approximate distance between two kIOS bounding volumes.
OBB obb
@ OBB related with kIOS
bool operator==(const kIOS &other) const
Equality operator.
request to the collision algorithm
Oriented bounding box class.
unsigned int num_spheres
The number of spheres, no larger than 5.
Eigen::Matrix< FCL_REAL, 3, 3 > Matrix3f
HPP_FCL_DLLAPI 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.
const Vec3f & center() const
Center of the kIOS.
kIOS & operator+=(const kIOS &other)
Merge the kIOS and another kIOS.
static AABB translate(const AABB &aabb, const Vec3f &t)
translate the center of AABB by t
bool operator!=(const kIOS &other) const
Difference operator.
kIOS_Sphere spheres[5]
The (at most) five spheres for intersection.
hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:14