coal  3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
Bounding volumes

Classes

class  coal::AABB
 A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points. More...
 
class  coal::KDOP< N >
 KDOP class describes the KDOP collision structures. K is set as the template parameter, which should be 16, 18, or 24 The KDOP structure is defined by some pairs of parallel planes defined by some axes. For K = 16, the planes are 6 AABB planes and 10 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 8 (0,-1,0) and (0,1,0) -> indices 1 and 9 (0,0,-1) and (0,0,1) -> indices 2 and 10 (-1,-1,0) and (1,1,0) -> indices 3 and 11 (-1,0,-1) and (1,0,1) -> indices 4 and 12 (0,-1,-1) and (0,1,1) -> indices 5 and 13 (-1,1,0) and (1,-1,0) -> indices 6 and 14 (-1,0,1) and (1,0,-1) -> indices 7 and 15 For K = 18, the planes are 6 AABB planes and 12 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 9 (0,-1,0) and (0,1,0) -> indices 1 and 10 (0,0,-1) and (0,0,1) -> indices 2 and 11 (-1,-1,0) and (1,1,0) -> indices 3 and 12 (-1,0,-1) and (1,0,1) -> indices 4 and 13 (0,-1,-1) and (0,1,1) -> indices 5 and 14 (-1,1,0) and (1,-1,0) -> indices 6 and 15 (-1,0,1) and (1,0,-1) -> indices 7 and 16 (0,-1,1) and (0,1,-1) -> indices 8 and 17 For K = 18, the planes are 6 AABB planes and 18 diagonal planes that cut off some space of the edges: (-1,0,0) and (1,0,0) -> indices 0 and 12 (0,-1,0) and (0,1,0) -> indices 1 and 13 (0,0,-1) and (0,0,1) -> indices 2 and 14 (-1,-1,0) and (1,1,0) -> indices 3 and 15 (-1,0,-1) and (1,0,1) -> indices 4 and 16 (0,-1,-1) and (0,1,1) -> indices 5 and 17 (-1,1,0) and (1,-1,0) -> indices 6 and 18 (-1,0,1) and (1,0,-1) -> indices 7 and 19 (0,-1,1) and (0,1,-1) -> indices 8 and 20 (-1, -1, 1) and (1, 1, -1) --> indices 9 and 21 (-1, 1, -1) and (1, -1, 1) --> indices 10 and 22 (1, -1, -1) and (-1, 1, 1) --> indices 11 and 23. More...
 
class  coal::kIOS
 A class describing the kIOS collision structure, which is a set of spheres. More...
 
struct  coal::OBB
 Oriented bounding box class. More...
 
struct  coal::OBBRSS
 Class merging the OBB and RSS, can handle collision and distance simultaneously. More...
 
struct  coal::RSS
 A class for rectangle sphere-swept bounding volume. More...
 

Functions

 coal::AABB::AABB ()
 Creating an AABB with zero size (low bound +inf, upper bound -inf) More...
 
 coal::AABB::AABB (const Vec3s &v)
 Creating an AABB at position v with zero size. More...
 
 coal::AABB::AABB (const Vec3s &a, const Vec3s &b)
 Creating an AABB with two endpoints a and b. More...
 
 coal::AABB::AABB (const AABB &core, const Vec3s &delta)
 Creating an AABB centered as core and is of half-dimension delta. More...
 
 coal::AABB::AABB (const Vec3s &a, const Vec3s &b, const Vec3s &c)
 Creating an AABB contains three points. More...
 
 coal::AABB::AABB (const AABB &other)=default
 
AABBcoal::AABB::operator= (const AABB &other)=default
 
AABBcoal::AABB::update (const Vec3s &a, const Vec3s &b)
 
bool coal::AABB::operator== (const AABB &other) const
 Comparison operator. More...
 
bool coal::AABB::operator!= (const AABB &other) const
 
bool coal::AABB::contain (const AABB &other) const
 Check whether the AABB contains another AABB. More...
 
bool coal::AABB::overlap (const AABB &other, AABB &overlap_part) const
 Check whether two AABB are overlap and return the overlap part. More...
 
bool coal::AABB::axisOverlap (const AABB &other, int axis_id) const
 Check whether two AABB are overlapped along specific axis. More...
 
AABBcoal::AABB::expand (const Vec3s &delta)
 expand the half size of the AABB by delta, and keep the center unchanged. More...
 
AABBcoal::AABB::expand (const Scalar delta)
 expand the half size of the AABB by a scalar delta, and keep the center unchanged. More...
 
AABBcoal::AABB::expand (const AABB &core, Scalar ratio)
 expand the aabb by increase the thickness of the plate by a ratio More...
 
bool coal::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. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const AABB &b1, const AABB &b2, const CollisionRequest &request, Scalar &sqrDistLowerBound)
 Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW coal::KDOP< N >::KDOP ()
 Creating kDOP containing nothing. More...
 
 coal::KDOP< N >::KDOP (const Vec3s &v)
 Creating kDOP containing only one point. More...
 
 coal::KDOP< N >::KDOP (const Vec3s &a, const Vec3s &b)
 Creating kDOP containing two points. More...
 
bool coal::KDOP< N >::operator== (const KDOP &other) const
 Equality operator. More...
 
bool coal::KDOP< N >::operator!= (const KDOP &other) const
 Difference operator. More...
 
