Public Member Functions | Public Attributes | List of all members
hpp::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>

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 &other, const CollisionRequest &, FCL_REAL &sqrDistLowerBound) 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

hpp::fcl::AABB::AABB ( )

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

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

Creating an AABB at position v with zero size.

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

Creating an AABB with two endpoints a and b.

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

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

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

Creating an AABB contains three points.

Member Function Documentation

bool hpp::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 hpp::fcl::AABB::center ( ) const
inline

Center of the AABB.

References distance().

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

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

Check whether the AABB contains another AABB.

References max_, and min_.

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

Check whether the AABB contains a point.

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

Depth of the AABB.

Referenced by volume().

FCL_REAL hpp::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 center(), and hpp::fcl::OcTreeSolver< NarrowPhaseSolver >::ShapeOcTreeDistance().

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

Distance between two AABBs.

bool hpp::fcl::AABB::equal ( const AABB other) const
inline

whether two AABB are equal

References hpp::fcl::isEqual(), max_, and min_.

AABB& hpp::fcl::AABB::expand ( const Vec3f delta)
inline

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

AABB& hpp::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 hpp::fcl::AABB::height ( ) const
inline

Height of the AABB.

Referenced by volume().

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

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

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

Merge the AABB and a point.

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

Merge the AABB and another AABB.

References max_, and min_.

bool hpp::fcl::AABB::overlap ( const AABB other) const
inline

Check whether two AABB are overlap.

References max_, and min_.

Referenced by overlap(), hpp::fcl::rotate(), and hpp::fcl::OcTreeSolver< NarrowPhaseSolver >::ShapeOcTreeDistance().

bool hpp::fcl::AABB::overlap ( const AABB other,
const CollisionRequest ,
FCL_REAL sqrDistLowerBound 
) const
inline

Not implemented.

References overlap().

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

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

References max_, min_, and overlap().

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

Radius of the AABB.

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

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

Referenced by hpp::fcl::OcTreeSolver< NarrowPhaseSolver >::ShapeOcTreeDistance().

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

Volume of the AABB.

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

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

Width of the AABB.

Referenced by volume().

Member Data Documentation

Vec3f hpp::fcl::AABB::max_
Vec3f hpp::fcl::AABB::min_