Commit Graph

83 Commits

Author SHA1 Message Date
Sébastien Loriot bab2c72674 add functor to compute intersection point of coplanar segments 2023-07-06 16:53:51 +02:00
Sébastien Loriot a8a3d8ab36 add functor to compute the intersection of 3 independant planes 2023-07-06 15:39:08 +02:00
Sébastien Loriot b86a1fed32 Merge remote-tracking branch 'sloriot/PMP-BF_autorefine' into PMP-BF_autorefine 2023-07-05 17:59:29 +02:00
Sébastien Loriot 003bf47781 move alpha computation into a functor 2023-06-08 14:05:09 +02:00
Sébastien Loriot fbe559adc9 Merge 'cgal/master' into PMP-decimation 2023-02-14 08:33:24 +01:00
Mael Rouxel-Labbé 873cc884b5 Get rid of _RT / _RT_FT kernel interface macros 2022-09-22 12:03:25 +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 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 d0ed65838e Fix interface_macros 2021-11-03 17:39:21 +01: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 e98198178f Add the functor Non_zero_dimension_3 to the Kernel 2021-03-23 15:45:54 +01:00
Andreas Fabri 45909e6d76 Let's fix it step by step, beginning with Do_intersect_3 2021-03-22 09:01:56 +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
Andreas Fabri d5a5b20ce8 Make it clear that the functor is not part of the Kernel concept 2021-02-19 20:23:20 +00:00
Andreas Fabri eafad68789 Add a function that only constructs a point intersection for 3 planes 2020-10-20 09:17:15 +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
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
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
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 0698f79aff add SPDX identifier for files under the LGPL-3+ license 2017-11-12 10:17:50 +01:00
Andreas Fabri 5573e5d15e Is_degenerate_{2,3} and Collinear_{2,3} are division free 2017-07-11 20:31:28 +02:00
Andreas Fabri 061a9b1ecd Kernel:23 Add Compare_slope_3 2017-05-12 09:48:21 +02:00
Mael Rouxel-Labbé c79e2d4b36 Added Compute_power_product_2 to the 2D kernel predicates
doc + test included
2017-04-21 13:07:40 +02:00
Mael Rouxel-Labbé bb086ff739 Added power_side_of_bounded_power_circle_2 to the 2D kernel predicates
A partial implementation was deleted from the Alpha_shapes_2 package without
moving the functions to the kernel...
This implementation adds the missing overloads (4, 3, and 2 points)

Test + doc included
2017-04-21 11:37:27 +02:00
Mael Rouxel-Labbé a751464ab6 Minor fixes to weighted functors (doc + cleaning) 2017-04-21 11:31:13 +02:00
Mael Rouxel-Labbé dd2e7f3a0c Made compute_squared_smallest_orthogonal_circle_2() a kernel functor
and documented, tested, etc. it

Previously in Alpha_shape_2
2017-04-19 11:06:14 +02:00
Mael Rouxel-Labbé 365cfd0566 Fixed predicate Power_side_of_oriented_power_sphere_3
The Homogeneous kernel doesn't know how to run that predicate
for 3 or 4 arguments so it must be defined in Kernel/function_objects until
those operators are added
2017-04-06 21:57:21 +02:00
Andreas Fabri 32e3d1bebd Division free functors may use Mpzf 2017-03-01 17:16:31 +01:00
Sébastien Loriot 9ae7b37845 Merge pull request #1745 from sloriot/Polyhedra_corefinement-enhancements-sloriot
Add corefinement operations in PMP
2017-01-12 12:05:18 +01:00
Sébastien Loriot cba8456715 add constructions for the intersection point of a plane by a line and of 2 lines
this is undocumented and allow to have a lazy node for this construction
2017-01-02 19:23:48 +01:00
Maxime Gimeno b0dd7d25cb Add Compute_L_infinity_distance_3. 2016-12-21 09:41:33 +01:00
Andreas Fabri eb7e38493c Add the function FT l_infinity_distance(Point_2, Point_2)
as well as the corresponding functor

This is a function where the implementation is in the file
Kernel_23/include/CGAL/Kernel/function_objects.h

When the implementation is different for Cartesia and Homogeneous coordinates
the code should go into the function_objects.h files
in the packages Cartesian_kernel and Homogeneous_kernel
2016-12-21 09:40:53 +01:00
Jane Tournois 306323d45c make doc and doc consistent
- add "model of Concept" as much as possible in the modified classes/concepts
- fix some links
- update package description of Kernel_23
2016-11-03 14:55:39 +01:00
Andreas Fabri ad9d2c369c Rename tests following Olivier's recommendations 2016-11-03 14:53:54 +01:00
Andreas Fabri 842aad6e76 Fix which predicates can be done without division 2016-11-03 13:10:27 +01:00
Andreas Fabri 9dde08c414 WIP 2016-11-03 13:07:50 +01:00
Andreas Fabri 9e94ee6178 Change the Power_test 2016-11-03 13:07:17 +01:00
Andreas Fabri 1375cd5c0a Rename Compute_critical_squared_radius_3 to Compute_power_distance_to_power_sphere_3 2016-11-03 13:07:17 +01:00
Andreas Fabri 514765a784 Documentation 2016-11-03 13:07:17 +01:00