Commit Graph

64 Commits

Author SHA1 Message Date
Laurent Rineau 8f59fd9592 Turn QPL into LGPLv3+ 2012-01-13 16:33:35 +00:00
Andreas Fabri 77b9fd79db Remove ETHZ copyright, as Camille's contribution during his postdoc was minor 2011-09-29 15:34:00 +00:00
Sébastien Loriot 5e0c09d8ce For backward compatibility reasons and according to this article:
http://gotw.ca/gotw/006.htm, accelerate_distance_queries and 
clear_search_tree should be const.

To guarantee the read-only thread-safety, a mutex for the construction
of the internal kd-tree is used.
At the same time, optimize accelerate_distance_queries() to not
redo computation if nothing has changed in the aabb_tree.

Note that clear_search_tree does not need to be thread-safe as it is private.
2011-09-09 08:31:38 +00:00
Sébastien Loriot c93ba3a215 remove temporary comment 2011-09-08 16:03:23 +00:00
Sébastien Loriot f8449dcec4 more efficient usage of mutex. The lock is only done
if the build need to be done. We have an extra "if (m_need_build)"
but otherwise we would need to use mutex::try_lock() which results
in more code and as efficient.
2011-09-08 15:54:44 +00:00
Sébastien Loriot a09f6640f5 remove non-const version of root_node added in r65337
for backward compatibility. It is not documented and not
used (in a non-const context).
2011-09-08 12:02:06 +00:00
Sébastien Loriot 795ab80486 use a mutex in const function root_node to protect the non const call to
build()

The class AABB_tree is now read-only thread-safe
2011-09-08 08:56:16 +00:00
Sébastien Loriot eed2074f7f Fix constness issues in AABB_tree
*remove mutable data members
  *accelerate_distance_queries is not const
  *clear_search_tree is not const
  *root_node() const returns a const Node*
  *add root_note() non-const version
  *update documentation of AABB_tree class. function constness was not documented
  *update changes.html
2011-09-07 09:55:59 +00:00
Laurent Rineau 72f323a5dd The bbox() of AABB_tree can return a const reference. 2011-04-07 12:54:35 +00:00
Sébastien Loriot 12e8540bbe merge from candidate branch. 2011-01-10 10:46:16 +00:00
Stéphane Tayeb 813d775fba Add missing #include. 2010-07-08 07:35:44 +00:00
Stéphane Tayeb 5f464aec46 Merge [r51090:51960]
From branches/CGAL-3.5-branch/AABB_tree to trunk/AABB_tree

r51953 | stayeb | 2009-09-16 13:17:12 +0200 (Wed, 16 Sep 2009) | 1 line
* Fix AABB_tree missing default ctor.

r51936 | stayeb | 2009-09-14 19:37:18 +0200 (Mon, 14 Sep 2009) | 2 lines
* Fix ray_bbox & line_bbox do_intersect predicates for filtered kernels
* add a small test for do_intersect(seg/ray/line, bbox) queries

r51932 | lrineau | 2009-09-14 15:32:24 +0200 (Mon, 14 Sep 2009) | 3 lines
* Fix predicates of <CGAL/AABB_intersection.h>, so that they are correctly filtered when called from the global function template CGAL::do_intersect

r51931 | stayeb | 2009-09-14 15:22:12 +0200 (Mon, 14 Sep 2009) | 1 line
* Fix bbox_3_segment_3 intersection for filtered kernels.

