25 #ifndef WBOUNDINGBOX_TEST_H
26 #define WBOUNDINGBOX_TEST_H
28 #include <cxxtest/TestSuite.h>
31 #include "../math/linearAlgebra/WPosition.h"
33 #include "../WBoundingBox.h"
34 #include "../WLimits.h"
52 WBoundingBox bb4( osg::Vec3d( 0.0, 0.0, 0.0 ), osg::Vec3d( 1.0, 1.0, 1.0 ) );
55 TS_ASSERT_EQUALS( bb2.valid(),
false );
87 TS_ASSERT( !box.valid() );
89 TS_ASSERT( box.valid() );
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.
void expandBy(const WBoundingBoxImpl< VT > &bb)
Expands this bounding box to include the given bounding box.
void reset()
Resets this box to an initial state where max is FLT_MIN and min FLT_MAX.
Unit tests for the WBoundingBox wrapper to osg::BoundingBox.
void testBoundingBoxComputation(void)
Expanding a bounding box by points should update the both corner positions.
void testForwardingFunctions(void)
The private subclassing from osg::BoundingBoxImpl makes many member functions private.
void testMinimalDistanceBetweenTwoBB(void)
The minimal distance between two bounding boxes is the minimal distance overall vertices of the first...
void testCommutativeIntervalDistance(void)
The distance should not depend on the order in which the boxes are given.
This only is a 3d double vector.
const double DBL_EPS
Smallest double such: 1.0 + DBL_EPS == 1.0 is still true.