coal  3.0.1
Coal, The Collision Detection Library. Previously known as HPP-FCL, fork of FCL -- The Flexible Collision Library
coal::AABB Class Reference

A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points. More...

#include <coal/BV/AABB.h>

Public Member Functions

 AABB ()
 Creating an AABB with zero size (low bound +inf, upper bound -inf) More...
 
 AABB (const Vec3s &v)
 Creating an AABB at position v with zero size. More...
 
 AABB (const Vec3s &a, const Vec3s &b)
 Creating an AABB with two endpoints a and b. More...
 
 AABB (const AABB &core, const Vec3s &delta)
 Creating an AABB centered as core and is of half-dimension delta. More...
 
 AABB (const Vec3s &a, const Vec3s &b, const Vec3s &c)
 Creating an AABB contains three points. More...
 
 AABB (const AABB &other)=default
 
AABBoperator= (const AABB &other)=default
 
AABBupdate (const Vec3s &a, const Vec3s &b)
 
bool operator== (const AABB &other) const
 Comparison operator. More...
 
bool operator!= (const AABB &other) const
 
bool contain (const AABB &other) const
 Check whether the AABB contains another AABB. More...
 
bool overlap (const AABB &other, AABB &overlap_part) const
 Check whether two AABB are overlap and return the overlap part. More...
 
bool axisOverlap (const AABB &other, int axis_id) const
 Check whether two AABB are overlapped along specific axis. More...
 
AABBexpand (const Vec3s &delta)
 expand the half size of the AABB by delta, and keep the center unchanged. More...
 
AABBexpand (const Scalar delta)
 expand the half size of the AABB by a scalar delta, and keep the center unchanged. More...
 
AABBexpand (const AABB &core, Scalar ratio)
 expand the aabb by increase the thickness of the plate by a ratio More...
 
Bounding volume API

Common API to BVs.

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

Public Attributes

Vec3s min_
 The min point in the AABB. More...
 
Vec3s max_
 The max point in the AABB. More...
 

Detailed Description

A class describing the AABB collision structure, which is a box in 3D space determined by two diagonal points.

Constructor & Destructor 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 Vec3s v)
inline

Creating an AABB at position v with zero size.

◆ AABB() [3/6]

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

Creating an AABB with two endpoints a and b.

◆ AABB() [4/6]

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

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

◆ 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 AABB other)
default

Member Function Documentation

◆ axisOverlap()

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

Check whether two AABB are overlapped along specific axis.

◆ center()

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

Center of the AABB.

◆ contain() [1/2]

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

Check whether the AABB contains another AABB.

◆ contain() [2/2]

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

Check whether the AABB contains a point.

◆ depth()

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

Depth of the AABB.

◆ distance() [1/2]

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

Distance between two AABBs.

◆ distance() [2/2]

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.

◆ 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()

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

Height of the AABB.

◆ operator!=()

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

◆ operator+()

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

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

◆ operator+=() [1/2]

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

Merge the AABB and another AABB.

◆ operator+=() [2/2]

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

Merge the AABB and a point.

◆ operator=()

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

◆ operator==()

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

Comparison operator.

◆ overlap() [1/5]

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

Check whether two AABB are overlap.

◆ overlap() [2/5]

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/5]

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

Check whether two AABB are overlap.

◆ overlap() [4/5]

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

Check whether AABB overlaps a halfspace.

◆ overlap() [5/5]

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

Check whether AABB overlaps a plane.

◆ size()

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

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

◆ update()

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

◆ volume()

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

Volume of the AABB.

◆ width()

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

Width of the AABB.

Member Data Documentation

◆ max_

Vec3s coal::AABB::max_

The max point in the AABB.

◆ min_

Vec3s coal::AABB::min_

The min point in the AABB.


The documentation for this class was generated from the following file: