Cosmetic changes in P3T3 traits classes

This commit is contained in:
Mael Rouxel-Labbé 2017-03-16 18:21:59 +01:00
parent 486967a003
commit 09e2ed00f8
10 changed files with 116 additions and 105 deletions

View File

@ -29,7 +29,6 @@
#include <CGAL/Periodic_3_offset_3.h>
#include <CGAL/Traits_with_offsets_adaptor.h>
#include <CGAL/Periodic_3_construct_point_3.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/internal/Has_boolean_tags.h>
#include <CGAL/Periodic_3_triangulation_traits_3.h>
@ -62,25 +61,23 @@ public:
typedef typename Base::Tetrahedron_3 Tetrahedron_3;
// Delaunay specific predicates
typedef Traits_with_offsets_adaptor<Self,
typename K::Side_of_oriented_sphere_3>
typedef Traits_with_offsets_adaptor<Self, typename K::Side_of_oriented_sphere_3>
Side_of_oriented_sphere_3;
typedef Traits_with_offsets_adaptor<Self, typename K::Compare_distance_3>
Compare_distance_3;
typedef Traits_with_offsets_adaptor<Self,
typename K::Side_of_bounded_sphere_3>
Side_of_bounded_sphere_3;
// Degenerate dimension predicates
typedef Traits_with_offsets_adaptor<Self, typename K::Coplanar_orientation_3>
Coplanar_orientation_3;
typedef Traits_with_offsets_adaptor<Self,
typename K::Coplanar_side_of_bounded_circle_3>
typedef Traits_with_offsets_adaptor<Self, typename K::Coplanar_side_of_bounded_circle_3>
Coplanar_side_of_bounded_circle_3;
// When is_Gabriel is used
typedef Traits_with_offsets_adaptor<Self, typename K::Side_of_bounded_sphere_3>
Side_of_bounded_sphere_3;
// Delaunay specific constructions
typedef Traits_with_offsets_adaptor<Self,
typename K::Construct_circumcenter_3>
typedef Traits_with_offsets_adaptor<Self, typename K::Construct_circumcenter_3>
Construct_circumcenter_3;
// Operations

View File

