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

Oriented bounding box class. More...

#include <coal/BV/OBB.h>

Public Member Functions

 OBB ()
 
bool operator== (const OBB &other) const
 Equality operator. More...
 
bool operator!= (const OBB &other) const
 Difference operator. More...
 
bool contain (const Vec3s &p) const
 Check whether the OBB contains a point. More...
 
bool overlap (const OBB &other) const
 
bool overlap (const OBB &other, const CollisionRequest &request, Scalar &sqrDistLowerBound) const
 
Scalar distance (const OBB &other, Vec3s *P=NULL, Vec3s *Q=NULL) const
 Distance between two OBBs, not implemented. More...
 
OBBoperator+= (const Vec3s &p)
 A simple way to merge the OBB and a point (the result is not compact). More...
 
OBBoperator+= (const OBB &other)
 Merge the OBB and another OBB (the result is not compact). More...
 
OBB operator+ (const OBB &other) const
 Return the merged OBB of current OBB and the other one (the result is not compact). More...
 
Scalar size () const
 Size of the OBB (used in BV_Splitter to order two OBBs) More...
 
const Vec3scenter () const
 Center of the OBB. More...
 
Scalar width () const
 Width of the OBB. More...
 
Scalar height () const
 Height of the OBB. More...
 
Scalar depth () const
 Depth of the OBB. More...
 
Scalar volume () const
 Volume of the OBB. More...
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW Matrix3s 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 To
 Center of OBB. More...
 
Vec3s extent
 Half dimensions of OBB. More...
 

Detailed Description

Oriented bounding box class.

Constructor & Destructor Documentation

◆ OBB()

coal::OBB::OBB ( )
inline

Member Function Documentation

◆ center()

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

Center of the OBB.

◆ contain()

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

Check whether the OBB contains a point.

◆ depth()

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

Depth of the OBB.

◆ distance()

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

Distance between two OBBs, not implemented.

◆ height()

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

Height of the OBB.

◆ operator!=()

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

Difference operator.

◆ operator+()

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+=() [1/2]

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

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

◆ operator+=() [2/2]

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

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

◆ operator==()

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

Equality operator.

◆ overlap() [1/2]

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

Check collision between two OBB

Returns
true if collision happens.

◆ overlap() [2/2]

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.

◆ size()

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

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

◆ volume()

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

Volume of the OBB.

◆ width()

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

Width of the OBB.

Member Data Documentation

◆ axes

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.

◆ extent

Vec3s coal::OBB::extent

Half dimensions of OBB.

◆ To

Vec3s coal::OBB::To

Center of OBB.


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