bool coal::KDOP< N >::overlap (const KDOP< N > &other) const
 Check whether two KDOPs overlap. More...
 
bool coal::KDOP< N >::overlap (const KDOP< N > &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
 Check whether two KDOPs overlap. More...
 
Scalar coal::KDOP< N >::distance (const KDOP< N > &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 The distance between two KDOP<N>. Not implemented. More...
 
KDOP< N > & coal::KDOP< N >::operator+= (const Vec3s &p)
 Merge the point and the KDOP. More...
 
KDOP< N > & coal::KDOP< N >::operator+= (const KDOP< N > &other)
 Merge two KDOPs. More...
 
KDOP< N > coal::KDOP< N >::operator+ (const KDOP< N > &other) const
 Create a KDOP by mergin two KDOPs. More...
 
Scalar coal::KDOP< N >::size () const
 Size of the kDOP (used in BV_Splitter to order two kDOPs) More...
 
Vec3s coal::KDOP< N >::center () const
 The (AABB) center. More...
 
Scalar coal::KDOP< N >::width () const
 The (AABB) width. More...
 
Scalar coal::KDOP< N >::height () const
 The (AABB) height. More...
 
Scalar coal::KDOP< N >::depth () const
 The (AABB) depth. More...
 
Scalar coal::KDOP< N >::volume () const
 The (AABB) volume. More...
 
Scalar coal::KDOP< N >::dist (short i) const
 
Scalarcoal::KDOP< N >::dist (short i)
 
bool coal::KDOP< N >::inside (const Vec3s &p) const
 
template<short N>
bool coal::overlap (const Matrix3s &, const Vec3s &, const KDOP< N > &, const KDOP< N > &)
 
template<short N>
bool coal::overlap (const Matrix3s &, const Vec3s &, const KDOP< N > &, const KDOP< N > &, const CollisionRequest &, Scalar &)
 
template<short N>
KDOP< N > coal::translate (const KDOP< N > &bv, const Vec3s &t)
 translate the KDOP BV More...
 
bool coal::kIOS::kIOS_Sphere::operator== (const kIOS_Sphere &other) const
 
bool coal::kIOS::kIOS_Sphere::operator!= (const kIOS_Sphere &other) const
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW bool coal::kIOS::operator== (const kIOS &other) const
 Equality operator. More...
 
bool coal::kIOS::operator!= (const kIOS &other) const
 Difference operator. More...
 
bool coal::kIOS::contain (const Vec3s &p) const
 Check whether the kIOS contains a point. More...
 
bool coal::kIOS::overlap (const kIOS &other) const
 Check collision between two kIOS. More...
 
bool coal::kIOS::overlap (const kIOS &other, const CollisionRequest &, Scalar &sqrDistLowerBound) const
 Check collision between two kIOS. More...
 
Scalar coal::kIOS::distance (const kIOS &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 The distance between two kIOS. More...
 
kIOScoal::kIOS::operator+= (const Vec3s &p)
 A simple way to merge the kIOS and a point. More...
 
kIOScoal::kIOS::operator+= (const kIOS &other)
 Merge the kIOS and another kIOS. More...
 
kIOS coal::kIOS::operator+ (const kIOS &other) const
 Return the merged kIOS of current kIOS and the other one. More...
 
Scalar coal::kIOS::size () const
 size of the kIOS (used in BV_Splitter to order two kIOSs) More...
 
const Vec3scoal::kIOS::center () const
 Center of the kIOS. More...
 
Scalar coal::kIOS::width () const
 Width of the kIOS. More...
 
Scalar coal::kIOS::height () const
 Height of the kIOS. More...
 
Scalar coal::kIOS::depth () const
 Depth of the kIOS. More...
 
Scalar coal::kIOS::volume () const
 Volume of the kIOS. More...
 
kIOS coal::translate (const kIOS &bv, const Vec3s &t)
 Translate the kIOS BV. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const kIOS &b1, const kIOS &b2)
 Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const kIOS &b1, const kIOS &b2, const CollisionRequest &request, Scalar &sqrDistLowerBound)
 Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
Scalar coal::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. More...
 
 coal::OBB::OBB ()
 
bool coal::OBB::operator== (const OBB &other) const
 Equality operator. More...
 
bool coal::OBB::operator!= (const OBB &other) const
 Difference operator. More...
 
bool coal::OBB::contain (const Vec3s &p) const
 Check whether the OBB contains a point. More...
 
bool coal::OBB::overlap (const OBB &other) const
 
bool coal::OBB::overlap (const OBB &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
 
Scalar coal::OBB::distance (const OBB &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 Distance between two OBBs, not implemented. More...
 
OBBcoal::OBB::operator+= (const Vec3s &p)
 A simple way to merge the OBB and a point (the result is not compact). More...
 
OBBcoal::OBB::operator+= (const OBB &other)
 Merge the OBB and another OBB (the result is not compact). More...
 
OBB coal::OBB::operator+ (const OBB &other) const
 Return the merged OBB of current OBB and the other one (the result is not compact). More...
 
Scalar coal::OBB::size () const
 Size of the OBB (used in BV_Splitter to order two OBBs) More...
 
const Vec3scoal::OBB::center () const
 Center of the OBB. More...
 
Scalar coal::OBB::width () const
 Width of the OBB. More...
 
Scalar coal::OBB::height () const
 Height of the OBB. More...
 
Scalar coal::OBB::depth () const
 Depth of the OBB. More...
 
Scalar coal::OBB::volume () const
 Volume of the OBB. More...
 
OBB coal::translate (const OBB &bv, const Vec3s &t)
 Translate the OBB bv. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBB &b1, const OBB &b2)
 Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBB &b1, const OBB &b2, const CollisionRequest &request, Scalar &sqrDistLowerBound)
 Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
bool coal::obbDisjoint (const Matrix3s &B, const Vec3s &T, const Vec3s &a, const Vec3s &b)
 
bool coal::OBBRSS::operator== (const OBBRSS &other) const
 Equality operator. More...
 
bool coal::OBBRSS::operator!= (const OBBRSS &other) const
 Difference operator. More...
 
bool coal::OBBRSS::contain (const Vec3s &p) const
 Check whether the OBBRSS contains a point. More...
 
bool coal::OBBRSS::overlap (const OBBRSS &other) const
 Check collision between two OBBRSS. More...
 
bool coal::OBBRSS::overlap (const OBBRSS &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
 
Scalar coal::OBBRSS::distance (const OBBRSS &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 Distance between two OBBRSS; P and Q , is not NULL, returns the nearest points. More...
 
OBBRSScoal::OBBRSS::operator+= (const Vec3s &p)
 Merge the OBBRSS and a point. More...
 
OBBRSScoal::OBBRSS::operator+= (const OBBRSS &other)
 Merge two OBBRSS. More...
 
OBBRSS coal::OBBRSS::operator+ (const OBBRSS &other) const
 Merge two OBBRSS. More...
 
Scalar coal::OBBRSS::size () const
 Size of the OBBRSS (used in BV_Splitter to order two OBBRSS) More...
 
const Vec3scoal::OBBRSS::center () const
 Center of the OBBRSS. More...
 
Scalar coal::OBBRSS::width () const
 Width of the OBRSS. More...
 
Scalar coal::OBBRSS::height () const
 Height of the OBBRSS. More...
 
Scalar coal::OBBRSS::depth () const
 Depth of the OBBRSS. More...
 
Scalar coal::OBBRSS::volume () const
 Volume of the OBBRSS. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBBRSS &b1, const OBBRSS &b2)
 Check collision between two OBBRSS, b1 is in configuration (R0, T0) and b2 is in indentity. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBBRSS &b1, const OBBRSS &b2, const CollisionRequest &request, Scalar &sqrDistLowerBound)
 
Scalar coal::distance (const Matrix3s &R0, const Vec3s &T0, const OBBRSS &b1, const OBBRSS &b2, Vec3s *P=NULL, Vec3s *Q=NULL)
 Computate distance between two OBBRSS, b1 is in configuation (R0, T0) and b2 is in indentity; P and Q, is not NULL, returns the nearest points. More...
 
 coal::RSS::RSS ()
   More...
 
bool coal::RSS::operator== (const RSS &other) const
 Equality operator. More...
 
bool coal::RSS::operator!= (const RSS &other) const
 Difference operator. More...
 
bool coal::RSS::contain (const Vec3s &p) const
 Check whether the RSS contains a point. More...
 
bool coal::RSS::overlap (const RSS &other) const
 Check collision between two RSS. More...
 
bool coal::RSS::overlap (const RSS &other, const CollisionRequest &, Scalar &sqrDistLowerBound) const
 Not implemented. More...
 
Scalar coal::RSS::distance (const RSS &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 the distance between two RSS; P and Q, if not NULL, return the nearest points More...
 
RSScoal::RSS::operator+= (const Vec3s &p)
 A simple way to merge the RSS and a point, not compact. More...
 
RSScoal::RSS::operator+= (const RSS &other)
 Merge the RSS and another RSS. More...
 
RSS coal::RSS::operator+ (const RSS &other) const
 Return the merged RSS of current RSS and the other one. More...
 
Scalar coal::RSS::size () const
 Size of the RSS (used in BV_Splitter to order two RSSs) More...
 
const Vec3scoal::RSS::center () const
 The RSS center. More...
 
Scalar coal::RSS::width () const
 Width of the RSS. More...
 
Scalar coal::RSS::height () const
 Height of the RSS. More...
 
Scalar coal::RSS::depth () const
 Depth of the RSS. More...
 
Scalar coal::RSS::volume () const
 Volume of the RSS. More...
 
bool coal::RSS::overlap (const RSS &other, RSS &) const
 Check collision between two RSS and return the overlap part. For RSS, we return nothing, as the overlap part of two RSSs usually is not a RSS. More...
 
Scalar coal::distance (const Matrix3s &R0, const Vec3s &T0, const RSS &b1, const RSS &b2, Vec3s *P=NULL, Vec3s *Q=NULL)
 distance between two RSS bounding volumes P and Q (optional return values) are the closest points in the rectangles, not the RSS. But the direction P - Q is the correct direction for cloest points Notice that P and Q are both in the local frame of the first RSS (not global frame and not even the local frame of object 1) More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const RSS &b1, const RSS &b2)
 Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const RSS &b1, const RSS &b2, const CollisionRequest &request, Scalar &sqrDistLowerBound)
 Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity. More...
 

