All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
fcl::AABB Class Reference

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

#include <hpp/fcl/BV/AABB.h>

Collaboration diagram for fcl::AABB:

Public Member Functions

 AABB ()
 Creating an AABB with zero size (low bound +inf, upper bound -inf) More...
 
 AABB (const Vec3f &v)
 Creating an AABB at position v with zero size. More...
 
 AABB (const Vec3f &a, const Vec3f &b)
 Creating an AABB with two endpoints a and b. More...
 
 AABB (const AABB &core, const Vec3f &delta)
 Creating an AABB centered as core and is of half-dimension delta. More...
 
 AABB (const Vec3f &a, const Vec3f &b, const Vec3f &c)
 Creating an AABB contains three points. More...
 
bool overlap (const AABB &other) const
 Check whether two AABB are overlap. More...
 
bool overlap (const AABB &, FCL_REAL &) const
 Not implemented. More...
 
bool contain (const AABB &other) const
 Check whether the AABB contains another AABB. More...
 
bool axisOverlap (const AABB &other, int axis_id) const
 Check whether two AABB are overlapped along specific axis. More...
 
bool overlap (const AABB &other, AABB &overlap_part) const
 Check whether two AABB are overlap and return the overlap part. More...
 
bool contain (const Vec3f &p) const
 Check whether the AABB contains a point. More...
 
AABBoperator+= (const Vec3f &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...
 
FCL_REAL width () const
 Width of the AABB. More...
 
FCL_REAL height () const
 Height of the AABB. More...
 
FCL_REAL depth () const
 Depth of the AABB. More...
 
FCL_REAL volume () const
 Volume of the AABB. More...
 
FCL_REAL size () const
 Size of the AABB (used in BV_Splitter to order two AABBs) More...
 
FCL_REAL radius () const
 Radius of the AABB. More...
 
Vec3f center () const
 Center of the AABB. More...
 
FCL_REAL distance (const AABB &other, Vec3f *P, Vec3f *Q) const
 Distance between two AABBs; P and Q, should not be NULL, return the nearest points. More...
 
FCL_REAL distance (const AABB &other) const
 Distance between two AABBs. More...
 
bool equal (const AABB &other) const
 whether two AABB are equal More...
 
AABBexpand (const Vec3f &delta)
 expand the half size of the AABB by delta, and keep the center unchanged. More...
 
AABBexpand (const AABB &core, FCL_REAL ratio)
 expand the aabb by increase the thickness of the plate by a ratio More...
 

Public Attributes

Vec3f min_
 The min point in the AABB. More...
 
Vec3f 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

fcl::AABB::AABB ( )

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

fcl::AABB::AABB ( const Vec3f v)
inline

Creating an AABB at position v with zero size.

fcl::AABB::AABB ( const Vec3f a,
const Vec3f b 
)
inline

Creating an AABB with two endpoints a and b.

fcl::AABB::AABB ( const AABB core,
const Vec3f delta 
)
inline

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

fcl::AABB::AABB ( const Vec3f a,
const Vec3f b,
const Vec3f c 
)
inline

Creating an AABB contains three points.

Member Function Documentation

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

Check whether two AABB are overlapped along specific axis.

References max_, and min_.

Vec3f fcl::AABB::center ( ) const
inline

Center of the AABB.

Referenced by fcl::OcTree::computeLocalAABB().

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

Check whether the AABB contains another AABB.

References max_, and min_.

bool fcl::AABB::contain ( const Vec3f p) const
inline

Check whether the AABB contains a point.

FCL_REAL fcl::AABB::depth ( ) const
inline

Depth of the AABB.

Referenced by fcl::SpatialHash::SpatialHash(), and volume().

FCL_REAL fcl::AABB::distance ( const AABB other,
Vec3f P,
Vec3f Q 
) const

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

Referenced by fcl::SpatialHashingCollisionManager< HashTable >::distance_().

FCL_REAL fcl::AABB::distance ( const AABB other) const

Distance between two AABBs.

bool fcl::AABB::equal ( const AABB other) const
inline
AABB& fcl::AABB::expand ( const Vec3f delta)
inline

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

Referenced by fcl::SpatialHashingCollisionManager< HashTable >::distance_().

AABB& fcl::AABB::expand ( const AABB core,
FCL_REAL  ratio 
)
inline

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

References max_, and min_.

FCL_REAL fcl::AABB::height ( ) const
inline

Height of the AABB.

Referenced by fcl::SpatialHash::SpatialHash(), and volume().

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

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

AABB& fcl::AABB::operator+= ( const Vec3f p)
inline

Merge the AABB and a point.

References fcl::Vec3fX< T >::lbound(), and fcl::Vec3fX< T >::ubound().

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

Merge the AABB and another AABB.

References fcl::Vec3fX< T >::lbound(), max_, min_, and fcl::Vec3fX< T >::ubound().

bool fcl::AABB::overlap ( const AABB ,
FCL_REAL  
) const
inline

Not implemented.

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

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

References fcl::max(), max_, fcl::min(), min_, and overlap().

FCL_REAL fcl::AABB::radius ( ) const
inline

Radius of the AABB.

FCL_REAL fcl::AABB::size ( ) const
inline

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

FCL_REAL fcl::AABB::volume ( ) const
inline

Volume of the AABB.

References depth(), height(), and width().

FCL_REAL fcl::AABB::width ( ) const
inline

Width of the AABB.

Referenced by fcl::SpatialHash::SpatialHash(), and volume().

Member Data Documentation