@ -29,11 +29,9 @@
#include <CGAL/Regular_traits_with_offsets_adaptor.h>
#include <CGAL/Periodic_3_construct_weighted_point_3.h>
#include <CGAL/Periodic_3_triangulation_traits_3.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/basic.h>
#include <CGAL/representation_tags.h>
#include <CGAL/Kernel_traits.h>
#include <CGAL/internal/Has_boolean_tags.h>
namespace CGAL
{
@ -63,49 +61,52 @@ public:
typedef typename Base::Tetrahedron_3 Tetrahedron_3;
typedef Periodic_3_construct_weighted_point_3<Self, typename K::Construct_weighted_point_3>
Construct_weighted_point_3;
Construct_weighted_point_3;
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Power_side_of_oriented_power_sphere_3>
Power_side_of_oriented_power_sphere_3;
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Compare_power_distance_3>
Compare_power_distance_3;
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Construct_weighted_circumcenter_3>
Construct_weighted_circumcenter_3;
Power_side_of_oriented_power_sphere_3;
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Compare_weighted_squared_radius_3>
Compare_weighted_squared_radius_3;
Compare_weighted_squared_radius_3;
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Compare_power_distance_3>
Compare_power_distance_3;
// Required for Periodic_3_regular_remove_traits
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Coplanar_orientation_3>
Coplanar_orientation_3;
Coplanar_orientation_3;
// When dual operations are used
typedef Regular_traits_with_offsets_adaptor<Self, typename K::Construct_weighted_circumcenter_3>
Construct_weighted_circumcenter_3;
// construction
Construct_weighted_point_3 construct_weighted_point_3_object () const
{
Construct_weighted_point_3
construct_weighted_point_3_object () const {
return Construct_weighted_point_3(this->_domain);
}
Construct_weighted_circumcenter_3 construct_weighted_circumcenter_3_object () const
{
Construct_weighted_circumcenter_3
construct_weighted_circumcenter_3_object () const {
return Construct_weighted_circumcenter_3(&this->_domain);
}
// predicates
Power_side_of_oriented_power_sphere_3 power_side_of_oriented_power_sphere_3_object () const
{
Power_side_of_oriented_power_sphere_3
power_side_of_oriented_power_sphere_3_object () const {
return Power_side_of_oriented_power_sphere_3(&this->_domain);
}
Compare_power_distance_3 compare_power_distance_3_object () const
{
Compare_power_distance_3
compare_power_distance_3_object () const {
return Compare_power_distance_3(&this->_domain);
}
Compare_weighted_squared_radius_3 compare_weighted_squared_radius_3_object() const
{
Compare_weighted_squared_radius_3
compare_weighted_squared_radius_3_object() const {
return Compare_weighted_squared_radius_3(&this->_domain);
}
Coplanar_orientation_3 coplanar_orientation_3_object() const {
Coplanar_orientation_3
coplanar_orientation_3_object() const {
return Coplanar_orientation_3(&this->_domain);
}
};
@ -114,6 +115,7 @@ template<typename K,
typename Off = CGAL::Periodic_3_offset_3,
bool Has_filtered_predicates = K::Has_filtered_predicates>
class Periodic_3_regular_triangulation_traits_3;
} // namespace CGAL
// Partial specialization for Filtered_kernel<CK>.
@ -130,7 +132,7 @@ class Periodic_3_regular_triangulation_traits_3:
public Periodic_3_regular_triangulation_traits_base_3<K, Off>
{ };
template < typename K, typename Off >
template <typename K, typename Off >
class Periodic_3_regular_triangulation_traits_3<K, Off, true>
: public Periodic_3_regular_triangulation_filtered_traits_3<K, Off>
{

View File

@ -134,7 +134,7 @@ class Periodic_3_triangulation_traits_3
template < typename K, typename Off >
class Periodic_3_triangulation_traits_3 < K, Off, true>
: public Periodic_3_triangulation_filtered_traits_3 < K, Off, internal::Has_static_filters<K>::value >
: public Periodic_3_triangulation_filtered_traits_3<K, Off, internal::Has_static_filters<K>::value >
{
public:
typedef K Kernel;

View File

@ -37,7 +37,7 @@
namespace CGAL {
// The argument is supposed to be a Filtered_kernel-like kernel.
// The first template item is supposed to be a Filtered_kernel-like kernel.
template < typename K, typename Off >
class Periodic_3_Delaunay_triangulation_filtered_traits_base_3
: public Periodic_3_Delaunay_triangulation_traits_base_3<K, Off>

View File

@ -54,9 +54,7 @@ public:
Side_of_oriented_sphere_3;
Side_of_oriented_sphere_3 side_of_oriented_sphere_3_object() const {
return Side_of_oriented_sphere_3(&this->_domain,
&this->_domain_e,
&this->_domain_f);
return Side_of_oriented_sphere_3(&this->_domain, &this->_domain_e, &this->_domain_f);
}
};

View File

@ -20,7 +20,6 @@
// Aymeric Pelle <Aymeric.Pelle@sophia.inria.fr>
// Mael Rouxel-Labbé
#ifndef CGAL_PERIODIC_3_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H
#define CGAL_PERIODIC_3_REGULAR_TRIANGULATION_FILTERED_TRAITS_3_H
@ -35,10 +34,9 @@
#include <CGAL/Uncertain.h>
#include <CGAL/Profile_counter.h>
#include <string>
namespace CGAL {
// The first template item is supposed to be a Filtered_kernel-like kernel.
template < typename K, typename Off >
class Periodic_3_regular_triangulation_filtered_traits_base_3
: public Periodic_3_regular_triangulation_traits_base_3<K, Off>

View File

@ -25,7 +25,6 @@
#include <CGAL/license/Periodic_3_triangulation_3.h>
#include <CGAL/basic.h>
#include <CGAL/triangulation_assertions.h>
#include <CGAL/Periodic_3_offset_3.h>
namespace CGAL
@ -103,74 +102,85 @@ public:
typedef typename PTraits::Iso_cuboid_3 Iso_cuboid_3;
Periodic_3_regular_triangulation_remove_traits_3 (const Iso_cuboid_3& domain)
: _traits()
{
: _traits() {
_traits.set_domain(domain);
}
// Triangulation traits
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_xyz_3> Compare_xyz_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Coplanar_orientation_3> Coplanar_orientation_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Orientation_3> Orientation_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_xyz_3>
Compare_xyz_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Coplanar_orientation_3>
Coplanar_orientation_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Orientation_3>
Orientation_3;
// Regular Triangulation traits
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Power_side_of_oriented_power_sphere_3> Power_side_of_oriented_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_power_distance_3> Compare_power_distance_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Power_side_of_bounded_power_sphere_3> Power_side_of_bounded_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Construct_weighted_circumcenter_3> Construct_weighted_circumcenter_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Construct_circumcenter_3> Construct_circumcenter_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_squared_radius_smallest_orthogonal_sphere_3> Compute_squared_radius_smallest_orthogonal_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_power_product_3> Compute_power_product_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_power_distance_to_power_sphere_3> Compute_power_distance_to_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_weighted_squared_radius_3> Compare_weighted_squared_radius_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Power_side_of_oriented_power_sphere_3>
Power_side_of_oriented_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_power_distance_3>
Compare_power_distance_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Power_side_of_bounded_power_sphere_3>
Power_side_of_bounded_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Construct_weighted_circumcenter_3>
Construct_weighted_circumcenter_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Construct_circumcenter_3>
Construct_circumcenter_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_squared_radius_smallest_orthogonal_sphere_3>
Compute_squared_radius_smallest_orthogonal_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_power_product_3>
Compute_power_product_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compute_power_distance_to_power_sphere_3>
Compute_power_distance_to_power_sphere_3;
typedef Ppoint_to_point_adaptor<Self, typename PTraits::Compare_weighted_squared_radius_3>
Compare_weighted_squared_radius_3;
// Operations
Compare_xyz_3 compare_xyz_3_object () const
{
Compare_xyz_3
compare_xyz_3_object() const {
return Compare_xyz_3(_traits.compare_xyz_3_object());
}
Coplanar_orientation_3 coplanar_orientation_3_object () const
{
Coplanar_orientation_3
coplanar_orientation_3_object() const {
return Coplanar_orientation_3(_traits.coplanar_orientation_3_object());
}
Orientation_3 orientation_3_object () const
{
Orientation_3
orientation_3_object() const {
return Orientation_3(_traits.orientation_3_object());
}
Power_side_of_oriented_power_sphere_3 power_side_of_oriented_power_sphere_3_object () const
{
Power_side_of_oriented_power_sphere_3
power_side_of_oriented_power_sphere_3_object() const {
return Power_side_of_oriented_power_sphere_3(_traits.power_side_of_oriented_power_sphere_3_object());
}
Compare_power_distance_3 compare_power_distance_3_object () const
{
Compare_power_distance_3
compare_power_distance_3_object() const {
return Compare_power_distance_3(_traits.compare_power_distance_3_object());
}
Power_side_of_bounded_power_sphere_3 power_side_of_bounded_power_sphere_3_object () const
{
Power_side_of_bounded_power_sphere_3
power_side_of_bounded_power_sphere_3_object() const {
return Power_side_of_bounded_power_sphere_3(_traits.power_side_of_bounded_power_sphere_3_object());
}
Construct_weighted_circumcenter_3 construct_weighted_circumcenter_3_object () const
{
Construct_weighted_circumcenter_3
construct_weighted_circumcenter_3_object() const {
return Construct_weighted_circumcenter_3(_traits.construct_weighted_circumcenter_3_object());
}
Construct_circumcenter_3 construct_circumcenter_3_object () const
{
Construct_circumcenter_3
construct_circumcenter_3_object() const {
return Construct_circumcenter_3(_traits.construct_circumcenter_3_object());
}
Compute_squared_radius_smallest_orthogonal_sphere_3 compute_squared_radius_smallest_orthogonal_sphere_3_object () const
{
Compute_squared_radius_smallest_orthogonal_sphere_3
compute_squared_radius_smallest_orthogonal_sphere_3_object() const {
return Compute_squared_radius_smallest_orthogonal_sphere_3(_traits.compute_squared_radius_smallest_orthogonal_sphere_3_object());
}
Compute_power_product_3 compute_power_product_3_object () const
{
Compute_power_product_3
compute_power_product_3_object() const {
return Compute_power_product_3(_traits.compute_power_product_3_object());
}
Compute_power_distance_to_power_sphere_3 compute_power_distance_to_power_sphere_3_object () const
{
Compute_power_distance_to_power_sphere_3
compute_power_distance_to_power_sphere_3_object() const {
return Compute_power_distance_to_power_sphere_3(_traits.compute_power_distance_to_power_sphere_3_object());
}
Compare_weighted_squared_radius_3 compare_weighted_squared_radius_3_object () const
{
Compare_weighted_squared_radius_3
compare_weighted_squared_radius_3_object() const {
return Compare_weighted_squared_radius_3(_traits.compare_weighted_squared_radius_3_object());
}

View File

@ -93,7 +93,6 @@ struct Offset_converter_3
typedef typename Periodic_3_triangulation_traits_base_3<Target_kernel>
::Point_3 Target_pt;
using Converter::operator();
Target_off
@ -103,7 +102,7 @@ struct Offset_converter_3
}
};
// The argument is supposed to be a Filtered_kernel-like kernel.
// The first template item is supposed to be a Filtered_kernel-like kernel.
template < typename K, typename Off >
class Periodic_3_triangulation_filtered_traits_base_3
: public Periodic_3_triangulation_traits_base_3<K, Off>

View File

@ -30,7 +30,8 @@
namespace CGAL {
template < class Traits_, class Functor_ >
class Point_offset_adaptor {
class Point_offset_adaptor
{
typedef Traits_ Traits;
typedef Functor_ Functor;
@ -39,7 +40,7 @@ class Point_offset_adaptor {
public:
typedef typename Functor::result_type result_type;
Point_offset_adaptor(const Functor & functor) : _functor(functor) {}
Point_offset_adaptor(const Functor & functor) : _functor(functor) { }
result_type operator()(const Point& p0, const Point& p1) const {
return _functor(p0.first, p1.first,
@ -66,40 +67,46 @@ private:
};
template < class P3DTTraits, class Off = typename CGAL::Periodic_3_offset_3 >
class Periodic_3_triangulation_remove_traits_3 : public P3DTTraits::K
class Periodic_3_triangulation_remove_traits_3
: public P3DTTraits::K
{
public:
typedef P3DTTraits PT;
typedef typename P3DTTraits::K Base;
typedef Off Offset;
typedef Periodic_3_triangulation_remove_traits_3< PT,Offset > Self;
typedef typename PT::RT RT;
typedef typename PT::FT FT;
typedef typename PT::Point_3 Bare_point;
typedef std::pair<Bare_point,Offset> Point_3;
typedef typename PT::Iso_cuboid_3 Iso_cuboid_3;
private:
typedef Periodic_3_triangulation_remove_traits_3<PT, Offset > Self;
typedef typename PT::K Base;
public:
typedef typename PT::RT RT;
typedef typename PT::FT FT;
typedef typename PT::Point_3 Bare_point;
typedef std::pair<Bare_point, Offset> Point_3;
typedef typename PT::Iso_cuboid_3 Iso_cuboid_3;
Periodic_3_triangulation_remove_traits_3(const Iso_cuboid_3& domain)
: _pt() {
_pt.set_domain(domain);
}
// Triangulation traits
// Triangulation predicates
typedef Point_offset_adaptor<Self, typename PT::Compare_xyz_3>
Compare_xyz_3;
typedef Point_offset_adaptor<Self, typename PT::Coplanar_orientation_3>
Coplanar_orientation_3;
Compare_xyz_3;
typedef Point_offset_adaptor<Self, typename PT::Orientation_3>
Orientation_3;
Orientation_3;
// Delaunay Triangulation traits
typedef Point_offset_adaptor<Self, typename PT::Coplanar_side_of_bounded_circle_3>
Coplanar_side_of_bounded_circle_3;
typedef Point_offset_adaptor<Self, typename PT::Side_of_oriented_sphere_3>
Side_of_oriented_sphere_3;
// Delaunay Triangulation predicates
typedef Point_offset_adaptor<Self, typename PT::Compare_distance_3>
Compare_distance_3;
Compare_distance_3;
typedef Point_offset_adaptor<Self, typename PT::Side_of_oriented_sphere_3>
Side_of_oriented_sphere_3;
// Degenerate dimension predicates
typedef Point_offset_adaptor<Self, typename PT::Coplanar_orientation_3>
Coplanar_orientation_3;
typedef Point_offset_adaptor<Self, typename PT::Coplanar_side_of_bounded_circle_3>
Coplanar_side_of_bounded_circle_3;
// Operations
Compare_xyz_3

View File

@ -47,12 +47,12 @@ namespace CGAL {
// The K_base argument is supposed to provide exact primitives.
template < typename Traits >
class Periodic_3_triangulation_statically_filtered_traits_3 : public Traits
class Periodic_3_triangulation_statically_filtered_traits_3
: public Traits
{
typedef Periodic_3_triangulation_statically_filtered_traits_3<Traits> Self;
public:
typedef internal::Static_filters_predicates::Periodic_3_orientation_3<Traits>
Orientation_3;