Commit Graph

92 Commits

Author SHA1 Message Date
Marc Glisse a758751485 Remove / comment out unused local typedefs. Fix one place where FT was used instead of RT (homogeneous coordinates, probably never compiled). 2012-07-28 06:21:06 +00:00
Sébastien Loriot fb7a7e2e95 remove warning 2012-07-06 12:35:29 +00:00
Laurent Rineau eef769cf9a Fix Do_intersect_3(Bbox_3, Segment_3)
svn merge --reintegrate \^/branches/features/Intersection_3-fix_do_intersect_bbox_segment-lrineau
2012-06-25 08:37:32 +00:00
Philipp Möller 67fdbf93d1 Prevent spurious warning in the test-suite. Leave the one that is
actually suspicious.
2012-06-22 11:52:14 +00:00
Laurent Rineau 19ab08d6e9 Fix a warning from clang
The warning was:

[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:353:9: warning: variable 'b' is used uninitialized whenever '||' condition is true [-Wsometimes-uninitialized]
    if( (px == qx) || // <=> (dmin == 0)
        ^~~~~~~~~~
[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:408:12: note: in instantiation of function template specialization 'CGAL::internal::do_intersect_bbox_segment_aux<float, true, true, false>' requested here
    return do_intersect_bbox_segment_aux<FT, true, true, false>(
           ^
[...]/include/CGAL/Kernel/function_objects.h:2052:14: note: in instantiation of function template specialization 'CGAL::internal::do_intersect<CGAL::Simple_cartesian<float> >' requested here
    { return internal::do_intersect(t1, t2, K()); }
             ^
[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:428:10: note: in instantiation of function template specialization 'CGAL::CommonKernelFunctors::Do_intersect_3<CGAL::Simple_cartesian<float> >::operator()<CGAL::Segment_3<CGAL::Simple_cartesian<float>>, CGAL::Bbox_3>' requested here
  return typename K::Do_intersect_3()(segment, bbox);
         ^
[...]/cmake/platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/test/Intersections_3/bbox_other_do_intersect_test.cpp:67:12: note: in instantiation of function template specialization 'CGAL::do_intersect<CGAL::Simple_cartesian<float> >' requested here
  bool b = CGAL::do_intersect(t,bbox);
           ^
[...]/cmake/platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/test/Intersections_3/bbox_other_do_intersect_test.cpp:416:12: note: in instantiation of function template specialization 'test_aux<CGAL::Segment_3<CGAL::Simple_cartesian<float>> >' requested here
  bool b = test_aux(s12,"s12",bbox,false);
           ^
[...]/cmake/platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/test/Intersections_3/bbox_other_do_intersect_test.cpp:665:12: note: in instantiation of function template specialization 'test<CGAL::Simple_cartesian<float> >' requested here
  bool b = test<K>(exact_predicates) &&
           ^
[...]/cmake/platforms/x86-64_Linux-2.6_llvm-clang-with-g++-4.6.2_F16/test/Intersections_3/bbox_other_do_intersect_test.cpp:678:7: note: in instantiation of function template specialization 'test_kernel<CGAL::Simple_cartesian<float> >' requested here
  b = test_kernel<CGAL::Simple_cartesian<float> >(false);
      ^
[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:360:25: note: uninitialized use occurs here
    if(is_indeterminate(b)) return b; // Note that the default-constructed
                        ^
[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:353:9: note: remove the '||' if its condition is always false
    if( (px == qx) || // <=> (dmin == 0)
        ^~~~~~~~~~~~~
[...]/include/CGAL/internal/Intersections_3/Bbox_3_Segment_3_do_intersect.h:351:23: note: initialize the variable 'b' to silence this warning
    Is_greater_value b;
                      ^
                       = false
2012-06-20 10:32:46 +00:00
Laurent Rineau eecf1e94be Fix for MSVC: protect the CGAL::max calls to prevent macro substitution 2012-06-20 09:53:56 +00:00
Laurent Rineau 23ab39f2df Remove calls to CGAL::abs for Ray_3 and Segment_3
As t1 and t2 are, by construction, greater than 0, for rays and segments,
no need to call CGAL::abs on t[xyz]min and t[xyz]max.
2012-06-19 10:08:04 +00:00
Laurent Rineau ab28ccf740 Fix bugs in overflow/underflow handling 2012-06-18 16:05:29 +00:00
Laurent Rineau 5142588eb3 Better performance (~10-15% better)
By removing several tests (and use CGAL::max instead), the generated
assembly is more efficient.
2012-06-18 16:05:04 +00:00
Laurent Rineau 090b93f229 Fix compilation for MSVC 2012-06-18 09:41:39 +00:00
Laurent Rineau 6c240a4ae2 Cleanup: remove unused code. 2012-06-15 15:49:33 +00:00
Laurent Rineau 28c9507c17 Go back to the version of revision 69620. That was faster. 2012-06-15 15:38:45 +00:00
Laurent Rineau 02754f17f9 Revert previous commit for CGAL/internal/Intersections_3/Bbox_3_Line_3_do_intersect.h
The code cannot be easily reused because a line does not store
two points but the a, b, c, d coefficients.
2012-06-15 15:27:17 +00:00
Laurent Rineau a3587eabf3 A version with less branches and more numerical computation 2012-06-15 15:12:04 +00:00
Laurent Rineau 41ba29e19a Factorize code of Do_intersect(Bbox_3, <something>)
Uniform use of do_intersect_bbox_segment_aux(..) with various Boolean
template arguments.
2012-06-15 15:06:34 +00:00
Laurent Rineau a72bd80380 Pass the bbox as argument instead of the six coordinates
That increased the perfs! :-)
2012-06-14 17:04:35 +00:00
Laurent Rineau 503d441f1e merge changes from next 2012-06-13 15:51:29 +00:00
Sébastien Loriot 8db3036330 BUGFIX
correct error in intersection computation of triangle_3 segment_3
when the segment is collinear with a triangle edge.
2012-04-05 11:57:58 +00:00
Laurent Rineau 672d2dd292 Commit work in progress 2012-03-21 16:58:29 +00:00
Laurent Rineau 439dd0abb9 Fix typo
- Remove a line that was rewritten but not removed.
- Add a comment
2012-03-21 14:34:53 +00:00
Laurent Rineau b5d987a4b5 Increasing the perf of the filtered predicate
When FT is Interval_nt, it is better that the
Do_intersect_bbox_segment_aux_is_greater returns a Uncertain<bool> instead
of a bool. That can delay the conversion of Uncertain<bool> to bool, and
hence better perf.
2012-03-21 14:24:31 +00:00
Laurent Rineau e940d97a75 Prepare the code factorization with the static filter of Do_intersect_3 2012-03-21 13:59:45 +00:00
Laurent Rineau 0e6dbc4b40 Reorganize expressions that are evaluation of the sign of a determinant
There are six of them in do_intersect(Bbox_3, Segment_3)
2012-03-21 11:49:30 +00:00
Laurent Rineau c291e92442 Less tests of sign of expressions
Followup to previous commit.

I have managed to transform most of the tests to simple comparison of input
coordinates. That will ease the writing of static filters. Only six
determinant signs have to be exactly determined.
2012-03-21 11:40:29 +00:00
Laurent Rineau 671464db4c Less tests of sign of expressions
I have managed to transform most of the tests to simple comparison of input
coordinates. That will ease the writing of static filters.
2012-03-21 11:13:19 +00:00
Laurent Rineau e54df14afb Code optimized for all x-, y-, and z-axis 2012-03-20 17:47:55 +00:00
Laurent Rineau 0358937f01 Code optimized for x-axis 2012-03-20 16:56:13 +00:00
Laurent Rineau 1aa69b5a8b Factorize the _aux function for do_intersect(BBox_3, Ray_3|Segment_3) 2012-03-19 12:07:20 +00:00
Laurent Rineau b5703e9cf8 Add a note about a test that is already covered by previous test. 2012-03-16 16:14:47 +00:00
Laurent Rineau 71d1ba01e1 This version should be correct. 2012-03-15 13:27:06 +00:00
Laurent Rineau c8bc77e46d Submit work in progress. The old code was really wrong! 2012-03-14 16:41:03 +00:00
Laurent Rineau 68b48a7151 Commit current version
To be reviewed fully.
2012-03-14 15:54:19 +00:00
Andreas Fabri be573d2316 Fix for Windows 'min/max' bug 2012-01-18 09:52:23 +00:00
Laurent Rineau 5b5dd33848 merge changes from next 2012-01-09 12:33:39 +00:00
Laurent Rineau 5685e10669 reintegrate \^/branches/features/Static_filter_do_intersect-GF 2011-11-25 17:45:11 +00:00
Laurent Rineau fb796dbc97 Missing match for Intersect_3::operator()(Ray_3, Triangle_3)
There was only Intersect_3::operator()(Triangle_3, Ray_3).

The specializations for CGAL::intersection were for both order however.
2011-11-25 17:40:02 +00:00
Laurent Rineau ede47077ce cleanup 2011-11-24 14:43:25 +00:00
Andreas Fabri c4c4a24029 cleanup 2011-11-24 14:15:32 +00:00
Laurent Rineau e0c80037ae merge changes from next 2011-11-23 15:53:51 +00:00
Laurent Rineau fc5a23bc06 Comments to help debugging 2011-11-21 14:53:16 +00:00
Sébastien Loriot 59f5cc0ba0 optimise Bbox_3-line_3 do_intersect (prevent filter failures) 2011-11-21 13:43:45 +00:00
Laurent Rineau 1ea6830233 New version of Do_intersect_3 static filter
This time we hope it is correct.
2011-11-18 15:34:26 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Sébastien Loriot dff6dda8b3 Remove from copyright holder
Freie Universitaet Berlin (Germany), Martin-Luther-University Halle-Wittenberg
(Germany) and RISC Linz (Austria) as they transfer the copyright to other
sites.
2011-09-21 19:46:31 +00:00
Sébastien Loriot bbc56adedc raffine bugfix of 64734
(remove unneed code added)
2011-07-13 14:35:58 +00:00
Sébastien Loriot 0331ea939b BUGFIX: Bbox_3-line_3 do_intersect missing two cases when the y-slope or z-slope
of the line is 0. Add a testsuite for Bbox_3-Line_3 do_intersect.
2011-07-12 07:05:40 +00:00
Laurent Rineau 369498d1e5 Cancel revision 64607. There had been a problem with the branch.
| ------------------------------------------------------------------------
  | r64607 | efif | 2011-07-05 17:27:04 +0200 (Tue, 05 Jul 2011) | 1 line
  | 
  | Merged feature-branch Aos_2-new_functors-tau into next
  | ------------------------------------------------------------------------
2011-07-06 11:11:58 +00:00
Sébastien Loriot a03f2c88c0 bug fix in tersection of 3D colinear segments.
Update test-suite to test all possible configurations.
2011-05-20 08:52:12 +00:00
Sébastien Loriot 1674fa6240 use coplanar intersection (avoid retesting it) 2011-05-16 17:12:06 +00:00
Sébastien Loriot a372589e67 intersection can be empty 2011-04-11 08:06:51 +00:00