Commit Graph

53 Commits

Author SHA1 Message Date
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
Jane Tournois a11db75c57 reorder facet case for consistency with edge case
fix compilation, and complete secondary functions
2016-11-28 14:45:23 +01:00
Jane Tournois a46bc3dc9b fix edge case 2016-11-28 14:13:56 +01:00
Jane Tournois 46f2f353fa facet and cell case 2016-11-28 12:18:03 +01:00
Jane Tournois f8c13bad64 vertex - edge - vertex case is a degenerate case
add degeneracy() fonction to detect this kind of case
2016-11-28 10:54:21 +01:00
Jane Tournois e340b38d86 rename member variables 2016-11-25 16:11:03 +01:00
Jane Tournois f0adff5f66 handle the edge case
when the query passes exactly only an edge
2016-11-25 16:02:08 +01:00
Jane Tournois 90c109f3ce rename function 2016-11-22 17:15:49 +01:00
Jane Tournois 99350fcefc fix end case 2016-11-22 16:39:02 +01:00
Jane Tournois 2e4a93f967 add Triangulation_segment_simplex_iterator_3
this new iterator is similar to Triangulation_segment_cell_iterator_3,
but iterates over simplices of all dimensions instead of only cells.

if [source, target] crosses cell1, and enters cell2 via their common
vertex v,
then the iterator returns cell1, v, and cell2 successively
2016-11-22 15:10:41 +01:00
Jane Tournois c173212124 WIP simplex iterator 2016-11-08 15:43:24 +01:00
Jane Tournois 24e26634f5 remove useless Dummy_gt 2016-11-08 15:12:57 +01:00
Jane Tournois 8b68ab3459 remove random generator 2016-11-08 15:06:57 +01:00
Jane Tournois 6afd0fc72a remove the extra tds constructed to store source and target as vertices
this implies changing all `vert` containers into arrays of Point*
(instead of arrays of Vertex_handle)
2016-11-07 15:20:06 +01:00
Thijs van Lankveld 7508c18322 Iterator pattern implemented. 2016-10-21 12:33:37 +02:00