Commit Graph

146 Commits

Author SHA1 Message Date
Andreas Fabri 0acdb162fa one less warning in Envelope_3, Intersection_3, Interpolation 2013-01-30 18:39:40 +01:00
Laurent Rineau eb0a39a711 Remove # error The test-suite needs no NDEBUG defined. 2012-10-10 12:22:55 +00:00
Laurent Rineau f0118a1311 Revert last commit (commited by error) 2012-10-09 09:28:37 +00:00
Laurent Rineau 648472bdac After a run of detect_packages_license 2012-10-09 09:26:23 +00:00
Philipp Möller 79b30908d5 WARNFIX: Silence a good part of unused variable/parameter warnings.
Wextra results in a dreadful wall of yellow in the test-suite and is
scary when using CGAL. Reduce some of the noise by silencing the
obvious cases with CGAL_USE or comments.
2012-08-07 11:04:32 +00:00
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
Laurent Rineau 6c705ab777 Fix the test
One cannot expect exact intersections computations results when the kernel
is not. This patch fixes the test: the equality between the result and the
expected result is tested with an epsilon unless the kernel has exact
constructions.
2012-04-23 22:17:15 +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 b0cfb5bc1f Fix a stupid copy-paste error 2012-03-19 14:12:05 +00:00
Laurent Rineau 02acd80611 Better test and bench for do_intersect(BBox_3, Ray_3|Segment_3) 2012-03-19 14:11:45 +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 58809c064a Full test suite of do_intersect(Bbox_3, Segment_3).
I have tested with gcov that all branches of the predicates are tested.
2012-03-16 16:10:44 +00:00
Laurent Rineau 3d36a2e4c3 Display coordinates with full precision 2012-03-15 15:47:36 +00:00
Laurent Rineau bd09875fea Add a few test cases.
One of then use boost::math::nextafter to move around a critical
 case. That is strange that even non-exact FT can deal with that without
 filtering.
2012-03-15 15:45:31 +00:00
Laurent Rineau 611a2c439b Naively translate and scale the inputs, for test of do_intersect(Bbox, ..) 2012-03-15 15:09:05 +00:00
Laurent Rineau 8dbae2494a Beginning of an intensive test suite of do_intersect(Bbox_3, Segment_3) 2012-03-15 14:48:12 +00:00
Laurent Rineau 71d1ba01e1 This version should be correct. 2012-03-15 13:27:06 +00:00
Laurent Rineau c0a37addfb Also test with Sc<Gmpq>.
Simple_cartesian<Gmpq> is a non-filtering kernel whose FT is not a IEEE 754
type. That number type is interesting to test with.
2012-03-15 11:11:47 +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 300057e17a Test also with Filtered_kernel without static filters
And count the percentage of intersection among random objects
2012-03-14 16:24:41 +00:00
Laurent Rineau 68b48a7151 Commit current version
To be reviewed fully.
2012-03-14 15:54:19 +00:00
Andreas Fabri 6c9625e514 Fix for <windows.h> bug 2012-01-21 08:33:51 +00:00
Andreas Fabri f834260e4c Fix for Windows 'min/max' bug 2012-01-19 08:03:51 +00:00
Andreas Fabri be573d2316 Fix for Windows 'min/max' bug 2012-01-18 09:52:23 +00:00