|
From: Patrick H. <pa...@13...> - 2009-02-12 22:34:43
|
On Feb 12, 2009, at 3:03 AM, Sebastian Messerschmidt wrote:
> Hi folks,
>
> attached you'll find a patch for the isInVolume function testing two
> axis-aligned boxes.
>
> The problem with the former algorithm had, was to rely on overlap
> test only, which means that intersecting boxes were considered
> containing each other.
> I've rewritten the test, so it will work for all cases.
After applying this patch, I get a failure in the test suite. The test
case (see gmtlTest::AABoxContainTest::testIsInVolumeAABox() in the
file Test/TestSuite/TestCases/AABoxContainTest.cpp) checks to see if
box2 contains box3 where these boxes are defined as follows:
gmtl::AABoxf box2(gmtl::Point3f(30,30,30), gmtl::Point3f(40,40,40));
gmtl::AABoxf box3(gmtl::Point3f(35,35,35), gmtl::Point3f(37,37,37));
Perhaps my expectation of gmtl::isInVolume() is wrong, but the
documentation says that it should return true for the case when the
second box (box3) is contained by the first (box2).
-Patrick
--
Patrick L. Hartling
Senior Software Engineer, Priority 5
http://www.priority5.com/
|