OpenWalnut
1.2.5
|
Represents a axis parallel bounding box and provides some useful operations with them. More...
#include <WBoundingBox.h>
Public Types | |
typedef osg::BoundingBoxImpl < VT >::vec_type | vec_type |
Vertex type for min and max positions of this box. | |
typedef osg::BoundingBoxImpl < VT >::value_type | value_type |
Value type of the vertex type for example double, float, etc. | |
Public Member Functions | |
WBoundingBoxImpl () | |
Default constructor. | |
WBoundingBoxImpl (value_type xmin, value_type ymin, value_type zmin, value_type xmax, value_type ymax, value_type zmax) | |
Wrapps the component wise bounding box constructor from osg::BoundingBox. | |
WBoundingBoxImpl (const vec_type &min, const vec_type &max) | |
Constructs a bounding box by min and max positions. | |
virtual | ~WBoundingBoxImpl () |
Destructs this instance. | |
void | reset () |
Resets this box to an initial state where max is FLT_MIN and min FLT_MAX. | |
value_type | radiusSquare () const |
Calculates and returns the squared length of the bounding box radius. | |
osg::BoundingBox | toOSGBB () const |
Explicit type conversion function to use a WBoundingBox as osg::BoundingBox. | |
void | expandBy (const WBoundingBoxImpl< VT > &bb) |
Expands this bounding box to include the given bounding box. | |
bool | intersects (const WBoundingBoxImpl< VT > &bb) const |
Checks for intersection of this bounding box with the specified bounding box. | |
value_type | minDistance (const WBoundingBoxImpl< VT > &bb) const |
Computes the minimal distance of tow axis parallel bounding boxes. | |
const vec_type & | getMin () const |
Gives the front lower left aka minimum corner. | |
const vec_type & | getMax () const |
Gives the back upper right aka maximum corner. |
Represents a axis parallel bounding box and provides some useful operations with them.
_min
and _max
member variables to be public. Definition at line 45 of file WBoundingBox.h.
typedef osg::BoundingBoxImpl< VT >::value_type WBoundingBoxImpl< VT >::value_type |
Value type of the vertex type for example double, float, etc.
Definition at line 56 of file WBoundingBox.h.
typedef osg::BoundingBoxImpl< VT >::vec_type WBoundingBoxImpl< VT >::vec_type |
Vertex type for min and max positions of this box.
Definition at line 51 of file WBoundingBox.h.
WBoundingBoxImpl< VT >::WBoundingBoxImpl | ( | ) | [inline] |
Default constructor.
Definition at line 172 of file WBoundingBox.h.
WBoundingBoxImpl< VT >::WBoundingBoxImpl | ( | value_type | xmin, |
value_type | ymin, | ||
value_type | zmin, | ||
value_type | xmax, | ||
value_type | ymax, | ||
value_type | zmax | ||
) | [inline] |
Wrapps the component wise bounding box constructor from osg::BoundingBox.
xmin | Minimal x coordinate |
ymin | Minimal y coordinate |
zmin | Minimal z coordinate |
xmax | Maximal x coordinate |
ymax | Maximal y coordinate |
zmax | Maximal z coordinate |
Definition at line 178 of file WBoundingBox.h.
WBoundingBoxImpl< VT >::WBoundingBoxImpl | ( | const vec_type & | min, |
const vec_type & | max | ||
) | [inline] |
Constructs a bounding box by min and max positions.
min | Position containing minx miny and minz coordinates. |
max | Position containing maxx maxy and maxz coordinates. |
Definition at line 184 of file WBoundingBox.h.
WBoundingBoxImpl< VT >::~WBoundingBoxImpl | ( | ) | [inline, virtual] |
Destructs this instance.
Definition at line 190 of file WBoundingBox.h.
void WBoundingBoxImpl< VT >::expandBy | ( | const WBoundingBoxImpl< VT > & | bb | ) | [inline] |
Expands this bounding box to include the given bounding box.
bb | The other bounding box. |
Definition at line 213 of file WBoundingBox.h.
Referenced by WGridRegular3D::getBoundingBox(), WFiberCluster::getBoundingBox(), WBoundingBoxTest::testBoundingBoxComputation(), WBoundingBoxTest::testForwardingFunctions(), and WDataSetFibers::WDataSetFibers().
const WBoundingBoxImpl< VT >::vec_type & WBoundingBoxImpl< VT >::getMax | ( | ) | const [inline] |
Gives the back upper right aka maximum corner.
Definition at line 296 of file WBoundingBox.h.
Referenced by wge::generateBoundingBoxGeode(), and wge::generateSolidBoundingBoxNode().
const WBoundingBoxImpl< VT >::vec_type & WBoundingBoxImpl< VT >::getMin | ( | ) | const [inline] |
Gives the front lower left aka minimum corner.
Definition at line 290 of file WBoundingBox.h.
Referenced by wge::generateBoundingBoxGeode(), and wge::generateSolidBoundingBoxNode().
bool WBoundingBoxImpl< VT >::intersects | ( | const WBoundingBoxImpl< VT > & | bb | ) | const [inline] |
Checks for intersection of this bounding box with the specified bounding box.
bb | The other bouding box to tetst with. |
Definition at line 219 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testForwardingFunctions().
WBoundingBoxImpl< VT >::value_type WBoundingBoxImpl< VT >::minDistance | ( | const WBoundingBoxImpl< VT > & | bb | ) | const [inline] |
Computes the minimal distance of tow axis parallel bounding boxes.
bb | The other bounding box. |
Definition at line 254 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testCommutativeIntervalDistance(), and WBoundingBoxTest::testMinimalDistanceBetweenTwoBB().
WBoundingBoxImpl< VT >::value_type WBoundingBoxImpl< VT >::radiusSquare | ( | ) | const [inline] |
Calculates and returns the squared length of the bounding box radius.
Definition at line 201 of file WBoundingBox.h.
void WBoundingBoxImpl< VT >::reset | ( | ) | [inline] |
Resets this box to an initial state where max is FLT_MIN and min FLT_MAX.
Definition at line 195 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testForwardingFunctions().
osg::BoundingBox WBoundingBoxImpl< VT >::toOSGBB | ( | ) | const [inline] |
Explicit type conversion function to use a WBoundingBox as osg::BoundingBox.
Definition at line 207 of file WBoundingBox.h.