Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
364c8cc
Added some core classes for the prototype of a domain-generic P2T2
MaelRL Mar 13, 2019
901f70a
Some progress on generic P2T2
MaelRL Mar 14, 2019
2d34045
Change the example so it is in a compilable/runnable state
MaelRL Mar 14, 2019
bb7b6ce
Merge remote-tracking branch 'maxgimeno/BasicViewer-Update_shaders-GF…
MaelRL Mar 15, 2019
6078d20
Merge remote-tracking branch 'maxgimeno/BasicViewer-Update_shaders-GF…
MaelRL Mar 15, 2019
c454ca8
Merge remote-tracking branch 'maxgimeno/BasicViewer-Update_shaders-GF…
MaelRL Mar 15, 2019
046d140
Merge remote-tracking branch 'maxgimeno/BasicViewer-Update_shaders-GF…
MaelRL Mar 18, 2019
6f622a7
Provide set of overlapping offsets. boost::unordered_map --> std::uno…
geoo89 Feb 26, 2020
e6827a3
basis reduction
geoo89 Feb 28, 2020
7e33f59
is_simplicial_complex implemented
geoo89 Mar 2, 2020
3802e26
refactored usage of offsets for canonical definition
geoo89 Mar 2, 2020
0acede3
face neighbours and faces incident to a vertex
geoo89 Mar 2, 2020
cc15dce
translating faces without point location
Mar 3, 2020
96f6ac9
remove unused periodic_vertices map
Mar 3, 2020
d40c88e
Merge branch 'Generic_P2T2' of github.com:MaelRL/cgal into Generic_P2T2
MaelRL Apr 8, 2020
4561877
Switch to lexicographical offset
MaelRL Apr 8, 2020
92bf751
Add a circumradius threshold mechanism to detect when it is time for …
MaelRL Apr 8, 2020
22164d6
Use get_canonical_face
MaelRL Apr 8, 2020
229fcf9
Rename cover switch function
MaelRL Apr 8, 2020
ff625e1
Comment enough stuff so that gp2t2.convert_to_1_cover compiles
MaelRL Apr 8, 2020
f5c304e
Misc tiny changes
MaelRL Apr 8, 2020
5ee1778
allow for exact constructions kernel
geoo89 Apr 8, 2020
a5d50d4
Template the traits with the domain and a construct point
MaelRL Apr 8, 2020
d8fa10d
Don't copy traits
MaelRL Apr 8, 2020
87486f5
Remove the domain from P2T2 (it should be given by the traits)
MaelRL Apr 8, 2020
ca4b74f
Merge remote-tracking branch 'cgal/master' into Generic_P2T2
MaelRL Apr 8, 2020
7c213d2
Remove mentions of too long edges / some flipping functions
MaelRL Apr 8, 2020
366df5b
Temporarily hide drawing
MaelRL Apr 8, 2020
efd130d
vertex/edge/face count
geoo89 Apr 8, 2020
eafa3f7
Add Compare_(weighted)_squared_radius_2 to the kernel
MaelRL Apr 10, 2020
fa01869
GP2T2 insert in face
MaelRL Apr 10, 2020
8ae2c0a
Fix TDS2 image placement (wrong function)
MaelRL Apr 10, 2020
a1b5190
Add a function to draw the P2T2
MaelRL Apr 10, 2020
9836183
Add a function to draw DT2
MaelRL Apr 10, 2020
ccf8760
Fix drawing functions
MaelRL Apr 10, 2020
128ca3c
Substract the min offset instead of a random one
MaelRL Apr 10, 2020
5cdb4c9
code for phase switch experiment
geoo89 Apr 19, 2020
d6cf73c
Fix incorrect comment
MaelRL Apr 19, 2020
34c485c
Replace flip-based approach with Bowyer-Watson algorithm + WIP generi…
MaelRL Apr 19, 2020
cc606a1
Clarify trick with a comment
MaelRL Apr 19, 2020
ef7215c
Add TDS2::tds_data
MaelRL Apr 19, 2020
ee0c2a8
Add a convenience overload for TDS2::star_hole
MaelRL Apr 19, 2020
3ad8af9
Remove redundant and unused TDS vertex/face base classes
MaelRL Apr 19, 2020
0ccda3b
Add missing headers
MaelRL Apr 19, 2020
4ca4c52
Add a test to check P2DT2 using DT2
MaelRL Apr 19, 2020
f93b355
experiument switch fix
geoo89 Apr 20, 2020
fa9fa75
simple timing code
geoo89 Apr 20, 2020
e629391
Generic versions of lattice_3 and P3DT3 (code template, haven't compi…
geoo89 Apr 20, 2020
6cdf78f
Minor changes to P2T2 (to be tested...)
MaelRL Apr 20, 2020
8dd75f0
Prepare P3T3 for genericity
MaelRL Apr 20, 2020
1757230
Make GP3T3 compile
MaelRL Apr 20, 2020
47666ee
Add an example
MaelRL Apr 20, 2020
debf841
Temporarily disable stuff to get IO to compute
MaelRL Apr 21, 2020
766a0ea
Add IO in generic_P3T3
MaelRL Apr 21, 2020
a59eb90
Fix translate cell computation
MaelRL Apr 21, 2020
b4d4ee0
Minor P2T2 fixes
MaelRL Apr 21, 2020
e7f035f
Various P3T3 fixes
MaelRL Apr 21, 2020
f313166
Benchmark code
MaelRL Apr 21, 2020
3c330a0
Update benchmark
MaelRL Apr 21, 2020
2684690
Clean code
MaelRL Apr 24, 2020
7bc7450
Update examples
MaelRL Apr 24, 2020
1f3ba60
set > unordered set
MaelRL Apr 24, 2020
bf7cbcd
Clean code
MaelRL Apr 24, 2020
4555c0f
Update README.md
MaelRL Apr 24, 2020
71a1244
Update README.md
MaelRL Apr 24, 2020
34352c3
Fix using T2 constructors in P2T2 doc
MaelRL Jul 15, 2020
3443e36
WIP on merging P2T2 and Generic_P2T2
MaelRL Aug 7, 2020
5e996b2
Enhance has_XXX macro to work with specific parameters
MaelRL Aug 7, 2020
87e7629
Add an extra sentence in regular_triangulation_3 to match other trian…
MaelRL Aug 7, 2020
916910b
Add mistakenly untracked files in P2T2
MaelRL Aug 7, 2020
91faf4c
Merge pull request #4937 from maxGimeno/Demo-Fix_c3t3_ids-maxGimeno
sloriot Aug 20, 2020
d2437ba
Restore some deleted but documented functions
MaelRL Aug 25, 2020
da3c5e8
Misc fixes
MaelRL Aug 25, 2020
cd8eb1c
Merge remote-tracking branch 'cgal/master' into Generic_P2T2
MaelRL Aug 25, 2020
488ed82
Enhance Has_(static)_filters to be full tags and not just values
MaelRL Aug 27, 2020
dbcdb9a
Clarify comment
MaelRL Aug 27, 2020
2d295c2
Fix P2T2 doc using 3D function signature
MaelRL Aug 27, 2020
a551962
Start working on P2T2 doc
MaelRL Aug 27, 2020
ceff3b0
Unify both periodic triangulations and [restore old/add new] function…
MaelRL Aug 27, 2020
c3c8d86
Misc on-the-way improvements to P3T3
MaelRL Aug 27, 2020
5511704
Update tasks
MaelRL Aug 27, 2020
88164dc
Implement some more missing functionalities
MaelRL Aug 28, 2020
553edd7
Add missing tags: Has_static_filters_tag to kernels
MaelRL Aug 28, 2020
383fcb4
Make it work with non origin-centered lattices
MaelRL Aug 28, 2020
cb6c401
Misc minor changes
MaelRL Aug 28, 2020
38d751a
Revert some temporary changes
MaelRL Aug 28, 2020
5c069d4
Merge remote-tracking branch 'cgal/master' into Generic_P2T2
MaelRL Aug 28, 2020
be3efba
Add Periodic Voronoi diagrams
MaelRL Aug 28, 2020
e4850b3
Misc minor changes
MaelRL Aug 28, 2020
ef84cb4
Add is_[simplex] / mirror_vertex for all periodic triangulations
MaelRL Aug 28, 2020
6799c05
Some work on unified P2T2 documentation
MaelRL Aug 28, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Cartesian_kernel/include/CGAL/Cartesian/function_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,36 @@ namespace CartesianKernelFunctors {
}
};

template <typename K>
class Compare_squared_radius_2
{
typedef typename K::Point_2 Point_2;
typedef typename K::FT FT;

public:
typedef typename K::Comparison_result result_type;

result_type operator()(const Point_2& p, const Point_2& q, const Point_2& r, const FT& ft) const
{
return CGAL::compare(squared_radiusC2(p.x(), p.y(),
q.x(), q.y(),
r.x(), r.y()),
ft);
}

result_type operator()(const Point_2& p, const Point_2& q, const FT& ft) const
{
return CGAL::compare(squared_radiusC2(p.x(), p.y(),
q.x(), q.y()),
ft);
}

result_type operator()(const Point_2&, const FT& ft) const
{
return - CGAL_NTS sign(ft);
}
};

template <typename K>
class Compare_squared_radius_3
{
Expand Down
6 changes: 4 additions & 2 deletions Filtered_kernel/include/CGAL/Filtered_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,14 +112,16 @@ template < typename CK, bool UseStaticFilters = true >
struct Filtered_kernel_adaptor
: public Filtered_kernel_base<CK>
{
enum { Has_static_filters = false };
enum { Has_static_filters = false };
typedef Boolean_tag<Has_static_filters> Has_static_filters_tag;
};

template < typename CK >
struct Filtered_kernel_adaptor<CK, true>
: public Static_filters_base<CK>
{
enum { Has_static_filters = true };
enum { Has_static_filters = true };
typedef Boolean_tag<Has_static_filters> Has_static_filters_tag;
};

// UseStaticFilters has a default value, depending on
Expand Down
3 changes: 2 additions & 1 deletion Filtered_kernel/include/CGAL/Lazy_kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,9 @@ class Lazy_kernel_generic_base : protected internal::Enum_holder
typedef typename Exact_kernel::Rep_tag Rep_tag;

enum { Has_filtered_predicates = true };
typedef Boolean_tag<Has_filtered_predicates> Has_filtered_predicates_tag;
enum { Has_static_filters = false };
typedef Boolean_tag<Has_filtered_predicates> Has_filtered_predicates_tag;
typedef Boolean_tag<Has_static_filters> Has_static_filters_tag;

// Types
typedef CGAL::Lazy_exact_nt<typename Exact_kernel::FT> FT;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,9 +195,8 @@ class Static_filters : public K_base
compare_weighted_squared_radius_3_object() const
{ return Compare_weighted_squared_radius_3(); }


enum { Has_static_filters = true };

typedef Boolean_tag<Has_static_filters> Has_static_filters_tag;

typedef Static_filters_predicates::Compare_y_at_x_2<K_base,Self> Compare_y_at_x_2;

Expand Down
4 changes: 2 additions & 2 deletions Generator/include/CGAL/point_generators_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,8 @@ class Random_points_in_square_2 : public Random_generator_base<P> {
Random_points_in_square_2( double a = 1, Random& rnd = CGAL::get_default_random())
// g is an input iterator creating points of type `P' uniformly
// distributed in the half-open square with side length a,
// centered around the origin, i.e. \forall p = `*g': -\frac{a}{2}
// <= p.x() < \frac{a}{2} and -\frac{a}{2} <= p.y() < \frac{a}{2}
// centered around the origin, i.e.
// \forall p = `*g': -a <= p.x() < a and a <= p.y() < a
// . Two random numbers are needed from `rnd' for each point.
: Random_generator_base<P>( a, rnd) { generate_point(); }
This& operator++() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ namespace HomogeneousKernelFunctors {
using CartesianKernelFunctors::Are_parallel_2;
using CartesianKernelFunctors::Are_parallel_3;
using CartesianKernelFunctors::Compute_squared_area_3;
using CartesianKernelFunctors::Compare_squared_radius_2;
using CartesianKernelFunctors::Compare_squared_radius_3;
using CartesianKernelFunctors::Collinear_3;
using CartesianKernelFunctors::Construct_line_3;
Expand Down
32 changes: 32 additions & 0 deletions Kernel_23/doc/Kernel_23/Concepts/FunctionObjectConcepts.h
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,38 @@ class CompareSquaredRadius_3 {

}; /* end Kernel::CompareSquaredRadius_3 */

/*!
\ingroup PkgKernel23ConceptsFunctionObjects
\cgalConcept
\cgalRefines `AdaptableFunctor`
\sa `ComputePowerProduct_2` for the definition of of orthogonality for power distances.
*/
class CompareWeightedSquaredRadius_2
{
public:
/// \name Operations
/// A model of this concept must provide:
/// @{

/*!
compares the weight of the smallest circle orthogonal to the
input weighted point(s) with the input weight.
*/
Comparison_result operator()(const Kernel::Weighted_point_2& pw,
const Kernel::Weighted_point_2& qw,
const Kernel::Weighted_point_2& rw,
const Kernel::FT& w);

Comparison_result operator()(const Kernel::Weighted_point_2& pw,
const Kernel::Weighted_point_2& qw,
const Kernel::FT& w);

Comparison_result operator()(const Kernel::Weighted_point_2& pw,
const Kernel::FT& w);

/// @}
}; /* end Kernel::CompareWeightedSquaredRadius_2 */

/*!
\ingroup PkgKernel23ConceptsFunctionObjects
\cgalConcept
Expand Down
25 changes: 20 additions & 5 deletions Kernel_23/doc/Kernel_23/Concepts/Kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,16 @@ class Kernel {
*/
typedef unspecified_type Compare_square_distance_2;

/*!
a model of `Kernel::CompareSquaredRadius_2`
*/
typedef unspecified_type Compare_squared_radius_2;

/*!
a model of `Kernel::CompareWeightedSquaredRadius_2`
*/
typedef unspecified_type Compare_weighted_squared_radius_2;

/*!
a model of `Kernel::CompareAngleWithXAxis_2`
*/
Expand Down Expand Up @@ -1418,11 +1428,6 @@ class Kernel {
*/
typedef unspecified_type Less_xyz_3;

/*!
a model of `Kernel::CompareWeightedSquaredRadius_3`
*/
typedef unspecified_type Compare_weighted_squared_radius_3;

/*!
a model of `Kernel::CompareX_3`
*/
Expand Down Expand Up @@ -1458,6 +1463,16 @@ class Kernel {
*/
typedef unspecified_type Compare_squared_distance_3;

/*!
a model of `Kernel::CompareSquaredRadius_3`
*/
typedef unspecified_type Compare_squared_radius_3;

/*!
a model of `Kernel::CompareWeightedSquaredRadius_3`
*/
typedef unspecified_type Compare_weighted_squared_radius_3;

/*!
a model of `Kernel::LessSignedDistanceToPlane_3`
*/
Expand Down
2 changes: 2 additions & 0 deletions Kernel_23/doc/Kernel_23/PackageDescription.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,9 @@
- `Kernel::CompareSignedDistanceToLine_2`
- `Kernel::CompareSquaredDistance_2`
- `Kernel::CompareSquaredDistance_3`
- `Kernel::CompareSquaredRadius_2`
- `Kernel::CompareSquaredRadius_3`
- `Kernel::CompareWeightedSquaredRadius_2`
- `Kernel::CompareWeightedSquaredRadius_3`
- `Kernel::CompareXAtY_2`
- `Kernel::CompareXYZ_3`
Expand Down
39 changes: 39 additions & 0 deletions Kernel_23/include/CGAL/Kernel/function_objects.h
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,45 @@ namespace CommonKernelFunctors {
}
};

template <typename K>
class Compare_weighted_squared_radius_2
{
public:
typedef typename K::Weighted_point_2 Weighted_point_2;
typedef typename K::Comparison_result Comparison_result;
typedef typename K::FT FT;

typedef Comparison_result result_type;

result_type operator()(const Weighted_point_2 & p,
const Weighted_point_2 & q,
const Weighted_point_2 & r,
const FT& w) const
{
return CGAL::compare(squared_radius_orthogonal_circleC2(
p.x(),p.y(),p.weight(),
q.x(),q.y(),q.weight(),
r.x(),r.y(),r.weight()),
w);
}

result_type operator()(const Weighted_point_2 & p,
const Weighted_point_2 & q,
const FT& w) const
{
return CGAL::compare(squared_radius_smallest_orthogonal_circleC2(
p.x(),p.y(),p.weight(),
q.x(),q.y(),q.weight()),
w);
}

result_type operator()(const Weighted_point_2 & p,
const FT& w) const
{
return CGAL::compare(-p.weight(), w);
}
};

template <typename K>
class Compare_weighted_squared_radius_3
{
Expand Down
63 changes: 63 additions & 0 deletions Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,69 @@ compare_squared_distance(const typename K::Point_2 &p,
return k.compare_squared_distance_2_object()(p, q, d2);
}

template < class K >
inline
typename K::Comparison_result
compare_squared_radius(const typename K::Point_2 &p,
const typename K::FT &sr,
const K& k)
{
return k.compare_squared_radius_2_object()(p, sr);
}

template < class K >
inline
typename K::Comparison_result
compare_squared_radius(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::FT &sr,
const K& k)
{
return k.compare_squared_radius_2_object()(p, q, sr);
}

template < class K >
inline
typename K::Comparison_result
compare_squared_radius(const typename K::Point_2 &p,
const typename K::Point_2 &q,
const typename K::Point_2 &r,
const typename K::FT &sr,
const K& k)
{
return k.compare_squared_radius_2_object()(p, q, r, sr);
}

template < class K >
inline
typename K::Comparison_result
compare_weighted_squared_radius(const typename K::Weighted_point_2 &p,
const typename K::FT &w, const K &k)
{
return k.compare_weighted_squared_radius_2_object()(p, w);
}

template < class K >
inline
typename K::Comparison_result
compare_weighted_squared_radius(const typename K::Weighted_point_2 &p,
const typename K::Weighted_point_2 &q,
const typename K::FT &w, const K &k)
{
return k.compare_weighted_squared_radius_2_object()(p, q, w);
}

template < class K >
inline
typename K::Comparison_result
compare_weighted_squared_radius(const typename K::Weighted_point_2 &p,
const typename K::Weighted_point_2 &q,
const typename K::Weighted_point_2 &r,
const typename K::FT &w, const K &k)
{
return k.compare_weighted_squared_radius_2_object()(p, q, r, w);
}

template <class K>
inline
typename K::Comparison_result
Expand Down
4 changes: 4 additions & 0 deletions Kernel_23/include/CGAL/Kernel/interface_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ CGAL_Kernel_pred(Compare_squared_distance_2,
compare_squared_distance_2_object)
CGAL_Kernel_pred(Compare_squared_distance_3,
compare_squared_distance_3_object)
CGAL_Kernel_pred(Compare_squared_radius_2,
compare_squared_radius_2_object)
CGAL_Kernel_pred(Compare_squared_radius_3,
compare_squared_radius_3_object)
CGAL_Kernel_pred(Compare_weighted_squared_radius_2,
compare_weighted_squared_radius_2_object)
CGAL_Kernel_pred(Compare_weighted_squared_radius_3,
compare_weighted_squared_radius_3_object)
CGAL_Kernel_pred(Compare_x_at_y_2,
Expand Down
37 changes: 16 additions & 21 deletions Kernel_23/include/CGAL/internal/Has_boolean_tags.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
#ifndef CGAL_INTERNAL_HAS_BOOLEAN_TAGS_H
#define CGAL_INTERNAL_HAS_BOOLEAN_TAGS_H

#include <boost/mpl/has_xxx.hpp>
#include <CGAL/tags.h>

namespace CGAL{

namespace internal{
namespace CGAL {
namespace internal {

#define CGAL_HAS_XXX_MEMBER_NAMED_DEF(CLASS,MEMBER) \
template<typename T> struct CLASS { \
Expand All @@ -43,32 +41,29 @@ template<class Traits, bool has_tag = Has_nested_type_Has_filtered_predicates<Tr
struct Has_filtered_predicates;

template<class Traits>
struct Has_filtered_predicates<Traits,false>
{
static const bool value = false;
};
struct Has_filtered_predicates<Traits, false>
: public CGAL::Tag_false
{ };

template<class Traits>
struct Has_filtered_predicates<Traits,true>
{
static const bool value = Traits::Has_filtered_predicates;
};
struct Has_filtered_predicates<Traits, true>
: public Traits::Has_filtered_predicates_tag
{ };

template<class Traits, bool has_tag = Has_nested_type_Has_static_filters<Traits>::value >
struct Has_static_filters;

template<class Traits>
struct Has_static_filters<Traits,false>
{
static const bool value = false;
};
struct Has_static_filters<Traits, false>
: public CGAL::Tag_false
{ };

template<class Traits>
struct Has_static_filters<Traits,true>
{
static const bool value = Traits::Has_static_filters;
};
struct Has_static_filters<Traits, true>
: public Traits::Has_static_filters_tag
{ };

} } //namespace CGAL::internal
} // namespace internal
} // namespace CGAL

#endif //CGAL_INTERNAL_HAS_BOOLEAN_TAGS_H
Loading