Mael Rouxel-Labbé
73de5e49f4
Remove unnecessary include
2022-10-12 21:32:30 +02:00
Mael Rouxel-Labbé
2c23a6d5c5
Revert back to wrapping result_type to distinguish FT-necessary operator()s
2022-10-12 21:24:59 +02:00
Mael Rouxel-Labbé
d0fe75e908
Add missing FT_necessary tags
2022-09-23 11:35:12 +02:00
Mael Rouxel-Labbé
873cc884b5
Get rid of _RT / _RT_FT kernel interface macros
2022-09-22 12:03:25 +02:00
Mael Rouxel-Labbé
214e072959
Switch from RT_sufficient to FT_necessary
2022-09-22 12:02:53 +02:00
Laurent Rineau
a267cee598
Avoid one intermediate call to the global (non-internal) function
2022-09-15 16:05:35 +02:00
Laurent Rineau
f52298a8c5
WIP: try to always use Filtered_predicate_RT_FT
2022-09-08 17:30:14 +02:00
Laurent Rineau
03b1501508
Merge branch 'Kernel-Compare_distance_3_RT_FT-GF' into Kernel-Compare_distance_3_RT_FT__new_proposal-GF
2022-09-07 14:49:45 +02:00
Laurent Rineau
dcca65b740
Spelling typo
2022-09-07 14:48:45 +02:00
Laurent Rineau
4b660d9ec9
Another proposal for Filtered_predicate_RT_FT
...
Instead of having the return type wrapped in a `Needs_FT` tag,
not the call operator overloads that can be called with `RT` are
"tagged" by adding a last argument of type `RT_sufficient` with a
default value.
2022-09-07 11:10:13 +02:00
Laurent Rineau
7c92341be7
Introduce CGAL_Kernel_pred_RT_or_FT
...
This commit introduces a new kind of predicate in
`<CGAL/Kernel/interface_macros.h>`. In addition to
- `CGAL_kernel_pred` for predicates,
- `CGAL_Kernel_pred_RT` for predicates that can be implemented using a
ring-type,
now there is also:
- `CGAL_Kernel_pred_RT_or_FT` for predicates with multiple overloads of
`operator()`, some needing a field type and other needing a ring type
(without the division operator).
The C++ code can discriminate between the two cases with a special wrapper
for the return type: `CGAL::Needs_FT<result_type` instead of `result_type`
(defined in `<CGAL/tags.h>`.
In `<CGAL/Filtered_predicate.h>`, in addition to the usual class template
`Filtered_predicate`, there is now also `Filtered_predicate_RT_FT` that
takes three predicates as template parameters instead of two:
- the exact predicate with an ring-type,
- the exact predicate with a field-type,
- the approximate predicate (with `Interval_nt` as number-type).
For the moment, only `Compare_distance_3` in
`<CGAL/Cartesian/function_objects.h>` is using the new
`Filtered_predicate_RT_FT`.
Before this commit, the file
`Kernel_23/test/Kernel_23/include/CGAL/_test_new_3.h` was testing
`Compare_distance_3` only with three points or for points. This commit adds:
- a test with `Point_3, Point_3, Segment_3`, and
- a test with `Line_3, Point_3, Point_3`, that actually needs a field type
with its current implementation.
In the test `Kernel_23/test/Kernel_23/Filtered_cartesian.cpp`, the macro
`CGAL_NO_MPZF_DIVISION_OPERATOR` is defined, to remove the division operator
from `CGAL::Mpzf`. `CGAL::Mpzf` is a ring-type, even with its `operator/`
(because that `operator/` can only compute exact divisions), but with
`CGAL_NO_MPZF_DIVISION_OPERATOR` defined, that is now checked by the compiler.
2022-09-02 11:31:47 +02:00
Sébastien Loriot
4f5f8341cc
use std::enable_if_t
2022-06-10 07:37:53 +02:00
Sébastien Loriot
ebf9fb025a
Merge remote-tracking branch 'cgal/5.4.x-branch'
2022-05-26 18:13:59 +02:00
Sébastien Loriot
f29015ef1c
please intel 2019 compiler
2022-05-25 00:22:24 +02:00
Sébastien Loriot
2b547ec58a
Merge remote-tracking branch 'cgal/5.4.x-branch'
2022-05-13 17:26:04 +02:00
Andreas Fabri
46d1aea329
Convex_hull_3: Use K::Boolean and not bool
2022-05-09 15:30:26 +01:00
Andreas Fabri
9023aaa542
More code for ORIGIN
2022-04-07 10:39:01 +01:00
Sébastien Loriot
3a03201ff1
Merge pull request #6338 from MaelRL/PMP-Orient_PS_with_PS-GF
...
Add orient_triangle_soup_with_reference_triangle_soup()
2022-03-30 08:03:29 +02:00
Andreas Fabri
71bba3e226
Add Plane_3 constructor with Origin/Vector_3
2022-03-17 22:35:09 +01:00
Mael Rouxel-Labbé
8d95d22a9e
Tiny indentation fix
2022-03-15 00:46:39 +01:00
Sébastien Loriot
d16dfc381e
add Compare_angle_3 functor in the Kernel
2022-01-27 19:43:21 +01:00
Sébastien Loriot
d228e994cf
predicate requires only RT
2022-01-27 18:29:39 +01:00
Andreas Fabri
a24229a6b2
Use homogeneous coordinates
2021-11-04 15:46:45 +01:00
Andreas Fabri
d0ed65838e
Fix interface_macros
2021-11-03 17:39:21 +01:00
Andreas Fabri
7cb53ab8ef
Change to NonZeroCoordinateIndex
2021-11-03 17:30:26 +01:00
Mael Rouxel-Labbé
e424356ffa
Add Construct_projected_point_3(P3, P3) + correct parameter order
...
Not a kernel requirement
2021-09-28 15:34:51 +02:00
Sebastien Loriot
92d90a4a11
Merge pull request #5667 from afabri/Kernel-compare_slopes-GF
...
Kernel: Add compare_slope with 4 points
2021-08-12 10:12:26 +02:00
Laurent Rineau
0f906ae606
Merge pull request #5545 from Dig-Doug/segment-midpoint
...
Segment_2/Segment_3 midpoint()
2021-07-07 14:37:38 +02:00
Andreas Fabri
ea647297b9
Kernel_23: Fix Non_zero_dimension
2021-05-22 16:21:49 +02:00
Andreas Fabri
b2bb10710c
untabify
2021-05-01 17:10:22 +02:00
Andreas Fabri
4e1ebec30a
untabify
2021-05-01 17:04:52 +02:00
Andreas Fabri
20d1629e1b
Add compare_slope with 4 points
2021-04-30 17:39:57 +02:00
Laurent Rineau
c091c7f86e
Merge pull request #5532 from lrineau/Kernel_23-Do_interesect__without_division-GF
...
Remove operator/ from CGAL::Mpzf and implement Do_intersect_3 with RT only (without division)
2021-04-28 15:24:15 +02:00
Andreas Fabri
d3b26a60cb
The free function must call the functor
2021-04-22 17:35:27 +01:00
Sébastien Loriot
68dc09b3d9
optimize filter failures
...
cmp_epeck_points.cpp runtime goes from 23s. to 5s.
based on mglisse suggestion
2021-04-10 07:12:25 +02:00
Laurent Rineau
1b54449dc5
Merge pull request #4878 from danston/Kernels-decltypes-danston
...
Improve decltype/result_of/invoke_result
2021-04-06 15:13:21 +02:00
Laurent Rineau
de704d8bb9
Merge pull request #5522 from afabri/Nef_3-accelerate_do_intersect_internally-GF
...
Nef_3: Do not test has_on for a point where we know that it will be true
2021-04-06 15:13:07 +02:00
Laurent Rineau
0f61f96c80
Merge pull request #5556 from MaelRL/Kernel_23-Dont_recompute_normal_in_proj_point-GF
...
Fix inconsistency in normal computation in robust projection code
2021-04-06 15:12:53 +02:00
Mael Rouxel-Labbé
48bb925b65
Fix inconsistency in robust projection code
...
If the triangle/plane is degenerate, the case is handled separately.
If we know the plane is not degenerate, the normal should not
be recomputed in a different manner, which might lead
to a null normal and some issues down the line.
2021-03-26 10:41:30 +01:00
Andreas Fabri
e0b410e2e6
int -> result_type
2021-03-24 16:03:51 +01:00
Andreas Fabri
a28a7cd44a
Return directly
2021-03-23 17:11:26 +01:00
Andreas Fabri
e98198178f
Add the functor Non_zero_dimension_3 to the Kernel
2021-03-23 15:45:54 +01:00
Doug Roeper
6e4be92b5e
Adds a CGAL::midpoint() implementation for Segments.
2021-03-22 09:11:23 -04:00
Andreas Fabri
45909e6d76
Let's fix it step by step, beginning with Do_intersect_3
2021-03-22 09:01:56 +01:00
Andreas Fabri
be39ec02fa
Add a solve that 'returns' the denominator instead of making the division
2021-03-18 14:18:11 +01:00
Laurent Rineau
b32250242a
CGAL_Kernel_pred_RT for Do_intersect_2 and Do_intersect_3
...
The code is not ready for that. A lot of overloads of
`Do_interesect_[23]` are implemented by calling the equivalent
overloads from `Intersect_23` (that requires division of coordinates).
2021-03-17 11:34:08 +01:00
Dmitry Anisimov
00c185b028
Merge branch 'master' into Kernels-decltypes-danston
2021-03-12 12:06:20 +01:00
Laurent Rineau
f1e550fdd2
Merge pull request #5363 from sloriot/Kernel-Oriented_side_extra_operator
...
Add an extra operator to have an exact plane
2021-03-03 17:33:20 +01:00
Andreas Fabri
d5a5b20ce8
Make it clear that the functor is not part of the Kernel concept
2021-02-19 20:23:20 +00:00
Dmitry Anisimov
81d9556707
Merge remote-tracking branch 'upstream/master' into Kernels-decltypes-danston
2021-02-10 10:06:45 +01:00
Dmitry Anisimov
af3f6dd07f
fixed warnings with Intersect_3 and result_of
2021-02-09 17:30:06 +01:00
Sébastien Loriot
107567e809
add an extra operator to have an exact plane
2021-01-15 15:38:28 +01:00
Dmitry Anisimov
3127190bcf
marc's review
2020-12-08 12:48:04 +01:00
Andreas Fabri
5791bc1400
fix do_intersect for 3 planes
2020-10-20 14:55:52 +01:00
Andreas Fabri
fefbc4bc1a
Add funcion intersection_point for Line/Plane
2020-10-20 09:17:15 +02:00
Andreas Fabri
eafad68789
Add a function that only constructs a point intersection for 3 planes
2020-10-20 09:17:15 +02:00
Andreas Fabri
46698620e3
Hack for a fix of do_intersect(Plane_3,Plane_3,Plane_3)
2020-10-20 09:17:15 +02:00
Dmitry Anisimov
ad813b4cb0
further removed result_of and result
2020-07-30 16:19:02 +02:00
Dmitry Anisimov
4248a8a9f7
lazy and type mapper result_of fix
2020-07-23 16:00:06 +02:00
Dmitry Anisimov
da0635e4b1
result_of changed to decltype
2020-07-20 17:03:28 +02:00
Maxime Gimeno
9bf61b7977
more fixes
2020-04-22 11:02:16 +02:00
Sébastien Loriot
a8f9858099
Merge remote-tracking branch 'cgal/releases/CGAL-5.0-branch'
2020-04-16 16:29:55 +02:00
Sébastien Loriot
4476663eba
fix compilation error...
2020-04-08 16:14:44 +02:00
Sébastien Loriot
a943082eff
Update branch from master after trailing whitespaces and tabs removal
2020-03-26 19:01:31 +01:00
Sébastien Loriot
8bb22d5b2c
extra run of the script to remove tabs and trailing whitespaces
...
right after the merge of the 5.0 release branch
+ manual fix of the files (indentation was changed in the meantime):
* Spatial_sorting/include/CGAL/Multiscale_sort.h
* Spatial_sorting/test/Spatial_sorting/test_multiscale.cpp
2020-03-26 14:26:59 +01:00
Sébastien Loriot
8b153fb495
Merge branch 'cgal/releases/CGAL-5.0-branch'
...
whitespace+tab removal, merged with option -Xignore-space-change
2020-03-26 14:22:32 +01:00
Sébastien Loriot
0779373835
extra run of the script to remove tabs and trailing whitespaces
...
right after the merge of 4.14 release branch
+ manual fix on one line in:
* Arrangement_on_surface_2/include/CGAL/IO/Arr_text_formatter.h
* .travis/generate_travis.sh
2020-03-26 14:16:06 +01:00
Laurent Rineau
0260afee8c
Merge pull request #4542 from sloriot/Kernel-compare_distance_use_FT
...
Use FT instead of RT
2020-03-05 14:52:06 +01:00
Laurent Rineau
0d393fb8db
Merge pull request #4542 from sloriot/Kernel-compare_distance_use_FT
...
Use FT instead of RT
2020-03-05 14:50:42 +01:00
Andreas Fabri
99eea7ac21
Add operator for line/point/point
2020-02-25 16:47:12 +00:00
Sébastien Loriot
ba2f2c1c20
use FT instead of RT
...
Compare_distance_3 is a generic functor that is comparing
the returned value of Squared_distance_3. If called to
compare the distance of a point to a plane/segment/triangle
a division is used leading to runtime error.
2020-02-25 14:25:20 +01:00
Mael Rouxel-Labbé
4536ea4f53
Clean whitespace (no changes)
2020-01-16 12:33:01 +01:00
Andreas Fabri
cc75efdbb5
Add static filter for Coplanar_3
2019-11-07 15:57:23 +01:00
Sébastien Loriot
52164b1fba
First pass on removing license notice in header for LGPL files
2019-10-19 15:40:30 +02:00
Sébastien Loriot
7356421d80
introduce Commercial license SPDX tag
2019-10-19 12:15:19 +02:00
Sébastien Loriot
9bd9c68b83
update LGPL[23]+ and GPL[23]+ SPDX tags
...
ack -l --no-svg "SPDX-License-Identifier: GPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-3.0+/SPDX-License-Identifier: GPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-3.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-3.0+/SPDX-License-Identifier: LGPL-3.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: GPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: GPL-2.0+/SPDX-License-Identifier: GPL-2.0-or-later/"
ack -l --no-svg "SPDX-License-Identifier: LGPL-2.0\+" | xargs sed -i "s/SPDX-License-Identifier: LGPL-2.0+/SPDX-License-Identifier: LGPL-2.0-or-later/"
2019-10-18 21:57:54 +02:00
Andreas Fabri
0f267c53e3
Make 2d segment segment distance more robust for kernel without exact constructions
2019-08-29 14:54:03 +02:00
Laurent Rineau
3e4b177506
Merge pull request #4116 from MaelRL/Kernel_23-Generalize_ray_point_method-GF
...
Change ray_23 and line_23's point(int) function to point(FT)
2019-08-19 12:54:38 +02:00
Laurent Rineau
0d7fd463ff
Merge pull request #4116 from MaelRL/Kernel_23-Generalize_ray_point_method-GF
...
Change ray_23 and line_23's point(int) function to point(FT)
2019-08-19 12:53:59 +02:00
Mael Rouxel-Labbé
6c8a8f347d
Change ray/line.point(int --> FT)
...
There is no real requirement on it being an 'int', except some symmetry with
the segment.
2019-07-26 15:59:52 +02:00
Laurent Rineau
8fd3f2d8fd
Merge pull request #3973 from sgiraudot/Kernel_23-Add_hash_functions-GF
...
[Small Feature] Add hash functions for kernel objects
2019-06-20 14:21:09 +02:00
Simon Giraudot
c3c825519c
Add missing inlines
2019-06-06 09:51:10 +02:00
Simon Giraudot
72ea50ae77
Change condition on FT/Kernel for hash functions
2019-06-05 10:50:08 +02:00
Simon Giraudot
070a26a5b7
Fix missing inclusions + ADL for hash_value
2019-06-05 10:43:28 +02:00
Andreas Fabri
4581f1b7a8
Morte replacements
2019-06-05 08:39:55 +02:00
Simon Giraudot
9ee478139b
Remove hash for Direction_23/Ray_23 as equality is more complicated
2019-06-04 13:26:05 +02:00
Simon Giraudot
d88b7bab69
Hash functions for many kernel objects
2019-06-03 15:56:07 +02:00
Simon Giraudot
a954fbf69e
Add hash function for Point_3
2019-06-03 14:36:32 +02:00
Laurent Rineau
90782d4b7f
Revert the merge of two pull-requests that target CGAL-4.14-branch
...
- Revert "Merge pull request #3857 from MaelRL/CGAL-Fix_duplicate_non_manifold_vertices-GF"
- Revert "Merge pull request #3898 from lrineau/Mesh_3-stop_during_protection-lrineau"
2019-05-14 17:50:45 +02:00
Andreas Fabri
e60f69e669
Compute sqrt only once
2019-04-11 09:48:32 +02:00
Andreas Fabri
42af962bc2
Add overload for two vectors
2019-04-11 09:48:32 +02:00
Andreas Fabri
0e75cea23c
Simplify the code
2019-04-11 09:48:30 +02:00
Andreas Fabri
d62d88196e
Add a function to compute the angle between three 3D points
2019-04-11 09:48:30 +02:00
Sébastien Loriot
1d908c1c0b
remove code for CGAL_INTERSECTION_VERSION 1
2019-03-29 13:28:32 +01:00
Sébastien Loriot
0685423ae8
update from cgal/master
2018-11-02 11:32:31 +01:00
Sébastien Loriot
0202bc879e
add an extra operator for plane-line(pt,pt)
2018-06-04 17:21:01 +02:00
Andreas Fabri
0d3ac75518
Introduce namespace Intersections
2018-05-04 08:57:56 +02:00
Maxime Gimeno
67ca3f9dcb
fixes
2018-04-27 09:18:48 +02:00
Maxime Gimeno
b20d0e0908
Optimization
2018-04-26 10:02:43 +02:00
Maxime Gimeno
bcfb7afead
Add an operator for a Ray_3 to ConstructProjectedpoint_3
2018-04-25 15:32:36 +02:00