From: Patrick H. <pa...@13...> - 2009-02-13 15:28:46
|
On Feb 12, 2009, at 3:54 AM, Sebastian Messerschmidt wrote: > Hi, > > as I've written some weeks ago, I've fixed some float/double/ > DATA_TYPE issues and corrected some intersection functions, that > were return false positives. > > The changes in detail: > > Line 318: > Fixed the box / lineseg intersection, which was missing an early out > for the case were the ray hit the box. but the line didn't (some > simple early out test by checking tin,tout between 0 and 1) This change breaks one of the tests (see gmtlTest::IntersectionTest::testIntersectAABoxLineSeg() at line 199 of Test/TestSuite/TestCases/IntersectionTest.cpp). As far as I can tell, the expectation of the test is correct. Specifically, there is a line segment that starts within the axis-aligned bounding box and ends outside the box. In this case, tIn has a value of -0.5, and tOut is 0.5. Should the test be a logical AND instead of an OR? > Lines 584, 616, 649, 706: > > changed the declaration of tIN and tOUT parameters consitently to > DATA_TYPE instead of fixed float. > addiditionally the numHits were mixed int/unsigned int which I've > corrected to unsigned int everywhere > > Line 745: > Same as above, double/float DATA_TYPE corrections These changes have been committed. Thanks very much. > Here I've corrected the intersection test between plane an ray, that > failed due to missing check in tIn/tOut - range This change breaks another test in Test/TestSuite/TestCases/ IntersectionTest.cpp. This one is at line 874 where a plane is constructed with a ray pointing down through it. The test expects that t will be 5. Is the expectation of the test invalid? > I've also added the proposed intersectDoubleSided-Test for ray/ > triangle, that ignores the triangle orientation. This has been committed. Thanks! -Patrick -- Patrick L. Hartling Senior Software Engineer, Priority 5 http://www.priority5.com/ |