coal 3.0.2
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
Loading...
Searching...
No Matches
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)
 coal::AABB::AABB (const Vec3s &v)
 Creating an AABB at position v with zero size.
 coal::AABB::AABB (const Vec3s &a, const Vec3s &b)
 Creating an AABB with two endpoints a and b.
 coal::AABB::AABB (const AABB &core, const Vec3s &delta)
 Creating an AABB centered as core and is of half-dimension delta.
 coal::AABB::AABB (const Vec3s &a, const Vec3s &b, const Vec3s &c)
 Creating an AABB contains three points.
 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.
bool coal::AABB::operator!= (const AABB &other) const
bool coal::AABB::contain (const AABB &other) const
 Check whether the AABB contains another AABB.
bool coal::AABB::overlap (const AABB &other, AABB &overlap_part) const
 Check whether two AABB are overlap and return the overlap part.
bool coal::AABB::axisOverlap (const AABB &other, int axis_id) const
 Check whether two AABB are overlapped along specific axis.
AABBcoal::AABB::expand (const Vec3s &delta)
 expand the half size of the AABB by delta, and keep the center unchanged.
AABBcoal::AABB::expand (const CoalScalar delta)
 expand the half size of the AABB by a scalar delta, and keep the center unchanged.
AABBcoal::AABB::expand (const AABB &core, CoalScalar ratio)
 expand the aabb by increase the thickness of the plate by a ratio
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.
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const AABB &b1, const AABB &b2, const CollisionRequest &request, CoalScalar &sqrDistLowerBound)
 Check collision between two aabbs, b1 is in configuration (R0, T0) and b2 is in identity.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW coal::KDOP< N >::KDOP ()
 Creating kDOP containing nothing.
 coal::KDOP< N >::KDOP (const Vec3s &v)
 Creating kDOP containing only one point.
 coal::KDOP< N >::KDOP (const Vec3s &a, const Vec3s &b)
 Creating kDOP containing two points.
bool coal::KDOP< N >::operator== (const KDOP &other) const
 Equality operator.
bool coal::KDOP< N >::operator!= (const KDOP &other) const
 Difference operator.
bool coal::KDOP< N >::overlap (const KDOP< N > &other) const
 Check whether two KDOPs overlap.
bool coal::KDOP< N >::overlap (const KDOP< N > &other, const CollisionRequest &request, CoalScalar &sqrDistLowerBound) const
 Check whether two KDOPs overlap.
CoalScalar coal::KDOP< N >::distance (const KDOP< N > &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 The distance between two KDOP<N>. Not implemented.
KDOP< N > & coal::KDOP< N >::operator+= (const Vec3s &p)
 Merge the point and the KDOP.
KDOP< N > & coal::KDOP< N >::operator+= (const KDOP< N > &other)
 Merge two KDOPs.
KDOP< N > coal::KDOP< N >::operator+ (const KDOP< N > &other) const
 Create a KDOP by mergin two KDOPs.
CoalScalar coal::KDOP< N >::size () const
 Size of the kDOP (used in BV_Splitter to order two kDOPs)
Vec3s coal::KDOP< N >::center () const
 The (AABB) center.
CoalScalar coal::KDOP< N >::width () const
 The (AABB) width.
CoalScalar coal::KDOP< N >::height () const
 The (AABB) height.
CoalScalar coal::KDOP< N >::depth () const
 The (AABB) depth.
CoalScalar coal::KDOP< N >::volume () const
 The (AABB) volume.
CoalScalar coal::KDOP< N >::dist (short i) const
CoalScalarcoal::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 &, CoalScalar &)
template<short N>
KDOP< N > coal::translate (const KDOP< N > &bv, const Vec3s &t)
 translate the KDOP BV
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.
bool coal::kIOS::operator!= (const kIOS &other) const
 Difference operator.
bool coal::kIOS::contain (const Vec3s &p) const
 Check whether the kIOS contains a point.
bool coal::kIOS::overlap (const kIOS &other) const
 Check collision between two kIOS.
bool coal::kIOS::overlap (const kIOS &other, const CollisionRequest &, CoalScalar &sqrDistLowerBound) const
 Check collision between two kIOS.
CoalScalar coal::kIOS::distance (const kIOS &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 The distance between two kIOS.
kIOScoal::kIOS::operator+= (const Vec3s &p)
 A simple way to merge the kIOS and a point.
kIOScoal::kIOS::operator+= (const kIOS &other)
 Merge the kIOS and another kIOS.
kIOS coal::kIOS::operator+ (const kIOS &other) const
 Return the merged kIOS of current kIOS and the other one.
CoalScalar coal::kIOS::size () const
 size of the kIOS (used in BV_Splitter to order two kIOSs)
const Vec3scoal::kIOS::center () const
 Center of the kIOS.
CoalScalar coal::kIOS::width () const
 Width of the kIOS.
CoalScalar coal::kIOS::height () const
 Height of the kIOS.
CoalScalar coal::kIOS::depth () const
 Depth of the kIOS.
CoalScalar coal::kIOS::volume () const
 Volume of the kIOS.
kIOS coal::translate (const kIOS &bv, const Vec3s &t)
 Translate the kIOS BV.
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.
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const kIOS &b1, const kIOS &b2, const CollisionRequest &request, CoalScalar &sqrDistLowerBound)
 Check collision between two kIOSs, b1 is in configuration (R0, T0) and b2 is in identity.
CoalScalar 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.
 coal::OBB::OBB ()
bool coal::OBB::operator== (const OBB &other) const
 Equality operator.
bool coal::OBB::operator!= (const OBB &other) const
 Difference operator.
bool coal::OBB::contain (const Vec3s &p) const
 Check whether the OBB contains a point.
bool coal::OBB::overlap (const OBB &other) const
bool coal::OBB::overlap (const OBB &other, const CollisionRequest &request, CoalScalar &sqrDistLowerBound) const
CoalScalar coal::OBB::distance (const OBB &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 Distance between two OBBs, not implemented.
OBBcoal::OBB::operator+= (const Vec3s &p)
 A simple way to merge the OBB and a point (the result is not compact).
OBBcoal::OBB::operator+= (const OBB &other)
 Merge the OBB and another OBB (the result is not compact).
OBB coal::OBB::operator+ (const OBB &other) const
 Return the merged OBB of current OBB and the other one (the result is not compact).
CoalScalar coal::OBB::size () const
 Size of the OBB (used in BV_Splitter to order two OBBs)
const Vec3scoal::OBB::center () const
 Center of the OBB.
CoalScalar coal::OBB::width () const
 Width of the OBB.
CoalScalar coal::OBB::height () const
 Height of the OBB.
CoalScalar coal::OBB::depth () const
 Depth of the OBB.
CoalScalar coal::OBB::volume () const
 Volume of the OBB.
OBB coal::translate (const OBB &bv, const Vec3s &t)
 Translate the OBB bv.
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.
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBB &b1, const OBB &b2, const CollisionRequest &request, CoalScalar &sqrDistLowerBound)
 Check collision between two obbs, b1 is in configuration (R0, T0) and b2 is in identity.
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.
bool coal::OBBRSS::operator!= (const OBBRSS &other) const
 Difference operator.
bool coal::OBBRSS::contain (const Vec3s &p) const
 Check whether the OBBRSS contains a point.
bool coal::OBBRSS::overlap (const OBBRSS &other) const
 Check collision between two OBBRSS.
bool coal::OBBRSS::overlap (const OBBRSS &other, const CollisionRequest &request, CoalScalar &sqrDistLowerBound) const
CoalScalar 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.
OBBRSScoal::OBBRSS::operator+= (const Vec3s &p)
 Merge the OBBRSS and a point.
OBBRSScoal::OBBRSS::operator+= (const OBBRSS &other)
 Merge two OBBRSS.
OBBRSS coal::OBBRSS::operator+ (const OBBRSS &other) const
 Merge two OBBRSS.
CoalScalar coal::OBBRSS::size () const
 Size of the OBBRSS (used in BV_Splitter to order two OBBRSS)
const Vec3scoal::OBBRSS::center () const
 Center of the OBBRSS.
CoalScalar coal::OBBRSS::width () const
 Width of the OBRSS.
CoalScalar coal::OBBRSS::height () const
 Height of the OBBRSS.
CoalScalar coal::OBBRSS::depth () const
 Depth of the OBBRSS.
CoalScalar coal::OBBRSS::volume () const
 Volume of the OBBRSS.
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.
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const OBBRSS &b1, const OBBRSS &b2, const CollisionRequest &request, CoalScalar &sqrDistLowerBound)
CoalScalar 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.
 coal::RSS::RSS ()
  
bool coal::RSS::operator== (const RSS &other) const
 Equality operator.
bool coal::RSS::operator!= (const RSS &other) const
 Difference operator.
bool coal::RSS::contain (const Vec3s &p) const
 Check whether the RSS contains a point.
bool coal::RSS::overlap (const RSS &other) const
 Check collision between two RSS.
bool coal::RSS::overlap (const RSS &other, const CollisionRequest &, CoalScalar &sqrDistLowerBound) const
 Not implemented.
CoalScalar 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
RSScoal::RSS::operator+= (const Vec3s &p)
 A simple way to merge the RSS and a point, not compact.
