Commit Graph

67 Commits

Author SHA1 Message Date
Sébastien Loriot 98e471849b moving files from internal to PKG/internal 2021-08-26 11:33:39 +02:00
Jane Tournois 667171927a fix uninitialized parameter, and member, warnings 2020-11-03 17:57:30 +01:00
Jane Tournois 41e1e40827 fix the case ...-vertex-cell-end 2020-10-29 11:59:02 +01:00
Jane Tournois d48aa33305 fix degenerate some degenerate cases
in particular iterations ending with :
- cell-vertex-facet
- vertex-edge-vertex
- cell-vertex-facet
2020-10-27 15:32:01 +01:00
Sébastien Loriot 0a530e39e7 remove extra const 2020-07-20 15:28:50 +02:00
Jane Tournois e7bfe4cb6f add missing license header 2020-07-06 15:27:16 +02:00
Jane Tournois ea3ef4f1b7 ltnext can also be OUTSIDE_AFFINE_HULL, not necessarily facet
in particular when query segment ends on a vertex
2020-07-06 08:19:12 +02:00
Jane Tournois 99ea974425 remove unnecessary includes 2020-07-06 06:54:05 +02:00
Jane Tournois 4eb10d8323 fix license header 2020-07-06 06:44:00 +02:00
Sébastien Loriot a49881536d fix compilation errors and warnings 2020-04-10 18:30:50 +02:00
Sébastien Loriot 2876ad9af1 remove trailing whitespaces 2020-04-10 18:15:32 +02:00
Jane Tournois a69d3f1188 replace all the std::get<i>(tuple) by private accessors
the code gets easier to read and write
2020-04-06 13:23:39 +02:00
Jane Tournois 2eadd494a8 replace CGAL::cpp11::tuple by std::tuple 2020-04-06 07:02:21 +02:00
Jane Tournois 1ef0d4b83d segment traverser end() does not need s and t as parameters
the API gets simpler and easier with these changes

+ fix last valid value of the simplex iterator in some cases

after this commit, only the test test_triangulation_on_a_grid() keeps failing
2020-04-03 18:02:37 +02:00
Jane Tournois b9660603b9 add the new API in the code
and adapt examples and tests consistently
2020-04-03 06:52:25 +02:00
Jane Tournois 3aae44f631 apply Monique's doc review 2020-04-02 07:44:53 +02:00
Jane Tournois a5bf1e1662 make walk_to_next_3() const
and declare variables later when possible
2019-10-14 16:04:56 +02:00
Jane Tournois 80553fbfb1 improve deal of degenerate cases for simplex traverser 2019-10-08 16:48:41 +02:00
Jane Tournois aaf8aa404e fix moving to end() 2019-10-04 16:21:17 +02:00
Laurent Rineau 3c06351ec5 Fix operator-> and add const to the reference and pointer types 2019-10-03 15:02:34 +02:00
Jane Tournois d4289524a9 fix the constructor of Triangulation_segment_cell_traverser
until now, when the query segment started exactly on a vertex/edge/facet,
the constructor was setting _cur to one cell incident to this vertex/edge/facet,
not necessarily the one that was intersected by the segment query

