Commit Graph

553 Commits

Author SHA1 Message Date
Pierre Alliez 291861ad99 AABB tree demo: slicer now uses scene bbox 2009-07-05 13:16:08 +00:00
Pierre Alliez 57ba5cc702 aabb tree demo: bbox now used for distance functions. 2009-07-05 12:57:36 +00:00
Pierre Alliez 1c6968a90a aabb tree demo: fix scene bbox 2009-07-05 12:37:44 +00:00
Pierre Alliez 25565b6f99 aabb tree demo: benchmarks more accurate as we subtract the cost of generating the random queries. 2009-07-05 12:14:28 +00:00
Pierre Alliez bdd40ee5dc aabb tree: rename three custom-primitive examples and update example section of user manual. 2009-07-05 07:17:42 +00:00
Camille Wormser 9b052fbe27 Another more involved example, where the triangles are stored as a flat vector of indices,
referring to a vector of points.
2009-07-04 13:38:34 +00:00
Camille Wormser e591eb6bc5 An more involved example where the triangles are stored in a flat vector of points
(quite common in graphics)
2009-07-04 13:18:33 +00:00
Pierre Alliez c621fdfb4c aabbtree: correct compilation errors and warnings on Linux 2009-07-03 21:57:42 +00:00
Camille Wormser 6f741e7ed1 a new example, where a primitive is defined from scratch. 2009-07-03 16:25:16 +00:00
Pierre Alliez bad136d454 aabb tree: spell check y Patrick Mullen. 2009-07-03 12:31:36 +00:00
Pierre Alliez 8cfd4eeeba aabb tree:
- shortened unitary tests
- one warning removed
2009-07-03 07:18:35 +00:00
Pierre Alliez 5dbc82d599 aabb doc: move figs into separate folder. 2009-07-03 06:41:35 +00:00
Pierre Alliez e0b5bd6f31 AABB tree: more on memory consumption 2009-07-02 22:47:36 +00:00
Pierre Alliez 95abb7f60d AABB tree: add memory consumption in perf. section. 2009-07-02 22:31:59 +00:00
Pierre Alliez 7bfcc3dd47 AABB tree demo: added menu to benchmark memory against number of facets.
I had to add a recursive longest edge bisection algorithm to refine a mesh without changing its geometry.
2009-07-02 21:36:22 +00:00
Camille Wormser 08cc763aa8 steeper slope at the end of the color ramp, so that we see the difference between the facet-distance and edge-distance.
(at least on the hand model)
What do think about this?
2009-07-02 12:25:23 +00:00
Camille Wormser 81d2b1bcd7 remove some compilation warnings 2009-07-02 12:03:18 +00:00
Pierre Alliez 4c3c6e3845 AABB tree: remove warnings in ascii outputs to remove warnings in the test suite. 2009-07-01 21:18:20 +00:00
Pierre Alliez f22533c055 AABB tree: removed unused files. 2009-07-01 21:07:48 +00:00
Pierre Alliez 92760b731a AABB demo: removed status bar 2009-07-01 21:00:02 +00:00
Pierre Alliez 1d6e776431 AABB tree: some more cleanup. 2009-07-01 20:49:03 +00:00
Pierre Alliez bc80ee2e5c AABB tree: point out some (level 4) warnings for L.Rineau. 2009-07-01 20:23:41 +00:00
Pierre Alliez 08e9db05ae aabb tree demo: better option for inside points + ascii progress bar. 2009-07-01 20:12:40 +00:00
Pierre Alliez dffabd3115 aabb tree demo:
- shorter code for benchmarking 
- benchmarking duration made as an option
2009-07-01 19:58:06 +00:00
Pierre Alliez 514f1e8973 AABB tree demo: better file structuring and cleanup. 2009-07-01 19:08:48 +00:00
Pierre Alliez 18611be7bd aabb data: normalize model. 2009-07-01 13:36:42 +00:00
Pierre Alliez 446daa069a aabb tree : update perf. section. 2009-07-01 13:09:51 +00:00
Pierre Alliez ef1864d6af AABB tree demo:
- added color ramps for signed and unsigned distance functions (thermal for unsigned, and red/blue for signed)
- fix moc warning issue (thanks Manuel Caroli)
- fix strange value in performance section of user manual (we now understand that the KD-tree is making something really nasty only for large point sets - and we'll investigate the KD tree more)
2009-07-01 12:55:33 +00:00
Pierre Alliez c74f3dbb59 aabb tree demo: added thermal color ramp for unsigned distance function 2009-07-01 11:56:25 +00:00
Camille Wormser a09dfcf193 un mot dans la sortie pour expliquer qu'il ne faut pas tenir compte du premier appel (pour le moment) 2009-07-01 08:11:07 +00:00
Camille Wormser 2d951c676f calls the first distance benchmark two times: the first one is used to populate the cache... 2009-07-01 08:07:09 +00:00
Pierre Alliez 8c1a65f2ac aabb tree demo: added signed and unsigned distance functions to facets, unsigned to edges. 2009-06-30 22:06:04 +00:00
Pierre Alliez 78d040c39a aabb tree demo: fix one strange compilation error that happens only with VC2005 (took me hours to understand that it's probably a compiler bug).
benchmark distance queries in the demo and updated user manual (perf section)
2009-06-30 21:18:31 +00:00
Pierre Alliez 9c96611659 aabb tree demo: add one small hand model 2009-06-30 20:19:03 +00:00
Pierre Alliez 0c9f65bc92 aabb tree: update teaser 2009-06-30 20:00:07 +00:00
Pierre Alliez bb2380a55a aabb tree teaser image 2009-06-30 13:05:29 +00:00
Pierre Alliez 98118bddce aabb tree demo: distance benchs (strange compilation issue on Windows) 2009-06-30 12:15:06 +00:00
Pierre Alliez 125d8cab6b aabb tree: attempt to fix compilation issue 2009-06-30 08:42:01 +00:00
Pierre Alliez 734ee1e504 aabb tree: caption of curve 2009-06-30 08:21:04 +00:00
Pierre Alliez 7da7d85386 AABB tree: add .eps file 2009-06-30 08:12:41 +00:00
Pierre Alliez 0d97e5ed13 aabb tree: correct images in doc 2009-06-30 08:11:49 +00:00
Pierre Alliez 49980a6d75 aabb tree: added curve in performance section 2009-06-30 08:07:29 +00:00
Pierre Alliez 57a3c4fd7a AABB tree: fix doc compilation issue 2009-06-30 07:39:42 +00:00
Pierre Alliez 154bfac3f6 aabb tree: added plane queries in the performance section and demo. 2009-06-29 21:23:13 +00:00
Pierre Alliez 35170ac299 aabb tree: added performance section [to be completed with distance queries and curves] 2009-06-29 21:06:26 +00:00
Pierre Alliez bf70fa2c9e more on AABB demo (simple unsigned distance function to facets)
must fix compilation issue
2009-06-29 20:17:33 +00:00
Pierre Alliez 5c0b091370 more on AABB demo 2009-06-29 17:00:29 +00:00
Pierre Alliez 1dfddba18a more on AABB demo 2009-06-29 15:55:58 +00:00
Pierre Alliez 8b2c3807de moved AABB demo, thanks Laurent for pointing this out. 2009-06-29 13:00:44 +00:00
Pierre Alliez b18696af81 more on AABB demo 2009-06-29 11:46:43 +00:00
Laurent Rineau b037450304 Fix a VC++-ism. 2009-06-29 11:20:39 +00:00
Pierre Alliez e220203a60 aabb demo: more code cleanup
one attempt to add shortcut for a menu
2009-06-28 21:15:31 +00:00
Pierre Alliez 3edf2601c3 aabb tree: enrich one example with intersection of facets with plane query (intersections are generically segments) 2009-06-28 20:57:55 +00:00
Pierre Alliez eb8b4c0c73 aabb demo: more code cleanup 2009-06-28 20:19:46 +00:00
Pierre Alliez 891219e704 aabb tree demo: change data models, remove two unnecessary files. 2009-06-28 19:59:58 +00:00
Pierre Alliez 21e59e43d8 aabb tree demo: simplified menus (only two for benchmarking distances and intersections)
the demo must stay as simple as possible.
2009-06-28 19:44:02 +00:00
Pierre Alliez 0c22c8e729 aabb tree : added menu to generate and display a set of points intersecting the edges of a polyhedron. 2009-06-28 18:07:17 +00:00
Pierre Alliez c2e51c88d4 aabb tree : added menu to generate and display a set of points intersecting the facets of a polyhedron.
more view and edit menus.
2009-06-28 07:53:44 +00:00
Pierre Alliez 071f2f6a55 aabb tree : added menu to generate and display a set of segments intersecting the facets of a polyhedron. 2009-06-28 07:15:26 +00:00
Pierre Alliez 56ff4a3a32 aabb tree qt-based demo: added menu to generate and display a set of points inside a polyhedron.
next to come: signed and unsigned distance functions, and benchmarking of distances, intersection to both edges and facets.
2009-06-27 21:41:06 +00:00
Pierre Alliez 360f2a73d7 aabb tree: initial qt-based demo 2009-06-27 20:33:46 +00:00
Pierre Alliez 8f3cbf217e aabb tree: more code cleanup 2009-06-27 15:26:09 +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
Pierre Alliez a46598daa8 aabb tree: polishing user manual 2009-06-26 17:55:17 +00:00
Pierre Alliez dc0f8c60ce aabb tree: cleanup test formatting 2009-06-26 15:18:35 +00:00
Stéphane Tayeb c8dc1d84f7 Add a CGAL_assertion (prevents std::bad_alloc). 2009-06-26 11:58:17 +00:00
Stéphane Tayeb f3d154f62f Remove warning. Fix wrong assert. 2009-06-26 11:43:05 +00:00
Pierre Alliez 0a0ebfa501 aabb tree: split facet examples into distance and intersection 2009-06-26 11:17:08 +00:00
Pierre Alliez 330640c7e2 aabb tree: more on tests 2009-06-25 20:45:09 +00:00
Pierre Alliez 597f9459d5 aabb tree: some cleanup 2009-06-25 20:08:51 +00:00
Pierre Alliez a87b5cef3d aabb tree: one more example 2009-06-25 19:52:35 +00:00
Pierre Alliez e2f3435d32 aabb tree: one more example 2009-06-25 19:21:40 +00:00
Camille Wormser 680e80157d adds some typename 2009-06-25 15:03:45 +00:00
Pierre Alliez d61f26ea11 aabb tree: more on user manual 2009-06-24 19:31:57 +00:00
Pierre Alliez fd1f03e4d4 aabb tree: more on tests 2009-06-24 19:23:36 +00:00
Pierre Alliez 88c549f6b1 aabb tree: more on tests 2009-06-23 20:26:45 +00:00
Pierre Alliez a52576ec1f aabb tree: remove warning 2009-06-23 15:02:11 +00:00
Pierre Alliez 7928121683 AABB tree: added canonical tetrahedron for testing 2009-06-19 10:11:01 +00:00
Stéphane Tayeb d454f0d1c4 * Fix aabb_distance_triangle_hint_test (check was buggy)
* Remove kd-tree construction in generic test function (must be done in test_impl now)
* Add aabb_naive_vs_tree_distance_segment_test
* Minor fix in naive vs tree distance tests (there is probably more to do)
2009-06-18 09:34:16 +00:00
Pierre Alliez cddf3f8606 aabb tree: fix compilation issue on VC++ (I guess on Linux this worked fine) 2009-06-17 19:41:46 +00:00
Stéphane Tayeb f76d00c650 Add naive vs tree distance test for triangles. 2009-06-17 16:07:52 +00:00
Pierre Alliez 4ca25c817a AABB tree: use pinion model for testing 2009-06-17 14:17:36 +00:00
Pierre Alliez 4b277b85f2 AABB tree: added pinion for testing 2009-06-17 10:23:19 +00:00
Stéphane Tayeb c5fdd0eb17 remove boost_filesystem includes (causes compilation error on MacOSX). 2009-06-17 07:20:10 +00:00
Pierre Alliez 80fee750c6 AABB tree tests
- get rid of boost filesystem business - as requires boost lib dependency
- fix warning
2009-06-16 22:22:02 +00:00
Stéphane Tayeb 1f4b3347ef Add tree vs naive implementation test. It checks that AABB_tree implementation gives the same results than naive iteration over primitives. 2009-06-15 15:45:26 +00:00
Stéphane Tayeb 761a218fff * Fix configuration error (boost_system is now optional)
* Fix singular iterator copy construction error (build with -D_GLIBCXX_DEBUG)
2009-06-09 08:10:21 +00:00
Stéphane Tayeb adce605e3e Fix MacOS X link error. 2009-06-08 15:45:19 +00:00
Stéphane Tayeb c337944925 Add typedef on template parameter AABBTraits in class AABB_node (CC-5.90_F7 error). 2009-06-08 08:29:46 +00:00
Stéphane Tayeb 53ab3851ae Fix check_outputs() function. 2009-06-08 07:59:09 +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 1d9db3f4c0 Fix error with boost::filesystem. 2009-05-26 16:15:51 +00:00
Pierre Alliez af2ffa9abd AABB tree: fixes on tests 2009-05-25 07:57:24 +00:00
Pierre Alliez f7250d8f19 AABB tree: speed test now parameterizable by duration. 2009-05-20 08:15:50 +00:00
Pierre Alliez 18bbbad67a AABB tree: use boost::filesystem to loop through all .off files. 2009-05-19 15:38:27 +00:00
Stéphane Tayeb ec8551727d Remove one wrong call to timer.stop(). 2009-05-19 14:38:41 +00:00
Pierre Alliez c9964aa7ac AABB tree: more on tests 2009-05-18 20:33:04 +00:00
Pierre Alliez 45ed27682d AABB tree: more on tests 2009-05-18 20:22:25 +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
Pierre Alliez 3395e5f699 AABB tree: removed bimba from the test 2009-05-18 09:37:06 +00:00
Stéphane Tayeb 04b5499caf Improve clip in triangle_ray/line/seg intersection construction. There is more to do i think. 2009-05-15 17:22:03 +00:00
Camille Wormser 77460eb2fe accent 2009-05-14 13:08:20 +00:00
Camille Wormser d89e64ab28 authors list 2009-05-14 13:03:01 +00:00
Pierre Alliez 0dfc500ff0 AABB tree:
- few fixes on the doc.
2009-05-14 11:27:42 +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
Camille Wormser 0c348f8539 history 2009-05-14 09:22:18 +00:00
Camille Wormser cddf634d13 forgot to add this file 2009-05-14 08:49:21 +00:00
Camille Wormser 0fca80fcba links to the models in AABBPrimitive 2009-05-14 08:27:10 +00:00
Camille Wormser ea1d578227 forgot to save this one before 2009-05-14 08:23:12 +00:00
Camille Wormser cc5f9e604f sorry, unintended change 2009-05-14 08:22:32 +00:00
Camille Wormser f47e9f1f67 one more primitive,
more consistent names
2009-05-14 08:20:50 +00:00
Camille Wormser cb74ff6524 removed redondant typedefs 2009-05-14 07:59:09 +00:00
Camille Wormser f6de9a1ec4 Caps in titles,
AXIS_X -> X_AXIS
Split_... returns void
2009-05-14 07:51:11 +00:00
Andreas Fabri 51de43bfca capitalize words in headings 2009-05-14 07:39:17 +00:00
Camille Wormser 0bdb3f5504 a model for the concept AABBPrimitive.
This is just an example, we can think later about what the most useful 
primitives for typical users could be.
2009-05-14 01:21:28 +00:00
Camille Wormser 765b55a41d detailed explanation of the hint story 2009-05-14 00:44:29 +00:00
Camille Wormser aa101e0caf Laurent's remark: passing the traits as parameter of constructors 2009-05-13 22:47:29 +00:00
Camille Wormser 075911ec75 Laurent's remark: add the bounding box stuffs 2009-05-13 22:35:39 +00:00
Camille Wormser 380e2c76ed uniformizes the consts. I am not sure what the policy is,
but I put them.
2009-05-13 21:45:20 +00:00
Camille Wormser 2ca7d70e2d AABBGeomTraits can now accept Kernels as models,
IF we add Compute_closest_point.
2009-05-13 21:27:43 +00:00
Camille Wormser b8b6bd5d9f no reference to the hints in the user manual (except in details.tex, where we
tell the user what this is about).

More explicit presentation of what an id is: usually a real unique id, but
the user is free to use it differently if he sees a need for it.
2009-05-13 15:53:12 +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 c733708add while finishing to conform the code to the documentation,
I realized it made sense to let the traits do the sorting.
2009-05-11 23:17:01 +00:00
Camille Wormser 2cd6895b0c a rule of thmb for using the KD-tree:
use it always, except if you are really confident about your hints.
2009-05-11 20:23:29 +00:00
Camille Wormser 7184e5d681 les deux remarques d'Andreas 2009-05-11 20:16:00 +00:00
Camille Wormser 9087e9b14b updated documentation with functors in the AABBTraits concept.
Should we keep the const& in the description of the functors ? 
I kept them in AABBTraits, but we do not have them in AABBGeomTraits...
What should be the policy?

Note that the functors do not have the "_3" in AABBTraits, 
but have it in AABBGeomTraits. This is on purpose.
2009-05-11 11:54:50 +00:00
Pierre Alliez d24dec3727 AABB tree: fix compilation issue 2009-05-11 08:23:03 +00:00
Pierre Alliez 74dfd60a12 AABB tree:
- cleanup examples
- shorten a bit ref manual of tree.
2009-05-11 08:20:32 +00:00
Camille Wormser 614f220eb1 One last warning was missing: it appears only in the examples and not in the test suite.
It means we should add the Plane query case to the test suite.
2009-05-10 16:15:24 +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
Pierre Alliez 988c746c29 AABB tree:
- first pass on examples to simplify a bit
- TODO: better show variety of queries offered instead of just #intersections
2009-05-09 22:04:33 +00:00
Pierre Alliez 55dc498d00 AABB tree: one global pass on the narrative. 2009-05-09 21:52:02 +00:00
Pierre Alliez 5b992f0ffa AABB tree: more on distance tests with anisotropic triangle mesh model (added finger.off)
remove one warning
some remains in the KD-tree... was unable to remove them for now.
2009-05-09 19:57:37 +00:00
Camille Wormser 5dc7c35be3 distance queries conform to the spec 2009-05-09 10:22:45 +00:00
Pierre Alliez 49bdb725f6 AABB tree
factorize some code for the tests into AABB_test_util.h
2009-05-09 07:20:07 +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 64b5882ffb I know exclude the case where the hint is returned from the inconsistencies.
It may be more interesting.
2009-05-08 22:49:55 +00:00
Camille Wormser 32678c876e interesting benchmarks for the hint strategies in distance queries 2009-05-08 19:54:28 +00:00
Camille Wormser c063b0bd32 details for the requirements for the Id. 2009-05-08 15:00:13 +00:00
Camille Wormser 1c3c01951f oops, forgot to save this file. Old changes... 2009-05-08 14:18:21 +00:00
Camille Wormser f0d1f31f11 Since Pierre wanted this feature (providing points without primitive to the KD_tree),
and it does not cost much in terms of implementation, and it is useful for cases like the
Polyhedron, I put it back. 

The code already supports that (as can be seen from the fact that the test suite runs).

Still, I need the Id to have a default constructor. How do you document that?
2009-05-08 14:17:38 +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
Camille Wormser 811f08256b added missing types to the AABBTraits concept.
(I have added the missing methods for the distance queries too)
2009-05-08 11:28:10 +00:00
Camille Wormser 1f4c9a150e cleaning of the traits. Not finished yet.
I've removed all references to the Sphere (it was used only internally anyway), 
because we will not use it anymore: we replace its use by direct calls to is_closer.
2009-05-08 11:20:14 +00:00
Camille Wormser fa539afc07 in the description of do_intersect and intersection, in the GeomTraits,
primitive --> geometric object
(some are queries, some are primitives)
2009-05-08 10:37:07 +00:00
Camille Wormser 4f329a0761 the GeomTraits does not provide the query types at all. 2009-05-08 10:34:03 +00:00
Camille Wormser 61aee20d79 typos + clearer explanation of the role of the ids
(used to refer to the primitives in the outputs, but need not be unique)
2009-05-08 10:16:54 +00:00
Camille Wormser 38da93cbca text improvement and typos for distances 2009-05-08 09:55:28 +00:00
Camille Wormser a03de6bb32 we do not need intersection for any_intersected_primitive 2009-05-08 09:46:34 +00:00
Camille Wormser 794157450f allocation detail in the constructor 2009-05-08 09:45:46 +00:00
Camille Wormser 8358202dde The requirement on the constructor was a bit too strong: we do not need
the fact that the iterator range is a container of objects of type Datum.

Quite the contrary: it can be halfedges_begin/end. Hence, we should keep 
only the requirement that Primitive is constructible from it (that's 
really what we use in practice).
2009-05-08 09:36:47 +00:00
Camille Wormser 31e85b74de still polishing (just typos) 2009-05-08 09:27:27 +00:00
Camille Wormser 986f01d0d5 doing some polishing on the documentation... (not finished yet, going through the whole thing) 2009-05-08 09:19:48 +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
Camille Wormser bf4043be63 replaced Point_and_primitive by Point_and_primitive_id and Object_and_primitive_id 2009-05-07 13:18:02 +00:00
Camille Wormser 6316ee39fe I revert the change, because this is, in my view, really important for having a sound design.
Otherwise, what do you do if the sphere has no intersection with the data?
2009-05-07 11:51:00 +00:00
Pierre Alliez 8e754e6e7c AABB tree: (ref manual): all hints back to point types in distance queries - I believe that's little relevant to ask a primitive as hint. 2009-05-07 11:33:26 +00:00
Camille Wormser 4b720e0c06 documentation compilation issues 2009-05-07 11:30:29 +00:00
Pierre Alliez 5d609213af AABB tree: distance tests now pick random query points in tree bbox. 2009-05-07 11:11:36 +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
Pierre Alliez 0f225c01cf AABB tree: rename projection to distance in the tests 2009-05-07 09:50:44 +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
Camille Wormser fe06803b35 I think that it is useful to mention that the KD-tree method allows
not to have all the primitives sampled: otherwise, the user may have 
the feeling that at least one sample per primitive is a requirement.

Imagine a scene with many small objects. It makes perfect sense to 
sample each of these objects with just one point.
2009-05-06 10:54:07 +00:00
Pierre Alliez e4cb94b35e AABB tree: update doc
- change shark image to anchor model
- remove references to projection
2009-05-05 20:25:20 +00:00
Pierre Alliez 4c7161e67b AABB tree: fix opcode 2009-05-05 15:48:12 +00:00
Laurent Rineau 0aea10fb4d - Fix a compilation error (a missing ':'),
- s/size_t/size_type/
2009-05-05 12:07:15 +00:00
Camille Wormser af8b5b8c1a Following Larent's remarks 2009-05-05 11:58:05 +00:00
Pierre Alliez db918ecafe AABB tree: undo folder restructuring 2009-05-05 11:51:48 +00:00
Camille Wormser 202b7c95d5 Laurent's remarks 2009-05-05 11:27:29 +00:00
Camille Wormser f87800c489 removed all references to "projection", except in the very first paragraph of the intro, where it fits well.
(see Laurent's remark)
2009-05-05 11:16:00 +00:00
Camille Wormser 16383ce57f presentation of the KD-tree system in the API. 2009-05-05 11:06:21 +00:00
Camille Wormser 6e89ca8d8a presentation of the KD-tree system in the API. 2009-05-05 11:05:28 +00:00
Camille Wormser b40571b407 most of Andreas requested changes.
See the wiki for details.tex
I did not address Laurent's changes, except for the rebuild thing.
2009-05-04 20:46:10 +00:00
Pierre Alliez fbb8eefc2c more on examples 2009-05-04 20:19:22 +00:00
Pierre Alliez a6cf326154 AABB tree:
- examples primitive files in a separate folder
- more on doc from second review.
2009-05-04 20:08:00 +00:00
Gaël Guennebaud 10f9aa181c fix compilation 2009-05-04 15:15:46 +00:00
Pierre Alliez 5d97e6dc26 AABB tree: commented out nb_traversal_intersections in user manual 2009-05-04 11:01:14 +00:00
Pierre Alliez fef3e5f981 AABB tree: commented out nb_traversal_intersections in ref manual 2009-05-04 09:58:49 +00:00
Camille Wormser d34c90f793 Useful polish. 2009-05-03 17:09:01 +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 7bc16c5c48 AABB tree: made two sub-folders to store intersections and (later) traversal_traits 2009-05-02 12:13:32 +00:00
Pierre Alliez 2d22df1c41 AABB tree: more on Point_and_primitive in traversal traits 2009-05-02 09:45:20 +00:00
Pierre Alliez b4cff1bb34 AABB tree: more on ref manual 2009-05-02 09:27:05 +00:00
Pierre Alliez b23fd11c04 AABB tree: document size, bbox and empty of the tree
note: we could rename root_bbox as simply bbox
2009-05-01 06:41:10 +00:00
Pierre Alliez 23f94c802b AABB tree: started to implement new API
CAREFUL: does not compile anymore - will fix this next week.
2009-04-30 22:26:53 +00:00
Pierre Alliez 159e2428db AABB tree: prepare material for illustrations 2009-04-30 15:38:12 +00:00
Stéphane Tayeb 6575fdb2e8 Fix compilation error. 2009-04-30 14:06:46 +00:00
Stéphane Tayeb fde6e4f260 * add workaround for weighted point (TOFIX)
* add AABB_const_polyhedron_edge_primitive
2009-04-30 14:04:45 +00:00
Pierre Alliez 1533aa072f AABB tree (ref manual): added nested types 2009-04-30 13:51:41 +00:00
Pierre Alliez 2c7033c74a AABB tree (ref manual): added headings 2009-04-30 13:45:11 +00:00
Pierre Alliez b30d94df7c AABB tree (user manual): fix compilation issue. 2009-04-30 13:42:12 +00:00
Pierre Alliez 8b8cf8132a AABB tree (user manual): fix compilation issue. 2009-04-30 13:40:41 +00:00
Pierre Alliez f4f4bf4d8a AABB tree (user manual): fix compilation issue. 2009-04-30 13:38:48 +00:00
Pierre Alliez b11fba8345 AABB tree (user manual): change API for projections. 2009-04-30 13:22:41 +00:00
Pierre Alliez d2c99fc698 AABB tree: split user manual into several .tex files.
more on API.
2009-04-29 20:38:40 +00:00
Pierre Alliez fbc8c064d1 AABB tree: type fix. 2009-04-29 15:10:16 +00:00
Pierre Alliez 519782b2af AABB tree: nearest_point_segment_3 added - all examples now compile fine
one file renamed
note: "origin" is a reserved term - better to rename it to query?
2009-04-29 15:01:36 +00:00
Pierre Alliez 3ed02768c8 AABB tree: more on user doc.
also, added closest_primitive(query) in addition to closest_point()
2009-04-29 14:11:24 +00:00
Pierre Alliez 5074de058e AABB tree: rename segment to edge 2009-04-29 13:44:35 +00:00
Pierre Alliez 7c56be7711 AABB tree: more on tests 2009-04-29 13:43:38 +00:00
Pierre Alliez b96d8c442c AABB: fix clear_and_insert
remove lucy model (too big)
2009-04-28 20:04:23 +00:00
Pierre Alliez a86c346e54 AABB: implemented two new functions suggested by Andreas:
void clear(void)
bool clear_and_insert(begin,beyond)
2009-04-28 15:29:37 +00:00
Stéphane Tayeb cf794d7a17 add forgotten file (r48979). 2009-04-28 15:14:34 +00:00
Stéphane Tayeb 7d85cbdd57 * Remove ad-hoc code from AABBTraits:
- add nearest_point_3(Point_3, Triangle_3, Point_3)
  - updates Projecting_traits of AABB_tree
* Fix test compilation (linux x64).
2009-04-28 15:12:51 +00:00
Pierre Alliez aabc226876 AABB: fix ref to opcode. and few fixes in introduction. 2009-04-28 14:47:22 +00:00
Pierre Alliez 052850c95f AABB: document two new functions suggested by Andreas:
void clear(void)
void clear_and_insert(begin,beyond)
(we let the append() function for another release)

tests: enrich todo list.
2009-04-28 09:44:08 +00:00
Pierre Alliez fd573fc4c8 AABB: more on testing: measure tree construction time, speed for all query types, across several kernels. 2009-04-27 20:37:47 +00:00
Pierre Alliez 6c4f25b95b AABB: rename to less_x/y/z 2009-04-27 18:13:06 +00:00
Pierre Alliez 911c74c590 AABB: more to fix Andreas remarks. 2009-04-27 18:00:27 +00:00
Pierre Alliez 38c6ba35e3 AABB: added 100k triangle lucy model for the tests (others are toys)
added it to dont_submit
2009-04-27 17:16:30 +00:00
Pierre Alliez b563d29270 AABB tree: the projection does not construct the KD-tree at the first projection query anymore. for efficient projection queries either the user calls for its explicit construction during the AABB construction or calls "construct_search_Tree()". otherwise the first primitive reference point is used as (naive) hint. 2009-04-27 15:36:35 +00:00
Stéphane Tayeb 50a9d76db0 Fix polyhedral oracle. Add class AABB_const_polyhedron_triangle_primitive. 2009-04-27 13:25:46 +00:00
Stéphane Tayeb 836f48cd9c Fix compilation errors (linux x64). 2009-04-27 12:42:04 +00:00
Pierre Alliez 9401251b51 AABB tree: attempt to fix compilation on Linux 2009-04-27 11:45:38 +00:00
Laurent Saboret 9c77d89703 Fixed compilation errors (Linux/g++) 2009-04-27 10:40:34 +00:00
Pierre Alliez 18c93be7bc AABB tree: replace xref/yref/zref and point_on by a single reference_point() function for primitive.
NOTE: the reference point is used both for sorting the primitives and for constructing the search KD-tree
2009-04-27 08:58:19 +00:00
Pierre Alliez b9c28d07aa AABB tree: rename is_smaller to is_contained
another code cleanup
2009-04-26 21:48:18 +00:00
Pierre Alliez a8188eb668 AABB tree: test all intersection types for triangles 2009-04-26 21:29:47 +00:00
Pierre Alliez 2421c82abe AABB tree: added (commented) example of projection against a set of segments.
does not compile for now
2009-04-26 20:59:43 +00:00
Pierre Alliez 73364294e5 AABB tree: fix CR. 2009-04-26 18:24:15 +00:00
Pierre Alliez 8a09dd36c1 AABB tree: cleanup doc. 2009-04-26 18:22:02 +00:00
Pierre Alliez c55ae25215 AABB tree: more on projection (added all point_on() functions to primitives) 2009-04-26 18:19:05 +00:00
Pierre Alliez 8cf7099289 AABB tree: rename intersection file 2009-04-26 18:09:40 +00:00
Pierre Alliez 3a3c75c66e AABB tree: rename intersection files 2009-04-26 17:32:34 +00:00
Pierre Alliez 9df9f8a9f1 AABB tree: added internal search tree (CGAL K-orth search tree) to accelerate the projection queries.
substantial complication... may be improved.
2009-04-26 16:22:46 +00:00
Pierre Alliez e52c14ffc9 AABB tree: more on doc. 2009-04-26 14:39:35 +00:00
Pierre Alliez 4018a88be9 polyhedron demo: fix compilation of remeshing plugin 2009-04-26 14:25:30 +00:00
Pierre Alliez abaeb0ef5c AABB tree: rename Polyhedron_tree to Tree in examples and test 2009-04-26 14:15:27 +00:00
Pierre Alliez 24e3bc0c22 AABB tree: added two primitive types for triangle and segment to make two examples simpler.
rename Object type to Datum type within primitive as it was conflicting with CGAL Object type
2009-04-26 13:46:48 +00:00
Pierre Alliez cde6fb8ad0 AABB tree: added fourth examples with (segment) edges of a polyhedron 2009-04-26 09:27:42 +00:00
Pierre Alliez 3358154717 AABB tree: start adding tests. 2009-04-25 22:21:53 +00:00
Pierre Alliez 20e319a2b9 AABB tree: todo list on tests, remove one mesh data 2009-04-24 22:28:34 +00:00
Pierre Alliez 3316b50890 AABB tree: more comments on examples - added one projection 2009-04-24 22:09:40 +00:00
Pierre Alliez aea8cce7ad AABB tree: one more example with segment 2009-04-24 21:47:52 +00:00
Pierre Alliez e5696fa009 AABB tree: reuse existing file AABB_polyhedron_triangle_primitive.h for the example 2009-04-24 14:38:08 +00:00
Pierre Alliez ce4a6039f5 AABB tree: added two examples (one compiles fine) 2009-04-24 14:11:17 +00:00
Pierre Alliez aeb4889551 AABB tree: move files up 2009-04-24 13:35:41 +00:00
Pierre Alliez 19503da319 AABB tree: add CMake files for examples and tests 2009-04-24 13:20:18 +00:00
Pierre Alliez bc218b5d22 AABB tree: doc 2009-04-24 13:00:46 +00:00
Pierre Alliez be16a94b73 fix link to examples 2009-04-24 12:33:08 +00:00
Pierre Alliez f28804008c fix link to examples 2009-04-24 12:30:56 +00:00
Pierre Alliez f5724113f7 AABB tree: added shark in .eps format 2009-04-24 12:30:44 +00:00
Pierre Alliez 476cf9aeb1 AABB tree: rename triangle primitive to polyhedron triangle primitive 2009-04-24 11:51:03 +00:00
Pierre Alliez 07c87ae231 AABB tree: deleted TrianglePrimtive concept - there is no point to have it 2009-04-24 11:45:39 +00:00
Pierre Alliez 3e25916b51 AABB tree: added two examples and alter doc where the data type is now the Object type. 2009-04-24 11:29:00 +00:00
Pierre Alliez f01b6e147f AABB tree: important pass on the documentation from A.Fabri's review and several discussions with S.Tayeb, L.Rineau and C.Wormser.
remove all _type suffixes to types
distinguish datum from data
A primitive wraps a "geometric object" and an Id - not a primitive and an ide (confusing)
added any_intersected_primitive() to be consistant
2009-04-24 09:42:43 +00:00
Pierre Alliez ec08e7f711 ABABB tree : prepare folders for tests 2009-04-23 15:16:50 +00:00
Stéphane Tayeb c4b6628106 * Projection query correction.
* Remove old code.
2009-04-23 07:38:53 +00:00
Pierre Alliez 9f43b3a035 AABB tree: more on documentation. 2009-04-22 08:22:00 +00:00
Stéphane Tayeb 333e2f0401 First step to CGAL 3.5 specs. 2009-04-22 08:11:45 +00:00
Pierre Alliez 31992dd000 AABB tree: things to be fixed (intersections) 2009-04-21 12:29:26 +00:00
Pierre Alliez 0e7d36fa48 AABB tree: add image for ps compilation and added .ppt source file to dont_submit 2009-04-17 08:41:11 +00:00
Pierre Alliez c057e74544 AABB tree: higher res image for user manual. 2009-04-17 08:24:21 +00:00
Pierre Alliez 2c8b9956cb AABB tree: user manual (added figure and implementation details section) 2009-04-16 15:08:01 +00:00
Pierre Alliez 37b3262e71 AABB tree: added doc 2009-04-16 11:22:16 +00:00
Laurent Rineau 3654111856 Ooops: fix a bug I introduced myself since revision 48240, which was:
" - Rewrite of longest_axis(), which was quite strange, and switch to double,
      as CGAL::Bbox_3 coordinates are always double."

That fix will re-improve the query time.
2009-04-10 17:02:54 +00:00
Laurent Rineau 58f1842820 Improve again the construction time of an AABB_tree (by factor of 5 to 1). 2009-04-10 17:00:10 +00:00
Laurent Rineau 7a340e9d8d Improve the construction time of an AABB_tree for free (by using
std::nth_element, instead of std::sort).
2009-04-09 19:50:51 +00:00
Laurent Saboret 425cc63967 Fixed compilation warnings with VC++ 2009-04-07 14:01:14 +00:00
Laurent Rineau 69cc456852 typo : lenght -> length
(Thanks to Sylvain Pion.)
2009-04-06 12:25:12 +00:00
Laurent Rineau 9b9d32c208 The polyhedral oracle can now be used by Mesh_3. 2009-04-06 12:10:42 +00:00
Laurent Rineau 85bd8c4adb Add a member function AABB_tree::count_intersections 2009-04-06 12:10:09 +00:00
Laurent Rineau d51fcf2fa2 Make AABB_node::max_lenght public, so that AABB_tree can use it. 2009-04-06 12:09:32 +00:00
Laurent Saboret cb2644dab9 Revert revision 48625 that does not compile with g++ 2009-04-03 17:26:19 +00:00
Laurent Saboret 7d659c7483 Fixed compilation warnings with VC++ 2009-04-03 12:38:46 +00:00
Laurent Rineau f86c071b04 - Add constness to AABB_tree,
- Add a method bbox() to AABB_tree, that returns its bounding box.
- Add a method size(), that returns the number of nodes.
- Add a method traversal to AABB_tree, so that one can call it with a
  user-made traversal traits class.
- Add a Drawing_traits traits class, that draws the tree with OpenGL.
- Add predicates and constructions so that one can call
  AABB_tree::intersection with Kernel::Plane_3 as query, and Segment_3 as
  result type.
- New query function AABB_tree::all_intersections.
- The member function AABB_node::intersection is now templatized with a new
  template parameter 'Result', so that the result is not hardcoded to be
  'Point'.
- Three new constructions, for the intersection (and not only do_intersect)
  between a Triangle_3 and (Plane_3, Ray_3, Segment_3).
  (NOTE: That has not been tested intensively. And the intersection with
  Ray_3 and Segment_3 does not handle co-planar intersections, for the
  moment.)
2009-03-30 14:15:33 +00:00
Laurent Rineau 9f3a3e323b Fixes for non-Windows compilers. 2009-03-30 14:05:56 +00:00
Laurent Rineau e13b94d625 Factorize the code between Ray/Line/Segment, using templates. 2009-03-02 11:10:37 +00:00
Laurent Rineau 288525ba5f - Rewrite of longest_axis(), which was quite strange, and switch to double,
as CGAL::Bbox_3 coordinates are always double.
2009-02-26 18:04:56 +00:00
Laurent Rineau 25d930749f - Move the traits First_intersection_traits from AABB_node to AABB_tree.
- Remove AABB_node::first_intersection which is useless.
- AABB_node::traversal is no longer templated by Result_type. Instead of
  passing as argument a 'result' object, and constructing a traits at each
  call, the traits object is constructed once, before calling traversal,
  and passed as argument.
2009-02-26 16:40:40 +00:00
Laurent Rineau 641fa903d8 Yet another move of a function, and add comments. 2009-02-26 11:48:17 +00:00
Laurent Rineau 8972f90ac3 Remove yet another PSC dependency: PSC::do_intersect does not exists! That
means that some do_intersect functions where never instantiated.
2009-02-26 11:39:40 +00:00
Laurent Rineau 249f582387 Move functions definitions into the class, so that one see more clearly, if
possible, the structure of the code.
2009-02-26 11:22:56 +00:00
Laurent Rineau d410bbe3b4 Cosmetic: CGAL_NAMESPACE is obsolete, now. No need to confuse editors and
IDEs by using it.
2009-02-26 10:55:11 +00:00
Laurent Rineau c2c562b508 Add two cosmetic "const" attributes to function of
"First_intersection_traits".
2009-02-26 10:28:40 +00:00
Laurent Rineau 5ec512b917 Remove the psc argument from recursive functions. That one is not used, and
not wanted (the aim is to remove the dependency to the type PSC).
2009-02-26 10:25:52 +00:00
Laurent Rineau f3262130bc Add a comment to explain the trick that uses boost::enable_if and
the Boost MPL:
 http://www.boost.org/doc/libs/release/boost/utility/enable_if.hpp
 http://www.boost.org/doc/libs/release/libs/mpl
2009-02-25 19:14:08 +00:00
Laurent Rineau b13221cfb3 Try a use of boost::mpl::vector, to see what will happen to the testsuite
of Polyhedron_Demo.
(2009-02-24 16:54:31 +0100)

Update: the testsuite of CGAL-3.5-I-32 has validated that change. Great:
let's go and use MPL!
2009-02-24 15:54:31 +00:00
Laurent Saboret 6e404a5e87 Partial merge with Gyroviz AABB_tree. Very minor changes. 2008-10-17 16:03:17 +00:00
Pierre Alliez 6ae6749ad0 cleanup AABB tree: update authors, remove #undef, local includes. 2008-10-14 12:15:10 +00:00
Pierre Alliez d0bf3a2245 AABB tree: remove knn and plucker. a bit of cleanup and update of authors. 2008-10-14 07:43:19 +00:00
Andreas Fabri 50cc203fac Added ETHZ and authors 2008-10-14 06:04:37 +00:00
Andreas Fabri ae5afa9774 cleanup 2008-10-13 18:45:02 +00:00
Andreas Fabri 2465573f24 Add license header 2008-10-13 18:41:47 +00:00
Laurent Rineau e23bac61be Move AABB_tree package info into a sub-directory. 2008-10-07 12:49:32 +00:00
Camille Wormser cfaee22bee just a CR. I think we are good to go with this description. 2008-10-01 13:29:53 +00:00
Pierre Alliez afec08d77e update description AABB tree 2008-10-01 10:28:32 +00:00
Camille Wormser 6212a25eac detail 2008-10-01 09:13:01 +00:00