RSScoal::RSS::operator+= (const RSS &other)
 Merge the RSS and another RSS.
RSS coal::RSS::operator+ (const RSS &other) const
 Return the merged RSS of current RSS and the other one.
CoalScalar coal::RSS::size () const
 Size of the RSS (used in BV_Splitter to order two RSSs)
const Vec3scoal::RSS::center () const
 The RSS center.
CoalScalar coal::RSS::width () const
 Width of the RSS.
CoalScalar coal::RSS::height () const
 Height of the RSS.
CoalScalar coal::RSS::depth () const
 Depth of the RSS.
CoalScalar coal::RSS::volume () const
 Volume of the RSS.
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.
CoalScalar 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)
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.
bool coal::overlap (const Matrix3s &R0, const Vec3s &T0, const RSS &b1, const RSS &b2, const CollisionRequest &request, CoalScalar &sqrDistLowerBound)
 Check collision between two RSSs, b1 is in configuration (R0, T0) and b2 is in identity.

Variables

Vec3s coal::AABB::min_
 The min point in the AABB.
Vec3s coal::AABB::max_
 The max point in the AABB.
Eigen::Array< CoalScalar, N, 1 > coal::KDOP< N >::dist_
 Origin's distances to N KDOP planes.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW Vec3s coal::kIOS::kIOS_Sphere::o
CoalScalar 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.
unsigned int coal::kIOS::num_spheres
 The number of spheres, no larger than 5.
OBB coal::kIOS::obb
 @ OBB related with kIOS
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.
Vec3s coal::OBB::To
 Center of OBB.
Vec3s coal::OBB::extent
 Half dimensions of OBB.
EIGEN_MAKE_ALIGNED_OPERATOR_NEW OBB coal::OBBRSS::obb
 OBB member, for rotation.
RSS coal::OBBRSS::rss
 RSS member, for distance.
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.
Vec3s coal::RSS::Tr
 Origin of the rectangle in RSS.
CoalScalar coal::RSS::length [2]
 Side lengths of rectangle.
CoalScalar coal::RSS::radius
 Radius of sphere summed with rectangle to form RSS.

Bounding volume API

Common API to BVs.

bool coal::AABB::contain (const Vec3s &p) const
 Check whether the AABB contains a point.
bool coal::AABB::overlap (const AABB &other) const
 Check whether two AABB are overlap.
bool coal::AABB::overlap (const Plane &p) const
 Check whether AABB overlaps a plane.
bool coal::AABB::overlap (const Halfspace &hs) const
 Check whether AABB overlaps a halfspace.
bool coal::AABB::overlap (const AABB &other, const CollisionRequest &request, CoalScalar &sqrDistLowerBound) const
 Check whether two AABB are overlap.
CoalScalar coal::AABB::distance (const AABB &other) const
 Distance between two AABBs.
CoalScalar 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.
AABBcoal::AABB::operator+= (const Vec3s &p)
 Merge the AABB and a point.
AABBcoal::AABB::operator+= (const AABB &other)
 Merge the AABB and another AABB.
AABB coal::AABB::operator+ (const AABB &other) const
 Return the merged AABB of current AABB and the other one.
CoalScalar coal::AABB::size () const
 Size of the AABB (used in BV_Splitter to order two AABBs)
Vec3s coal::AABB::center () const
 Center of the AABB.
CoalScalar coal::AABB::width () const
 Width of the AABB.
CoalScalar coal::AABB::height () const
 Height of the AABB.
CoalScalar coal::AABB::depth () const
 Depth of the AABB.
CoalScalar coal::AABB::volume () const
 Volume of the AABB.

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,
intaxis_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]

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

Depth of the AABB.

◆ depth() [2/6]

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

The (AABB) depth.

◆ depth() [3/6]

CoalScalar coal::kIOS::depth()const

Depth of the kIOS.

◆ depth() [4/6]

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

Depth of the OBB.

◆ depth() [5/6]

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

Depth of the OBBRSS.

◆ depth() [6/6]

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

Depth of the RSS.

◆ dist() [1/2]

template<short N>
CoalScalar & coal::KDOP< N >::dist(shorti)
inline

◆ dist() [2/2]

template<short N>
CoalScalar coal::KDOP< N >::dist(shorti)const
inline

◆ distance() [1/10]

CoalScalar coal::AABB::distance(const AABB &other)const

Distance between two AABBs.

◆ distance() [2/10]

CoalScalar 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]

CoalScalar 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() [4/10]

CoalScalar 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() [5/10]

CoalScalar 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() [6/10]

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

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

◆ distance() [7/10]

CoalScalar coal::kIOS::distance(const kIOS &other,
Vec3s *P = NULL,
Vec3s *Q = NULL ) const

