Go to the documentation of this file.
49 for (
unsigned int j = 0; j < other.
num_spheres; ++j) {
52 if (o_dist > sum_r * sum_r)
return false;
56 return obb.overlap(other.
obb);
62 for (
unsigned int j = 0; j < other.
num_spheres; ++j) {
65 if (o_dist > sum_r * sum_r) {
66 o_dist = sqrt(o_dist) - sum_r;
67 sqrDistLowerBound = o_dist * o_dist;
73 return obb.overlap(other.
obb, request, sqrDistLowerBound);
79 if ((
spheres[i].o - p).squaredNorm() >
r *
r)
return false;
89 if (new_r_sqr >
r *
r) {
101 for (
unsigned int i = 0; i < new_num_spheres; ++i) {
124 long id_a = -1, id_b = -1;
126 for (
unsigned int j = 0; j < other.
num_spheres; ++j) {
140 if (id_a != -1 && id_b != -1) {
154 for (
unsigned int i = 0; i < b2_temp.
num_spheres; ++i) {
156 R0.transpose() * (b2_temp.
spheres[i].
o - T0);
159 b2_temp.
obb.
To.noalias() = R0.transpose() * (b2_temp.
obb.
To - T0);
160 b2_temp.
obb.
axes.applyOnTheLeft(R0.transpose());
169 for (
unsigned int i = 0; i < b2_temp.
num_spheres; ++i) {
171 R0.transpose() * (b2_temp.
spheres[i].
o - T0);
174 b2_temp.
obb.
To.noalias() = R0.transpose() * (b2_temp.
obb.
To - T0);
175 b2_temp.
obb.
axes.applyOnTheLeft(R0.transpose());
177 return b1.
overlap(b2_temp, request, sqrDistLowerBound);
183 for (
unsigned int i = 0; i < b2_temp.
num_spheres; ++i) {
192 for (
size_t i = 0; i <
res.num_spheres; ++i) {
193 res.spheres[i].o +=
t;
Eigen::Matrix< CoalScalar, 3, 1 > Vec3s
CoalScalar height() const
Height of the kIOS.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3s o
kIOS operator+(const kIOS &other) const
Return the merged kIOS of current kIOS and the other one.
CoalScalar depth() const
Depth of the kIOS.
static kIOS_Sphere encloseSphere(const kIOS_Sphere &s0, const kIOS_Sphere &s1)
generate one sphere enclosing two spheres
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s axes
Orientation of OBB. axis[i] is the ith column of the orientation matrix for the box; it is also the i...
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.
CoalScalar width() const
Width of the kIOS.
kIOS_Sphere spheres[max_num_spheres]
The (at most) five spheres for intersection.
CoalScalar volume() const
Volume of the kIOS.
CoalScalar distance(const kIOS &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
The distance between two 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
bool overlap(const kIOS &other) const
Check collision between two kIOS.
OBB obb
@ OBB related with kIOS
bool contain(const Vec3s &p) const
Check whether the kIOS contains a point.
kIOS & operator+=(const Vec3s &p)
A simple way to merge the kIOS and a point.
CoalScalar size() const
size of the kIOS (used in BV_Splitter to order two kIOSs)
hpp-fcl
Author(s):
autogenerated on Sat Nov 23 2024 03:44:58