Variables

Vec3s coal::AABB::min_
 The min point in the AABB. More...
 
Vec3s coal::AABB::max_
 The max point in the AABB. More...
 
Eigen::Array< Scalar, N, 1 > coal::KDOP< N >::dist_
 Origin's distances to N KDOP planes. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3s coal::kIOS::kIOS_Sphere::o
 
Scalar coal::kIOS::kIOS_Sphere::r
 
static constexpr size_t coal::kIOS::max_num_spheres = 5
 
kIOS_Sphere coal::kIOS::spheres [max_num_spheres]
 The (at most) five spheres for intersection. More...
 
unsigned int coal::kIOS::num_spheres
 The number of spheres, no larger than 5. More...
 
OBB coal::kIOS::obb
 @ OBB related with kIOS More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s coal::OBB::axes
 Orientation of OBB. axis[i] is the ith column of the orientation matrix for the box; it is also the i-th principle direction of the box. We assume that axis[0] corresponds to the axis with the longest box edge, axis[1] corresponds to the shorter one and axis[2] corresponds to the shortest one. More...
 
Vec3s coal::OBB::To
 Center of OBB. More...
 
Vec3s coal::OBB::extent
 Half dimensions of OBB. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OBB coal::OBBRSS::obb
 OBB member, for rotation. More...
 
