OpenWalnut
1.5.0dev
|
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. More... | |
typedef osg::BoundingBoxImpl< VT >::value_type | value_type |
Value type of the vertex type for example double, float, etc. More... | |
Public Member Functions | |
WBoundingBoxImpl () | |
Default constructor. More... | |
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. More... | |
WBoundingBoxImpl (const vec_type &min, const vec_type &max) | |
Constructs a bounding box by min and max positions. More... | |
WBoundingBoxImpl (const osg::BoundingSphereImpl< VT > &bs) | |
Create BoundinmgBox using a given sphere. More... | |
virtual | ~WBoundingBoxImpl () |
Destructs this instance. More... | |
void | reset () |
Resets this box to an initial state where max is FLT_MIN and min FLT_MAX. More... | |
value_type | radiusSquare () const |
Calculates and returns the squared length of the bounding box radius. More... | |
osg::BoundingBox | toOSGBB () const |
Explicit type conversion function to use a WBoundingBox as osg::BoundingBox. More... | |
void | expandBy (const WBoundingBoxImpl< VT > &bb) |
Expands this bounding box to include the given bounding box. More... | |
bool | intersects (const WBoundingBoxImpl< VT > &bb) const |
Checks for intersection of this bounding box with the specified bounding box. More... | |
value_type | minDistance (const WBoundingBoxImpl< VT > &bb) const |
Computes the minimal distance of tow axis parallel bounding boxes. More... | |
const vec_type & | getMin () const |
Gives the front lower left aka minimum corner. More... | |
const vec_type & | getMax () const |
Gives the back upper right aka maximum corner. More... | |
Private Member Functions | |
double | intervalDistance (double a0, double a1, double b0, double b1) const |
Checks if the two given intervals intersect and computes the distance between them. More... | |
Represents a axis parallel bounding box and provides some useful operations with them.
_min
and _max
member variables to be public. Definition at line 47 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 58 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 53 of file WBoundingBox.h.
|
inline |
Default constructor.
Definition at line 192 of file WBoundingBox.h.
|
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 198 of file WBoundingBox.h.
|
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 204 of file WBoundingBox.h.
|
inlineexplicit |
Create BoundinmgBox using a given sphere.
bs | the sphere |
Definition at line 210 of file WBoundingBox.h.
|
inlinevirtual |
Destructs this instance.
Definition at line 217 of file WBoundingBox.h.
|
inline |
Expands this bounding box to include the given bounding box.
bb | The other bounding box. |
Definition at line 240 of file WBoundingBox.h.
Referenced by WFiberCluster::getBoundingBox(), WGridRegular3DTemplate< T >::getBoundingBox(), WGridRegular3DTemplate< T >::getBoundingBoxIncludingBorder(), WGridRegular3DTemplate< T >::getVoxelBoundingBox(), WMReadLAS::load(), WMReadSimpleTextLineData::load(), WMReadVIM::load(), WMFibersToPoints::moduleMain(), WMMergePoints::moduleMain(), WMSampleOnFibers::moduleMain(), WMReadVCL::readData(), WBoundingBoxTest::testBoundingBoxComputation(), WBoundingBoxTest::testForwardingFunctions(), and WDataSetFibers::WDataSetFibers().
|
inline |
Gives the back upper right aka maximum corner.
Definition at line 308 of file WBoundingBox.h.
Referenced by WMCoordinateSystem::addAxialGrid(), WMCoordinateSystem::addCoronalGrid(), WMCoordinateSystem::addSagittalGrid(), wge::generateBoundingBoxGeode(), wge::generateSolidBoundingBoxNode(), WManipulatorNormalize::getTransformationMatrix(), WMNavigationSlices::initOSG(), and WMPickingDVREvaluation::intersectBoundingBoxWithRay().
|
inline |
Gives the front lower left aka minimum corner.
Definition at line 302 of file WBoundingBox.h.
Referenced by WMCoordinateSystem::addAxialGrid(), WMCoordinateSystem::addCoronalGrid(), WMCoordinateSystem::addSagittalGrid(), WMVoxelizer::constructGrid(), wge::generateBoundingBoxGeode(), wge::generateSolidBoundingBoxNode(), WManipulatorNormalize::getTransformationMatrix(), WMNavigationSlices::initOSG(), and WMPickingDVREvaluation::intersectBoundingBoxWithRay().
|
inline |
Checks for intersection of this bounding box with the specified bounding box.
bb | The other bouding box to tetst with. |
Definition at line 246 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testForwardingFunctions().
|
inlineprivate |
Checks if the two given intervals intersect and computes the distance between them.
a0 | lower bound of the first interval |
a1 | upper bound of the first interval |
b0 | lower bound of the second interval |
b1 | upper bound if the second interval |
Definition at line 252 of file WBoundingBox.h.
|
inline |
Computes the minimal distance of tow axis parallel bounding boxes.
bb | The other bounding box. |
Definition at line 266 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testCommutativeIntervalDistance(), and WBoundingBoxTest::testMinimalDistanceBetweenTwoBB().
|
inline |
Calculates and returns the squared length of the bounding box radius.
Definition at line 228 of file WBoundingBox.h.
|
inline |
Resets this box to an initial state where max is FLT_MIN and min FLT_MAX.
Definition at line 222 of file WBoundingBox.h.
Referenced by WBoundingBoxTest::testForwardingFunctions().
|
inline |
Explicit type conversion function to use a WBoundingBox as osg::BoundingBox.
Definition at line 234 of file WBoundingBox.h.