r51868 | lrineau | 2009-09-07 17:01:48 +0200 (Mon, 07 Sep 2009) | 2 lines
* Fix the non-filtering of BBox_3-Segment_3 intersection.
2009-09-18 12:49:03 +00:00
Pierre Alliez 63d3ba8f0d default constructor. 2009-09-15 10:36:40 +00:00
Pierre Alliez bfaee9aae4 adds default constructor. 2009-09-15 10:01:58 +00:00
Pierre Alliez d987180d75 fix copyrights. 2009-08-07 18:57:08 +00:00
Sylvain Pion 7e0db3191b Fix & homogenize Copyright header lines :
- Copyrigth -> Copyright
- ETHZ (Suisse) -> ETH Zurich (Switzerland)
2009-08-07 11:18:32 +00:00
Pierre Alliez eb645bed0c AABB tree: fix quibble in comment. 2009-07-16 06:11:29 +00:00
Pierre Alliez cd199a7504 AABB tree: added one message to track the last remaining error in the test suite. 2009-07-16 06:07:41 +00:00
Laurent Rineau 0d7cc0b6b5 Fix: AABBTraits must not require size_type. The size_type is an
implementation detail of the class template AABB_tree, and traits classes
cannot know that type.
2009-07-08 16:16:15 +00:00
Pierre Alliez 1b26c8d562 AABB tree: fix one table line of the benchmark. 2009-07-08 12:17:31 +00:00
Pierre Alliez de47ee0a27 AABB tree: do_intersect now calls the First_primitive traversal traits (much faster)
performance section updated
2009-07-08 12:02:28 +00:00
Pierre Alliez dfa149a2d7 aabb tree: more code cleanup 2009-06-27 15:19:29 +00:00
Pierre Alliez 4c19729e16 aabb tree: a bit of code cleanup 2009-06-27 06:44:31 +00:00
Stéphane Tayeb c8dc1d84f7 Add a CGAL_assertion (prevents std::bad_alloc). 2009-06-26 11:58:17 +00:00
Pierre Alliez 597f9459d5 aabb tree: some cleanup 2009-06-25 20:08:51 +00:00
Camille Wormser e03e9fb4fd changes needed for the Polyhedron demo to compile 2009-06-05 18:04:47 +00:00
Stéphane Tayeb c83f4d6812 Remove compiler warnings. 2009-06-03 09:40:47 +00:00
Stéphane Tayeb 729ba7be05 Test suite code factorization. Minor fix (return type) in AABB_tree.h. 2009-05-18 14:26:29 +00:00
Stéphane Tayeb 8bde72f327 * remove workaround for weighted point from AABB_traits
* simplify code of AABB_tree::First_intersection_traits
* change intersection(ray,triangle) and intersection(line,triangle):
returned object is now an empty object, a point or a segment
* remove do_intersect test from Intersection::operator() of
AABB_traits: intersection(ray,triangle) and
intersection(line,triangle) do it.
2009-05-14 10:07:55 +00:00
Pierre Alliez 75a82ec32d AABB tree:
- rebuild now returns void.
2009-05-13 07:32:41 +00:00
Laurent Rineau df0e2ec0bc size_type must be lowercase. 2009-05-12 14:29:36 +00:00
Camille Wormser 993c393cd4 forgotten detail 2009-05-11 23:30:04 +00:00
Camille Wormser 0d63e6c207 the Traits now conforms fuly to the documentation 2009-05-11 23:17:40 +00:00
Camille Wormser 74beff3b13 removed all warnings (-Wall -Wextra).
IMPORTANT THINGS

- We need to add Compute_squared_distance_3 (at least for Point_3, Point_3) to the traits requirements

- Since we use the (decorated) Traits as a template parameter for the Search_traits_3, we need to add
this as a requirement. Currently, the Search_traits_3 requests that the template parameter be a CGAL
kernel. This is much too strong!
2009-05-10 16:05:48 +00:00
Camille Wormser 0f376fb294 removed the warnings, except in one of the test cases. Working on it. 2009-05-10 15:24:04 +00:00
Pierre Alliez 0d2880a413 AABB tree:
- more on examples
- description
- removed leftover traces of projection after grep (two found)
2009-05-09 22:24:39 +00:00
Camille Wormser 5dc7c35be3 distance queries conform to the spec 2009-05-09 10:22:45 +00:00
Pierre Alliez 4a6eb544a8 AABB tree
- rename m_data into m_primitives in Tree
- rename m_p_root into m_p_root_node in Tree
put back squared_distance into distance test
2009-05-09 06:57:36 +00:00
Camille Wormser 8414b99e9a now the test suite compiles and runs! :) 2009-05-08 14:06:51 +00:00
Camille Wormser 01d0293bc5 Code is now almost up to the specification: Primitive::Id everywhere,
the KD-tree uses decorated points to return the Id too. 

There are just a few boost::optional to add in the traits, where we still
use the old bool intersection(..., Result&) approach, and some modernization 
to do in the distance computation things.

Everything compiles.

I have removed the funtion closest_primitive from the code and documentation, 
since it would not be consistent with the rest of the interface, and would not
be faster than closest_point_and_primitive.

I think we are almost done, not only for the documentation, but for the code too.
2009-05-08 12:59:22 +00:00
Pierre Alliez 154ff8cfa0 AABB tree: more on distance queries
it remains to fix the Distance_traits
2009-05-07 21:22:24 +00:00
Pierre Alliez c26e8531e1 AABB tree: intersections now return CGAL::Objects. 2009-05-07 21:03:21 +00:00
Pierre Alliez e034d54b75 AABB tree: more on distance queries
- experiments with primitive vs point hints.
2009-05-07 13:18:17 +00:00
Pierre Alliez db287f0e56 AABB tree: more on internal KD-tree used to accelerate the distance queries. 2009-05-07 10:51:01 +00:00
Camille Wormser 55021bdb9f KD-tree forbids copies -> a pointer now. 2009-05-07 09:41:38 +00:00
Camille Wormser 439292a46c solved the compilation problem for Point_and_primitive
temporarily disabled the kd-tree construction, not to mix two separate compilation issues. I replug it in a minute.
2009-05-07 09:24:41 +00:00
Pierre Alliez fd017c5595 AABB tree: first version of boost::optional for any*
obscure compilation issue for now.
more on doc too
2009-05-07 06:44:59 +00:00
Gaël Guennebaud 10f9aa181c fix compilation 2009-05-04 15:15:46 +00:00
Camille Wormser 6f050ab6ca tentative API for dealing correctly with the degenerate cases:
it changes NOTHING to the existing code, except that 
number_of_intersections is renamed into number_of_intersected_primitives.
2009-05-02 18:02:11 +00:00
Pierre Alliez 2d22df1c41 AABB tree: more on Point_and_primitive in traversal traits 2009-05-02 09:45:20 +00:00