this commit fixes it by introducing the function
`jump_to_intersecting_cell()`, that changes _cur to point to the right cell
2019-10-03 12:25:36 +02:00
Jane Tournois 5813b65267 fix the end conditions of simplex iterator
now we get the last simplex traversed before getting end()
2019-10-03 12:25:36 +02:00
Laurent Rineau 3694d7a005 Only use polymorphism if CGAL_TST_ASSUME_CORRECT_TYPES is undefined 2019-09-12 13:10:14 +02:00
Laurent Rineau c78d4b66a9 Add SPDX license headers 2019-09-12 10:01:20 +02:00
Laurent Rineau e4e065fad5 'how to make superclass for inserter pattern.txt' turned to comment 2019-09-11 11:22:36 +02:00
Jane Tournois 9d23b2f20c move functions from Triangulation_3 to the traverser header
now Triangulation_3.h is the same as in cgal/master branch,
and everything specific to the traverser has been moved to
the traverser header
2019-09-10 19:26:43 +02:00
Jane Tournois 0d6a9e8367 add a benchmark for simplex traverser and cell traverser 2019-09-10 19:21:45 +02:00
Andreas Fabri bbfeedcf5a Oliver's faster walk_to_next_3() 2018-03-16 19:24:36 +01:00
Jane Tournois bd34d03c15 add cheaper orientation function to traverser
it uses Simple_cartesian<double> to make cheaper, though less
precise, tests
2017-09-21 11:39:40 +02:00
Jane Tournois 80c998dfc3 fix errors and warnings for linux g++ 2016-12-08 11:24:58 +01:00
Jane Tournois bf1534d0c6 fix compilation when using c++11
and one warning of switch/case not handled
2016-12-06 17:50:57 +01:00
Jane Tournois 77f7ec43f5 replace boost::variant by Triangulation_simplex_3
a minimal bench showed by this reduces iterator runtime of about 40%
It takes only 10% longer than cell_iterator
2016-12-06 17:08:03 +01:00
Jane Tournois c8dc6ec9d9 cleaning
this cleaning can be done because cell iterator cannot return
twice the same entry point anymore
2016-12-06 12:23:50 +01:00
Jane Tournois 3f80f95b64 add infinite case for edges 2016-12-06 12:19:01 +01:00
Jane Tournois 0eff912763 turn comments into assertions 2016-12-06 11:56:17 +01:00
Jane Tournois e1b715a56a comment out (and fix) code that should not be used anymore
because cell_iterator should not return more than one cell with the
same entry point (useful in the case where the entry vertex, edge,
or facet is traversed exactly)
2016-12-06 11:48:47 +01:00
Jane Tournois 2f8def4ea0 add missing typedef 2016-12-05 16:59:57 +01:00
Jane Tournois addbfb3837 do not return more than one cell_iterator value with same entry
previous commit was dealing with the case where entry is a vertex,
here we deal with all entry types

PLUS fix the edge - facet - vertex degenerate case
2016-12-05 16:36:32 +01:00
Jane Tournois 001894dc7e deal with vertex-degenerate case
when the query segment passes exactly through a vertex, avoid returning more
than one cell containing this vertex
operator++ iterates until it finds a cell which does not contain this vertex
2016-12-05 12:06:51 +01:00
Jane Tournois f31155a0ce Revert "remove random generator"
This reverts commit 8b68ab3459.

# Conflicts:
#	Triangulation_3/include/CGAL/Triangulation_segment_traverser_3.h

NOTE
in the degenerate case where the query passes exactly through an edge
(i.e. through both of its vertices), it could happen that the iterator
"circulates" around the edge, whithout finding a way to get out of this
infinite loop

randomness is re-introduced to avoid this
2016-12-02 16:17:38 +01:00
Jane Tournois 322919f4a2 little cleaning 2016-12-02 16:10:33 +01:00
Jane Tournois b734446d2a use tr.has_vertex(f, v, i) instead of home-made implementation 2016-12-02 15:47:19 +01:00
Jane Tournois 12e8cd91f3 fix the edge - face - vertex degenerate case
and deal with the case where end() is reached while looking for next simplex
2016-12-02 15:00:09 +01:00
Jane Tournois c7fcdc1d08 fix the edge - facet - vertex case 2016-12-02 11:43:13 +01:00
Jane Tournois 76f729ad16 fix the degenerate case where query is collinear with facet
when the query segment goes exactly through a facet, the succession of
simplices should be : edge - facet - edge

however, cell_iterator iterate over both of the cells incident to the
facet in question
so, we skip the 2nd one
2016-12-02 10:49:07 +01:00
Jane Tournois 9e0f52546e cell_iterator may circulate around the edge we want
before actually moving to the next cell crossed by the query segment
2016-11-29 17:54:35 +01:00
Jane Tournois b192b27ec1 add source() and target() functions 2016-11-28 17:24:53 +01:00
Jane Tournois bb98fda6a5 rename function and complete it for facet case 2016-11-28 17:02:06 +01:00
Jane Tournois 76f067aef3 add collinearity tester 2016-11-28 16:59:02 +01:00
Jane Tournois dfd1fd025d vertex case 2016-11-28 16:42:47 +01:00