Commit Graph

159 Commits

Author SHA1 Message Date
Philipp Möller a6f4cb16ae Macro for versioning the intersections and support for both versions in the top level function. 2011-11-08 11:56:57 +00:00
Sébastien Loriot 91a5327fa8 change LGPLv2 -> LGPLv3 2011-10-10 13:48:25 +00:00
Sébastien Loriot dff6dda8b3 Remove from copyright holder
Freie Universitaet Berlin (Germany), Martin-Luther-University Halle-Wittenberg
(Germany) and RISC Linz (Austria) as they transfer the copyright to other
sites.
2011-09-21 19:46:31 +00:00
Philipp Möller 5b925d6f6e * Reworked Intersection_traits into a single traits, adjusted
intersections accordingly, turned on IT<....> as return type
* removed result_type from the intersection functors
2011-08-25 10:18:31 +00:00
Philipp Möller 2f9b36d618 * intersection and do_intersection now pick their appropriate
overloads automatically;

* a test for the availability of all calls has been added
2011-07-12 16:53:49 +00:00
Laurent Rineau 665c0ea8c1 Kernel::Compare_Squared_distance_[23]::operator() has now the following
overloads:

  template <typename T1, typename T2> 
  Comparison_result 
  operator()(T1, T2, Kernel::FT);

and 

  template <typename T1, typename T2, typename T3, typename T4> 
  Comparison_result 
  operator()(T1, T2, T3, T4); // compare distances |t1, t2|^2 and |t3, t4|^2.

Before that revision, the types T_i were hardcoded to Kernel::Point_3
without any reason.

And Kernel::Compare_Squared_distance_2 and
Kernel::Compare_Squared_distance_3 now have the same implementation, and
almost the same documentation (but the set of admitted input types). The
implementations could even have been factorized.

(The Kernel_23 testsuite passes on Linux, as well as the doc_tex testsuite.)
2010-06-30 12:19:54 +00:00
Laurent Rineau a97730f073 Move Compare_squared_distance_[23] from Cartesian and Homogeneous to
Kernel_23: their implementation were identical.
2010-06-30 10:04:49 +00:00
Sébastien Loriot 2a1e9fe728 vertex function of triangle use Has_qrt
add specialization of Qualified_result_of for Iso_cuboid

(added because I needed to have const ref on triangle points)
2010-06-22 07:17:59 +00:00
Sébastien Loriot 52317dd49f add python script (replace_CGAL_NAMESPACE.py) to replace CGAL_BEGIN_NAMESPACE and CGAL_END_NAMESPACE
by namespace CGAL { and } //namespace CGAL. in all .h and .cpp files
in a directory.
Apply it to all packages in the trunk
Remove macro definition from the config.h file.
2010-06-09 07:37:13 +00:00
Laurent Rineau 4a383b3197 In Compare_dihedral_angle_3, add the comparison between the dihedral angle
defined by four points (or three vectors), and a FT. The FT represents the
cosine of the angle.

The code passes the testsuite. Documentation coming...
2009-08-26 11:31:51 +00:00
Laurent Rineau a210c87658 Let's use v.squared_length() instead v*v. 2009-08-25 15:48:33 +00:00
Laurent Rineau 09c4682e0b Typo: s/cosinus/cosine/.
(Thanks to Sylvain for his review of my patch r51491.)
2009-08-25 15:26:08 +00:00
Laurent Rineau 146aa66bca Remove commented code. 2009-08-25 14:58:19 +00:00
Laurent Rineau 22798366ad Add a new predicate in the Kernel: Compare_dihedral_angle_3. 2009-08-25 14:48:41 +00:00
Sylvain Pion 8573fe26ce Rename CGALi to internal. 2009-08-24 17:10:04 +00:00
Laurent Rineau b9fcb4ff62 Revert that change:
-----------------------------------------------------------------
   | New Revision: 51399
   | Author: lrineau
   | Date: 2009-08-21 16:01:46 +0200 (Fri, 21 Aug 2009)
   |  
   | Log message:
   |  
   | Add a CGAL_kernel_assertion_code, in
   | Construct_circle_2::operator()(Point_3, Point_2, Point_2), to avoid some
   | unneeded calculus to be performed when NDEBUG is defined.
   -----------------------------------------------------------------
