|
From: Sebastian M. <seb...@gm...> - 2009-02-13 08:48:32
|
Mea culpa,
I've accidentally merged in the wrong lines I were using for testing.
For testing I have analyzed the unit test, which is either wrong or my
understanding of what the function is doing is incorrect.
The function description says:
" Tests if the given AABox is completely inside or on the surface of the
given
AABox container."
As I understand this, the container must contain the whole box, not just
intersect it, as tested in the unit test:
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));
// Test overlapping valid boxes
....
CPPUNIT_ASSERT(gmtl::isInVolume(box3, box2)); <-- wrong in my eyes
This test is wrong in my understanding, since the smaller box #3 cannot
contain a larger box,
They are surely intersecting, but to check this, there are specialized
tests.
Attached you'll find the new patch.
cheers
> Kevin Meinert schrieb:
>
>> is it for completely contained. or just for intersection? i
>> forget... :(
>>
>>
> Hi Kevin,
>
> the test is for complete containment. I'll check it again.
>
>> ---
>> kevin meinert | http://www.subatomicglue.com
>>
>>
>> On Thu, Feb 12, 2009 at 4:34 PM, Patrick Hartling <pa...@13...
>> <mailto:pa...@13...>> wrote:
>>
>> 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/
>>
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San
>> Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the
>> Enterprise
>> -Strategies to boost innovation and cut costs with open source
>> participation
>> -Receive a $600 discount off the registration fee with the source
>> code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> _______________________________________________
>> ggt-devel mailing list
>> ggt...@li...
>> <mailto:ggt...@li...>
>> https://lists.sourceforge.net/lists/listinfo/ggt-devel
>>
>>
>> ------------------------------------------------------------------------
>>
>> ------------------------------------------------------------------------------
>> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
>> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
>> -Strategies to boost innovation and cut costs with open source participation
>> -Receive a $600 discount off the registration fee with the source code: SFAD
>> http://p.sf.net/sfu/XcvMzF8H
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> ggt-devel mailing list
>> ggt...@li...
>> https://lists.sourceforge.net/lists/listinfo/ggt-devel
>>
>>
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> ggt-devel mailing list
> ggt...@li...
> https://lists.sourceforge.net/lists/listinfo/ggt-devel
>
>
|