The distance between two kIOS.

◆ distance() [8/10]

CoalScalar coal::OBB::distance(const OBB &other,
Vec3s *P = NULL,
Vec3s *Q = NULL ) const

Distance between two OBBs, not implemented.

◆ distance() [9/10]

CoalScalar 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]

CoalScalar 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,
CoalScalarratio )
inline

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

◆ expand() [2/3]

AABB & coal::AABB::expand(const CoalScalardelta)
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]

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

Height of the AABB.

◆ height() [2/6]

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

The (AABB) height.

◆ height() [3/6]

CoalScalar coal::kIOS::height()const

Height of the kIOS.

◆ height() [4/6]

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

Height of the OBB.

◆ height() [5/6]

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

Height of the OBBRSS.

◆ height() [6/6]

CoalScalar 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::kIOS_Sphere::operator!=(const kIOS_Sphere &other)const
inline

◆ operator!=() [4/7]

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

Difference operator.

◆ 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]

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

Merge the AABB and a point.

◆ operator+=() [3/12]

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

Merge two KDOPs.

◆ operator+=() [4/12]

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

Merge the point and the KDOP.

◆ operator+=() [5/12]

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

Merge the kIOS and another kIOS.

◆ operator+=() [6/12]

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

A simple way to merge the kIOS and a point.

◆ operator+=() [7/12]

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

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

◆ operator+=() [8/12]

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

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

◆ operator+=() [9/12]

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

Merge two OBBRSS.

◆ operator+=() [10/12]

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

Merge the OBBRSS and a point.

◆ operator+=() [11/12]

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

Merge the RSS and another RSS.

◆ 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]

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

◆ operator==() [4/7]

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

Equality operator.

◆ 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,
CoalScalar &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]

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

Check whether AABB overlaps a plane.

◆ overlap() [6/28]

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

Check whether two KDOPs overlap.

◆ overlap() [7/28]

template<short N>
bool coal::KDOP< N >::overlap(const KDOP< N > &other,
const CollisionRequest &request,
CoalScalar &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() [8/28]

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

Check collision between two kIOS.

◆ overlap() [9/28]

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

Check collision between two kIOS.

◆ overlap() [10/28]

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

Check collision between two OBB

Returns
true if collision happens.

◆ overlap() [11/28]

bool coal::OBB::overlap(const OBB &other,
const CollisionRequest &request,
CoalScalar &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() [12/28]

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

Check collision between two OBBRSS.

◆ overlap() [13/28]

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

Check collision between two OBBRSS

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

◆ overlap() [14/28]

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

◆ overlap() [15/28]

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

◆ overlap() [16/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() [17/28]

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

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

◆ overlap() [18/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() [19/28]

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

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

Todo
Not efficient

◆ overlap() [20/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() [21/28]

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

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

◆ overlap() [22/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() [23/28]

bool coal::overlap(const Matrix3s &R0,
const Vec3s &T0,
const OBBRSS &b1,
const OBBRSS &b2,
const CollisionRequest &request,
CoalScalar &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() [24/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() [25/28]

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

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

◆ 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 &,
CoalScalar &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]

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

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

◆ size() [2/6]

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

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

◆ size() [3/6]

CoalScalar coal::kIOS::size()const

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

◆ size() [4/6]

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

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

◆ size() [5/6]

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

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

◆ size() [6/6]

CoalScalar 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]

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

Volume of the AABB.

◆ volume() [2/6]

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

The (AABB) volume.

◆ volume() [3/6]

CoalScalar coal::kIOS::volume()const

Volume of the kIOS.

◆ volume() [4/6]

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

Volume of the OBB.

◆ volume() [5/6]

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

Volume of the OBBRSS.

◆ volume() [6/6]

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

Volume of the RSS.

◆ width() [1/6]

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

Width of the AABB.

◆ width() [2/6]

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

The (AABB) width.

◆ width() [3/6]

CoalScalar coal::kIOS::width()const

Width of the kIOS.

◆ width() [4/6]

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

Width of the OBB.

◆ width() [5/6]

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

Width of the OBRSS.

◆ width() [6/6]

CoalScalar 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<CoalScalar, N, 1> coal::KDOP< N >::dist_
protected

Origin's distances to N KDOP planes.

◆ extent

Vec3s coal::OBB::extent

Half dimensions of OBB.

◆ length

CoalScalar coal::RSS::length[2]

Side lengths of rectangle.

◆ max_

Vec3s coal::AABB::max_

The max point in the AABB.

◆ max_num_spheres

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

CoalScalar coal::kIOS::kIOS_Sphere::r

◆ radius

CoalScalar 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.