2009-08-24 09:52:55 +00:00
Laurent Rineau b0b7c5b629 Add a CGAL_kernel_assertion_code, in
Construct_circle_2::operator()(Point_3, Point_2, Point_2), to avoid some
unneeded calculus to be performed when NDEBUG is defined.
2009-08-21 14:01:46 +00:00
Andreas Fabri 9b6425f55c Forward argument 'orientation' 2008-12-08 14:47:16 +00:00
Pedro Machado Manhaes de Castro 8960a3dd58 Some forgotten operators on functors for Circle_3 2008-10-02 16:31:35 +00:00
Pedro Machado Manhaes de Castro 642a419079 Is_degenerate_3 functor for Circle_3 2008-09-16 12:48:45 +00:00
Pedro Machado Manhaes de Castro 0ce9d35d32 Construct_supporting_plane => Construct_plane, Construct_diametral_sphere => Construct_sphere 2008-09-16 12:45:08 +00:00
Sylvain Pion 4c79d1d5cf Rename Bool_type to Boolean. 2008-08-26 13:40:26 +00:00
Sylvain Pion 0a76cd42f7 Remove the deprecated linear kernel functors Construct_supporting_line_2 and
Construct_supporting_line_3.  (they were deprecated in 2004).
2008-07-28 16:07:28 +00:00
Michael Hoffmann 8dd4cd38ca Remove functional_base include. 2008-07-23 14:50:58 +00:00
Sylvain Pion 79864c0c8e Remove Arity_tag. 2008-07-22 12:29:01 +00:00
Pedro Machado Manhaes de Castro e8663963f2 Constructing a Circle_3 passing through three points p, q, r 2008-07-17 14:08:50 +00:00
Sylvain Pion 173ef7c590 Allow propagation of Uncertain-ty in more places, to reduce the number of exceptions.
- Use K::Bool_type, K::Orientation... instead of bool, CGAL::Orientation...
- More functions around Uncertain<> : make_certain(), extract_singleton(),
                                      possible conversions tightenning.

Many conversions still remain, e.g. for switch and if statements, &&, ||...
2008-07-16 13:45:13 +00:00
Pedro Machado Manhaes de Castro 4527058121 Fixing Lazy for Circle_3 2008-06-26 14:26:49 +00:00
Pedro Machado Manhaes de Castro 5cf2eb63cd fixing the 03/06/2008 red mosaic 2008-06-04 07:52:01 +00:00
Pedro Machado Manhaes de Castro fc45f43179 Adding Circle_3 object to the Kernel. 2008-06-03 12:17:16 +00:00
Sylvain Pion 4873e53de2 Move:
<CGAL/Kernel/Cartesian_coordinate_iterator_2.h>
  <CGAL/Kernel/Cartesian_coordinate_iterator_3.h>
To:
  <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_2.h>
  <CGAL/Filtered_kernel/Cartesian_coordinate_iterator_3.h>
2008-04-09 18:06:00 +00:00
Sylvain Pion 11bbf3e2de Vector_2 and Vector_3 now also provide a Cartesian_const_iterator. 2008-04-09 17:58:57 +00:00
Andreas Fabri a322da0f0e Added preconditions and made it more efficient 2008-01-18 13:42:39 +00:00
Andreas Fabri e1f07a4bde Added normal and unit_normal function ans functors 2008-01-18 12:56:56 +00:00
Andreas Fabri b0a58d5601 removed unused parameters 2007-03-17 09:51:49 +00:00
Andreas Fabri 49df0a4603 Removed template member function. It is not clear why it is needed and causes trouble for the Circular_kernel_3 testsuite for VC++ 2007-02-01 16:18:38 +00:00
Sylvain Pion 70b3bee5af Move 3D .bbox() to the functors to make Lazy_kernel pass, and enhance the test-suite to test .bbox() 2006-12-27 23:26:06 +00:00
Andreas Fabri 1cdfe0a29b Added a circle constructor with two points and bulge 2006-09-01 13:25:52 +00:00
Sylvain Pion ed36e763c7 Second part of Return_base_tag changes. 2006-08-16 16:38:49 +00:00
Sylvain Pion 2eb12d7441 - First part of introduction of Return_base_tag workaround for lack
of "forwarding constructors".
  Quoting some comment in the code:
  "
    This is a simple tag which is used as additional (first) argument in
    some kernel functors, to tell them to return the base (rep) class,
    instead of the main type (e.g. Kernel_base::Point_2 instead
    of Kernel::Point_2).  This is a minor optimization which prevents
    useless copies of the "reps".

    Those functors are only those used in the constructors of the kernel
    types like Point_2, so it's limited.

    The real solution will be to use "forwarding constructors", when they
    will be available in C++.
    In the mean time, this should be a mostly/hopefully internal hack.
  "