RSS coal::OBBRSS::rss
 RSS member, for distance. More...
 
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s coal::RSS::axes
 Orientation of RSS. axis[i] is the ith column of the orientation matrix for the RSS; it is also the i-th principle direction of the RSS. We assume that axis[0] corresponds to the axis with the longest length, axis[1] corresponds to the shorter one and axis[2] corresponds to the shortest one. More...
 
Vec3s coal::RSS::Tr
 Origin of the rectangle in RSS. More...
 
Scalar coal::RSS::length [2]
 Side lengths of rectangle. More...
 
Scalar coal::RSS::radius
 Radius of sphere summed with rectangle to form RSS. More...
 

Bounding volume API

Common API to BVs.

bool coal::AABB::contain (const Vec3s &p) const
 Check whether the AABB contains a point. More...
 
bool coal::AABB::overlap (const AABB &other) const
 Check whether two AABB are overlap. More...
 
bool coal::AABB::overlap (const Plane &p) const
 Check whether AABB overlaps a plane. More...
 
bool coal::AABB::overlap (const Halfspace &hs) const
 Check whether AABB overlaps a halfspace. More...
 
bool coal::AABB::overlap (const AABB &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
 Check whether two AABB are overlap. More...
 
Scalar coal::AABB::distance (const AABB &other) const
 Distance between two AABBs. More...
 
Scalar coal::AABB::distance (const AABB &other, Vec3s *P, Vec3s *Q) const
 Distance between two AABBs; P and Q, should not be NULL, return the nearest points. More...
 
AABBcoal::AABB::operator+= (const Vec3s &p)
 Merge the AABB and a point. More...
 
AABBcoal::AABB::operator+= (const AABB &other)
 Merge the AABB and another AABB. More...
 
AABB coal::AABB::operator+ (const AABB &other) const
 Return the merged AABB of current AABB and the other one. More...
 
Scalar coal::AABB::size () const
 Size of the AABB (used in BV_Splitter to order two AABBs) More...
 
Vec3s coal::AABB::center () const
 Center of the AABB. More...
 
Scalar coal::AABB::width () const
 Width of the AABB. More...
 
Scalar coal::AABB::height () const
 Height of the AABB. More...
 
Scalar coal::AABB::depth () const
 Depth of the AABB. More...
 
Scalar coal::AABB::volume () const
 Volume of the AABB. More...
 

Detailed Description

Classes of different types of bounding volume.

Function Documentation

◆ AABB() [1/6]

coal::AABB::AABB ( )

Creating an AABB with zero size (low bound +inf, upper bound -inf)

◆ AABB() [2/6]

coal::AABB::AABB ( const AABB core,
const Vec3s delta 
)
inline

Creating an AABB centered as core and is of half-dimension delta.

◆ AABB() [3/6]

coal::AABB::AABB ( const AABB other)
default

◆ AABB() [4/6]

coal::AABB::AABB ( const Vec3s a,
const Vec3s b 
)
inline

Creating an AABB with two endpoints a and b.

◆ AABB() [5/6]

coal::AABB::AABB ( const Vec3s a,
const Vec3s b,
const Vec3s c 
)
inline

Creating an AABB contains three points.

◆ AABB() [6/6]

coal::AABB::AABB ( const Vec3s v)
inline

Creating an AABB at position v with zero size.

◆ axisOverlap()

bool coal::AABB::axisOverlap ( const AABB other,
int  axis_id 
) const
inline

Check whether two AABB are overlapped along specific axis.

◆ center() [1/6]

Vec3s coal::AABB::center ( ) const
inline

Center of the AABB.

◆ center() [2/6]

template<short N>
Vec3s coal::KDOP< N >::center ( ) const
inline

The (AABB) center.

◆ center() [3/6]

const Vec3s& coal::kIOS::center ( ) const
inline

Center of the kIOS.

◆ center() [4/6]

const Vec3s& coal::OBB::center ( ) const
inline

Center of the OBB.

◆ center() [5/6]

const Vec3s& coal::OBBRSS::center ( ) const
inline

Center of the OBBRSS.

◆ center() [6/6]

const Vec3s& coal::RSS::center ( ) const
inline

The RSS center.

◆ contain() [1/6]

bool coal::AABB::contain ( const AABB other) const
inline

Check whether the AABB contains another AABB.

◆ contain() [2/6]

bool coal::AABB::contain ( const Vec3s p) const
inline

Check whether the AABB contains a point.

◆ contain() [3/6]

bool coal::kIOS::contain ( const Vec3s p) const

Check whether the kIOS contains a point.

◆ contain() [4/6]

bool coal::OBB::contain ( const Vec3s p) const

Check whether the OBB contains a point.

◆ contain() [5/6]

bool coal::OBBRSS::contain ( const Vec3s p) const
inline

Check whether the OBBRSS contains a point.

◆ contain() [6/6]

bool coal::RSS::contain ( const Vec3s p) const

Check whether the RSS contains a point.

◆ depth() [1/6]

Scalar coal::AABB::depth ( ) const
inline

Depth of the AABB.

◆ depth() [2/6]

template<short N>
Scalar coal::KDOP< N >::depth ( ) const
inline

The (AABB) depth.

◆ depth() [3/6]

Scalar coal::kIOS::depth ( ) const

Depth of the kIOS.

◆ depth() [4/6]

Scalar coal::OBB::depth ( ) const
inline

Depth of the OBB.

◆ depth() [5/6]

Scalar coal::OBBRSS::depth ( ) const
inline

Depth of the OBBRSS.

◆ depth() [6/6]

Scalar coal::RSS::depth ( ) const
inline

Depth of the RSS.

◆ dist() [1/2]

template<short N>
Scalar& coal::KDOP< N >::dist ( short  i)
inline

◆ dist() [2/2]

template<short N>
Scalar coal::KDOP< N >::dist ( short  i) const
inline

◆ distance() [1/10]

Scalar coal::AABB::distance ( const AABB other) const

Distance between two AABBs.

◆ distance() [2/10]

Scalar coal::AABB::distance ( const AABB other,
Vec3s P,
Vec3s Q 
) const

Distance between two AABBs; P and Q, should not be NULL, return the nearest points.

◆ distance() [3/10]

template<short N>
Scalar coal::KDOP< N >::distance ( const KDOP< N > &  other,
Vec3s P = NULL,
Vec3s Q = NULL 
) const

The distance between two KDOP<N>. Not implemented.

◆ distance() [4/10]

Scalar coal::kIOS::distance ( const kIOS other,
Vec3s P = NULL,
Vec3s Q = NULL 
) const

The distance between two kIOS.

◆ distance() [5/10]

Scalar coal::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.

Todo:
P and Q is not returned, need implementation

◆ distance() [6/10]

Scalar coal::distance ( const Matrix3s R0,
const Vec3s T0,
const OBBRSS b1,
const OBBRSS b2,
Vec3s P = NULL,
Vec3s Q = NULL 
)
inline

Computate distance between two OBBRSS, b1 is in configuation (R0, T0) and b2 is in indentity; P and Q, is not NULL, returns the nearest points.

◆ distance() [7/10]

Scalar coal::distance ( const Matrix3s R0,
const Vec3s T0,
const RSS b1,
const RSS b2,
Vec3s P = NULL,
Vec3s Q = NULL 
)

distance between two RSS bounding volumes P and Q (optional return values) are the closest points in the rectangles, not the RSS. But the direction P - Q is the correct direction for cloest points Notice that P and Q are both in the local frame of the first RSS (not global frame and not even the local frame of object 1)

◆ distance() [8/10]

Scalar coal::OBB::distance ( const OBB other,
Vec3s P = NULL,
Vec3s Q = NULL 
) const

Distance between two OBBs, not implemented.

◆ distance() [9/10]

Scalar coal::OBBRSS::distance ( const OBBRSS other,
Vec3s P = NULL,
Vec3s Q = NULL 
) const
inline

Distance between two OBBRSS; P and Q , is not NULL, returns the nearest points.

◆ distance() [10/10]

Scalar coal::RSS::distance ( const RSS other,
Vec3s P = NULL,
Vec3s Q = NULL 
) const

the distance between two RSS; P and Q, if not NULL, return the nearest points

◆ expand() [1/3]

AABB& coal::AABB::expand ( const AABB core,
Scalar  ratio 
)
inline

expand the aabb by increase the thickness of the plate by a ratio

◆ expand() [2/3]

AABB& coal::AABB::expand ( const Scalar  delta)
inline

expand the half size of the AABB by a scalar delta, and keep the center unchanged.

◆ expand() [3/3]

AABB& coal::AABB::expand ( const Vec3s delta)
inline

expand the half size of the AABB by delta, and keep the center unchanged.

◆ height() [1/6]

Scalar coal::AABB::height ( ) const
inline

Height of the AABB.

◆ height() [2/6]

template<short N>
Scalar coal::KDOP< N >::height ( ) const
inline

The (AABB) height.

◆ height() [3/6]

Scalar coal::kIOS::height ( ) const

Height of the kIOS.

◆ height() [4/6]

Scalar coal::OBB::height ( ) const
inline

Height of the OBB.

◆ height() [5/6]

Scalar coal::OBBRSS::height ( ) const
inline

Height of the OBBRSS.

◆ height() [6/6]

Scalar coal::RSS::height ( ) const
inline

Height of the RSS.

◆ inside()

template<short N>
bool coal::KDOP< N >::inside ( const Vec3s p) const

◆ KDOP() [1/3]

template<short N>
EIGEN_MAKE_ALIGNED_OPERATOR_NEW coal::KDOP< N >::KDOP ( )

Creating kDOP containing nothing.

◆ KDOP() [2/3]

template<short N>
coal::KDOP< N >::KDOP ( const Vec3s a,
const Vec3s b 
)

Creating kDOP containing two points.

◆ KDOP() [3/3]

template<short N>
coal::KDOP< N >::KDOP ( const Vec3s v)

Creating kDOP containing only one point.

◆ OBB()

coal::OBB::OBB ( )
inline

◆ obbDisjoint()

bool coal::obbDisjoint ( const Matrix3s B,
const Vec3s T,
const Vec3s a,
const Vec3s b 
)

Check collision between two boxes

Parameters
B,Torientation and position of first box,
ahalf dimensions of first box,
bhalf dimensions of second box. The second box is in identity configuration.

◆ operator!=() [1/7]

bool coal::AABB::operator!= ( const AABB other) const
inline

◆ operator!=() [2/7]

template<short N>
bool coal::KDOP< N >::operator!= ( const KDOP< N > &  other) const
inline

Difference operator.

◆ operator!=() [3/7]

bool coal::kIOS::operator!= ( const kIOS other) const
inline

Difference operator.

◆ operator!=() [4/7]

bool coal::kIOS::kIOS_Sphere::operator!= ( const kIOS_Sphere &  other) const
inline

◆ operator!=() [5/7]

bool coal::OBB::operator!= ( const OBB other) const
inline

Difference operator.

◆ operator!=() [6/7]

bool coal::OBBRSS::operator!= ( const OBBRSS other) const
inline

Difference operator.

◆ operator!=() [7/7]

bool coal::RSS::operator!= ( const RSS other) const
inline

Difference operator.

◆ operator+() [1/6]

AABB coal::AABB::operator+ ( const AABB other) const
inline

Return the merged AABB of current AABB and the other one.

◆ operator+() [2/6]

template<short N>
KDOP<N> coal::KDOP< N >::operator+ ( const KDOP< N > &  other) const

Create a KDOP by mergin two KDOPs.

◆ operator+() [3/6]

kIOS coal::kIOS::operator+ ( const kIOS other) const

Return the merged kIOS of current kIOS and the other one.

◆ operator+() [4/6]

OBB coal::OBB::operator+ ( const OBB other) const

Return the merged OBB of current OBB and the other one (the result is not compact).

◆ operator+() [5/6]

OBBRSS coal::OBBRSS::operator+ ( const OBBRSS other) const
inline

Merge two OBBRSS.

◆ operator+() [6/6]

RSS coal::RSS::operator+ ( const RSS other) const

Return the merged RSS of current RSS and the other one.

◆ operator+=() [1/12]

AABB& coal::AABB::operator+= ( const AABB other)
inline

Merge the AABB and another AABB.

◆ operator+=() [2/12]

template<short N>
KDOP<N>& coal::KDOP< N >::operator+= ( const KDOP< N > &  other)

Merge two KDOPs.

◆ operator+=() [3/12]

kIOS& coal::kIOS::operator+= ( const kIOS other)
inline

Merge the kIOS and another kIOS.

◆ operator+=() [4/12]

OBB& coal::OBB::operator+= ( const OBB other)
inline

Merge the OBB and another OBB (the result is not compact).

◆ operator+=() [5/12]

OBBRSS& coal::OBBRSS::operator+= ( const OBBRSS other)
inline

Merge two OBBRSS.

◆ operator+=() [6/12]

RSS& coal::RSS::operator+= ( const RSS other)
inline

Merge the RSS and another RSS.

◆ operator+=() [7/12]

AABB& coal::AABB::operator+= ( const Vec3s p)
inline

Merge the AABB and a point.

◆ operator+=() [8/12]

template<short N>
KDOP<N>& coal::KDOP< N >::operator+= ( const Vec3s p)

Merge the point and the KDOP.

◆ operator+=() [9/12]

kIOS& coal::kIOS::operator+= ( const Vec3s p)

A simple way to merge the kIOS and a point.

◆ operator+=() [10/12]

OBB& coal::OBB::operator+= ( const Vec3s p)

A simple way to merge the OBB and a point (the result is not compact).

◆ operator+=() [11/12]

OBBRSS& coal::OBBRSS::operator+= ( const Vec3s p)
inline

Merge the OBBRSS and a point.

◆ operator+=() [12/12]

RSS& coal::RSS::operator+= ( const Vec3s p)

A simple way to merge the RSS and a point, not compact.

Todo:
This function may have some bug.

◆ operator=()

AABB& coal::AABB::operator= ( const AABB other)
default

◆ operator==() [1/7]

bool coal::AABB::operator== ( const AABB other) const
inline

Comparison operator.

◆ operator==() [2/7]

template<short N>
bool coal::KDOP< N >::operator== ( const KDOP< N > &  other) const
inline

Equality operator.

◆ operator==() [3/7]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW bool coal::kIOS::operator== ( const kIOS other) const
inline

Equality operator.

◆ operator==() [4/7]

bool coal::kIOS::kIOS_Sphere::operator== ( const kIOS_Sphere &  other) const
inline

◆ operator==() [5/7]

bool coal::OBB::operator== ( const OBB other) const
inline

Equality operator.

◆ operator==() [6/7]

bool coal::OBBRSS::operator== ( const OBBRSS other) const
inline

Equality operator.

◆ operator==() [7/7]

bool coal::RSS::operator== ( const RSS other) const
inline

Equality operator.

◆ overlap() [1/28]

bool coal::AABB::overlap ( const AABB other) const
inline

Check whether two AABB are overlap.

◆ overlap() [2/28]

bool coal::AABB::overlap ( const AABB other,
AABB overlap_part 
) const
inline

Check whether two AABB are overlap and return the overlap part.

◆ overlap() [3/28]

bool coal::AABB::overlap ( const AABB other,
const CollisionRequest request,
Scalar sqrDistLowerBound 
) const

Check whether two AABB are overlap.

◆ overlap() [4/28]

bool coal::AABB::overlap ( const Halfspace hs) const

Check whether AABB overlaps a halfspace.

◆ overlap() [5/28]

template<short N>
bool coal::KDOP< N >::overlap ( const KDOP< N > &  other) const

Check whether two KDOPs overlap.

◆ overlap() [6/28]

template<short N>
bool coal::KDOP< N >::overlap ( const KDOP< N > &  other,
const CollisionRequest request,
Scalar sqrDistLowerBound 
) const

Check whether two KDOPs overlap.

Returns
true if collision happens.
Return values
sqrDistLowerBoundsquared lower bound on distance between boxes if they do not overlap.

◆ overlap() [7/28]

bool coal::kIOS::overlap ( const kIOS other) const

Check collision between two kIOS.

◆ overlap() [8/28]

bool coal::kIOS::overlap ( const kIOS other,
const CollisionRequest ,
Scalar sqrDistLowerBound 
) const

Check collision between two kIOS.

◆ overlap() [9/28]

template<short N>
bool coal::overlap ( const Matrix3s ,
const Vec3s ,
const KDOP< N > &  ,
const KDOP< N > &   
)

◆ overlap() [10/28]

template<short N>
bool coal::overlap ( const Matrix3s ,
const Vec3s ,
const KDOP< N > &  ,
const KDOP< N > &  ,
const CollisionRequest ,
Scalar  
)

◆ overlap() [11/28]

bool coal::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.

◆ overlap() [12/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const AABB b1,
const AABB b2,
const CollisionRequest request,
Scalar sqrDistLowerBound 
)

Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.

◆ overlap() [13/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const kIOS b1,
const kIOS b2 
)

Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.

Todo:
Not efficient

◆ overlap() [14/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const kIOS b1,
const kIOS b2,
const CollisionRequest request,
Scalar sqrDistLowerBound 
)

Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.

Todo:
Not efficient

◆ overlap() [15/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const OBB b1,
const OBB b2 
)

Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity.

◆ overlap() [16/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const OBB b1,
const OBB b2,
const CollisionRequest request,
Scalar sqrDistLowerBound 
)

Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity.

◆ overlap() [17/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const OBBRSS b1,
const OBBRSS b2 
)
inline

Check collision between two OBBRSS, b1 is in configuration (R0, T0) and b2 is in indentity.

◆ overlap() [18/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const OBBRSS b1,
const OBBRSS b2,
const CollisionRequest request,
Scalar sqrDistLowerBound 
)
inline

Check collision between two OBBRSS

Parameters
R0,T0configuration of b1
b1first OBBRSS in configuration (R0, T0)
b2second OBBRSS in identity position
Return values
sqrDistLowerBoundsquared lower bound on the distance if OBBRSS do not overlap.

◆ overlap() [19/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const RSS b1,
const RSS b2 
)

Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity.

◆ overlap() [20/28]

bool coal::overlap ( const Matrix3s R0,
const Vec3s T0,
const RSS b1,
const RSS b2,
const CollisionRequest request,
Scalar sqrDistLowerBound 
)

Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity.

◆ overlap() [21/28]

bool coal::OBB::overlap ( const OBB other) const

Check collision between two OBB

Returns
true if collision happens.

◆ overlap() [22/28]

bool coal::OBB::overlap ( const OBB other,
const CollisionRequest request,
Scalar sqrDistLowerBound 
) const

Check collision between two OBB

Returns
true if collision happens.
Return values
sqrDistLowerBoundsquared lower bound on distance between boxes if they do not overlap.

◆ overlap() [23/28]

bool coal::OBBRSS::overlap ( const OBBRSS other) const
inline

Check collision between two OBBRSS.

◆ overlap() [24/28]

bool coal::OBBRSS::overlap ( const OBBRSS other,
const CollisionRequest request,
Scalar sqrDistLowerBound 
) const
inline

Check collision between two OBBRSS

Return values
sqrDistLowerBoundsquared lower bound on distance between objects if they do not overlap.

◆ overlap() [25/28]

bool coal::AABB::overlap ( const Plane p) const

Check whether AABB overlaps a plane.

◆ overlap() [26/28]

bool coal::RSS::overlap ( const RSS other) const

Check collision between two RSS.

◆ overlap() [27/28]

bool coal::RSS::overlap ( const RSS other,
const CollisionRequest ,
Scalar sqrDistLowerBound 
) const
inline

Not implemented.

◆ overlap() [28/28]

bool coal::RSS::overlap ( const RSS other,
RSS  
) const
inline

Check collision between two RSS and return the overlap part. For RSS, we return nothing, as the overlap part of two RSSs usually is not a RSS.

◆ RSS()

coal::RSS::RSS ( )
inline

 

Default constructor with default values

◆ size() [1/6]

Scalar coal::AABB::size ( ) const
inline

Size of the AABB (used in BV_Splitter to order two AABBs)

◆ size() [2/6]

template<short N>
Scalar coal::KDOP< N >::size ( ) const
inline

Size of the kDOP (used in BV_Splitter to order two kDOPs)

◆ size() [3/6]

Scalar coal::kIOS::size ( ) const

size of the kIOS (used in BV_Splitter to order two kIOSs)

◆ size() [4/6]

Scalar coal::OBB::size ( ) const
inline

Size of the OBB (used in BV_Splitter to order two OBBs)

◆ size() [5/6]

Scalar coal::OBBRSS::size ( ) const
inline

Size of the OBBRSS (used in BV_Splitter to order two OBBRSS)

◆ size() [6/6]

Scalar coal::RSS::size ( ) const
inline

Size of the RSS (used in BV_Splitter to order two RSSs)

◆ translate() [1/3]

template<short N>
KDOP<N> coal::translate ( const KDOP< N > &  bv,
const Vec3s t 
)

translate the KDOP BV

◆ translate() [2/3]

kIOS coal::translate ( const kIOS bv,
const Vec3s t 
)

Translate the kIOS BV.

◆ translate() [3/3]

OBB coal::translate ( const OBB bv,
const Vec3s t 
)

Translate the OBB bv.

◆ update()

AABB& coal::AABB::update ( const Vec3s a,
const Vec3s b 
)
inline

◆ volume() [1/6]

Scalar coal::AABB::volume ( ) const
inline

Volume of the AABB.

◆ volume() [2/6]

template<short N>
Scalar coal::KDOP< N >::volume ( ) const
inline

The (AABB) volume.

◆ volume() [3/6]

Scalar coal::kIOS::volume ( ) const

Volume of the kIOS.

◆ volume() [4/6]

Scalar coal::OBB::volume ( ) const
inline

Volume of the OBB.

◆ volume() [5/6]

Scalar coal::OBBRSS::volume ( ) const
inline

Volume of the OBBRSS.

◆ volume() [6/6]

Scalar coal::RSS::volume ( ) const
inline

Volume of the RSS.

◆ width() [1/6]

Scalar coal::AABB::width ( ) const
inline

Width of the AABB.

◆ width() [2/6]

template<short N>
Scalar coal::KDOP< N >::width ( ) const
inline

The (AABB) width.

◆ width() [3/6]

Scalar coal::kIOS::width ( ) const

Width of the kIOS.

◆ width() [4/6]

Scalar coal::OBB::width ( ) const
inline

Width of the OBB.

◆ width() [5/6]

Scalar coal::OBBRSS::width ( ) const
inline

Width of the OBRSS.

◆ width() [6/6]

Scalar coal::RSS::width ( ) const
inline

Width of the RSS.

Variable Documentation

◆ axes [1/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s coal::OBB::axes

Orientation of OBB. axis[i] is the ith column of the orientation matrix for the box; it is also the i-th principle direction of the box. We assume that axis[0] corresponds to the axis with the longest box edge, axis[1] corresponds to the shorter one and axis[2] corresponds to the shortest one.

◆ axes [2/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s coal::RSS::axes

Orientation of RSS. axis[i] is the ith column of the orientation matrix for the RSS; it is also the i-th principle direction of the RSS. We assume that axis[0] corresponds to the axis with the longest length, axis[1] corresponds to the shorter one and axis[2] corresponds to the shortest one.

◆ dist_

template<short N>
Eigen::Array<Scalar, N, 1> coal::KDOP< N >::dist_
protected

Origin's distances to N KDOP planes.

◆ extent

Vec3s coal::OBB::extent

Half dimensions of OBB.

◆ length

Scalar coal::RSS::length[2]

Side lengths of rectangle.

◆ max_

Vec3s coal::AABB::max_

The max point in the AABB.

◆ max_num_spheres

constexpr size_t coal::kIOS::max_num_spheres = 5
staticconstexpr

◆ min_

Vec3s coal::AABB::min_

The min point in the AABB.

◆ num_spheres

unsigned int coal::kIOS::num_spheres

The number of spheres, no larger than 5.

◆ o

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3s coal::kIOS::kIOS_Sphere::o

◆ obb [1/2]

OBB coal::kIOS::obb

@ OBB related with kIOS

◆ obb [2/2]

EIGEN_MAKE_ALIGNED_OPERATOR_NEW OBB coal::OBBRSS::obb

OBB member, for rotation.

◆ r

Scalar coal::kIOS::kIOS_Sphere::r

◆ radius

Scalar coal::RSS::radius

Radius of sphere summed with rectangle to form RSS.

◆ rss

RSS coal::OBBRSS::rss

RSS member, for distance.

◆ spheres

kIOS_Sphere coal::kIOS::spheres[max_num_spheres]

The (at most) five spheres for intersection.

◆ To

Vec3s coal::OBB::To

Center of OBB.

◆ Tr

Vec3s coal::RSS::Tr

Origin of the rectangle in RSS.