2006-08-16 14:56:11 +00:00
Andreas Fabri 6830557518 fixed min/max problem 2006-08-16 14:08:44 +00:00
Sylvain Pion daee2152ec Make the return type of the function operator() of the
Construct_point_2 functors be the Rep class (the base).
This avoids conversions Rep -> Point_2 -> Rep, hence
useless copies of objects.
The result_type of the functors does not change
(we therefore return a type which is only convertible
to result_type, but hopefully this is fine, and what standard
requirements on functors are anyway).
A real fix for this would require the language addition of
"forwarding constructors".
2006-08-11 11:48:16 +00:00
Sylvain Pion 38853d1b10 - Optimize equi_distant_line() by merging the calls to
circumcenter() and cross_product().
- Add ctors to Point_[23] and Vector_[23] that take
  int, double, and FT coordinates, instead of only RT.
2006-08-07 15:57:40 +00:00
Sylvain Pion c9de727dd2 New construction equi_distant_line(3 Point_3), with functor. 2006-08-04 15:03:16 +00:00
Sylvain Pion fcbacc1284 Have squared_distance(Point_3, Point_3) call its functor. 2006-08-04 12:41:56 +00:00
Sylvain Pion ea748e53d4 Add new constructor to Iso_rectangle_2(Point_2, Point_2, int).
The additional dummy "int" specifies that the 2 points are
the lower-left and upper-right corner.  This is more efficient
when one knows they are already in this configuration.

Same thing for Iso_cuboid_3, and the functors.

Use them in Cartesian_converter and Homogeneous_converter.
2006-08-03 09:40:12 +00:00
Sylvain Pion 64d8c5e77a - Remove blanks at end of line
- Make Assign_[23]::result_type be bool instead of K::Bool_type.
  (it can't be Uncertain<bool>).
2006-08-03 08:40:47 +00:00
Sylvain Pion b7614eee4e More code move towards user classes, and improve 3D support for LazyK. 2006-08-02 11:23:56 +00:00
Sylvain Pion 38956c9b10 Move yet another bunch of code to user classes... 2006-08-01 16:15:07 +00:00
Sylvain Pion ca7ca6c0bc More code move to user classes. 2006-08-01 15:39:37 +00:00
Sylvain Pion 4408fa1c2a More code move to user classes. 2006-08-01 14:10:09 +00:00
Sylvain Pion a04f166f1f - Move more code to the "user classes". 2006-08-01 13:17:03 +00:00
Sylvain Pion cbd6fc9417 Move .transform() in the 3D user classes.
Move some functions in the 3D user classes instead of the internal
 rep classes.
2006-08-01 12:09:47 +00:00
Sylvain Pion 0c5460ccfa - Have free operator== and != call the Equal_3 functor for 3D kernel objects.
- Introduce .rep() in 3D kernel objects.
2006-08-01 07:56:38 +00:00
Efi Fogel d083fa1323 renamed Bool to Bool_type to avoid a conflict between a macro of the same name defined in Xlib.h 2006-06-13 14:35:40 +00:00
Andreas Fabri 02497d2b97 Removed the general operator in Equal_2 2006-04-20 08:32:23 +00:00
Laurent Saboret db6a8f948c Change CVS keywords to SVN style 2006-02-16 14:30:13 +00:00
Laurent Saboret 1aad55d4cb Change CVS keywords to SVN style 2006-02-14 10:08:15 +00:00
Laurent Saboret a0a9b777bc Move packages to trunk root 2006-02-14 08:58:16 +00:00