mirror of https://github.com/CGAL/cgal
Clean up
This commit is contained in:
parent
7ab31a8a0b
commit
316ab90c98
|
|
@ -25,6 +25,7 @@
|
|||
#include <CGAL/Origin.h>
|
||||
#include <CGAL/Bbox_2.h>
|
||||
#include <CGAL/Bbox_3.h>
|
||||
#include <CGAL/Bbox.h>
|
||||
#include <CGAL/Default.h>
|
||||
#include <CGAL/tss.h>
|
||||
#include <CGAL/type_traits/is_iterator.h>
|
||||
|
|
@ -97,6 +98,10 @@ CGAL_LAZY_FORWARD(Bbox_2)
|
|||
CGAL_LAZY_FORWARD(Bbox_3)
|
||||
#undef CGAL_LAZY_FORWARD
|
||||
|
||||
template<class A, class B> Bbox<A,B> const& approx(Bbox<A,B> const& d) { return d; }
|
||||
template<class A, class B> Bbox<A,B> const& exact (Bbox<A,B> const& d) { return d; }
|
||||
template<class A, class B> int depth (Bbox<A,B> const& ) { return 0; }
|
||||
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, T> approx(T d){return d;}
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, T> exact (T d){return d;}
|
||||
template<class T>inline std::enable_if_t<std::is_arithmetic<T>::value||std::is_enum<T>::value, int> depth(T){return -1;}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ struct Cartesian_LA_base_d : public Dimension_base<Dim_>
|
|||
template<class D> struct Type<Vector_tag, D> { typedef Vector_ type; };
|
||||
template<class D> struct Type< FT_tag, D> { typedef FT_ type; };
|
||||
template<class D> struct Type< RT_tag, D> { typedef FT_ type; };
|
||||
template<class D> struct Type< Bbox_tag, D> { typedef Bbox<Dimension, double> type; };
|
||||
|
||||
typedef typeset<Point_tag>
|
||||
::add<Vector_tag>::type
|
||||
|
|
|
|||
|
|
@ -221,9 +221,6 @@ struct Lazy_cartesian_types
|
|||
template <class T> struct Type<T,Number_tag> {
|
||||
typedef CGAL::Lazy_exact_nt<typename Get_type<EK_,T>::type> type;
|
||||
};
|
||||
template <class T> struct Type<T,Bbox_tag> {
|
||||
typedef typename Get_type<EK_,T>::type type;
|
||||
};
|
||||
|
||||
template <class T> struct Iterator {
|
||||
typedef typename iterator_tag_traits<T>::value_tag Vt;
|
||||
|
|
@ -281,13 +278,11 @@ struct Lazy_cartesian :
|
|||
C2A(){}
|
||||
C2A(Kernel const&, Approximate_kernel const&){}
|
||||
template<class T>decltype(auto)operator()(T const&t)const{return CGAL::approx(t);}
|
||||
template <class A, class B> Bbox<A,B> operator()(const Bbox<A,B>& b) const{ return b; }
|
||||
};
|
||||
struct C2E {
|
||||
C2E(){}
|
||||
C2E(Kernel const&, Exact_kernel const&){}
|
||||
template<class T>decltype(auto)operator()(T const&t)const{return CGAL::exact(t);}
|
||||
template <class A, class B> Bbox<A,B> operator()(const Bbox<A,B>& b) const{ return b; }
|
||||
};
|
||||
|
||||
typedef typename Exact_kernel::Rep_tag Rep_tag;
|
||||
|
|
@ -314,42 +309,15 @@ struct Lazy_cartesian :
|
|||
template<class T,class D> struct Functor<T,D,Construct_tag> {
|
||||
typedef Lazy_construction2<T,Kernel> type;
|
||||
};
|
||||
//specialize for Bbox
|
||||
template<class D> struct Functor<Construct_bbox_tag,D,Construct_tag>
|
||||
{
|
||||
struct type
|
||||
{
|
||||
template <class TT>
|
||||
type(TT){}
|
||||
|
||||
template <class TT>
|
||||
auto operator()(const TT& t) const
|
||||
{
|
||||
return CartesianDKernelFunctors::Construct_bbox<Approximate_kernel>()(approx(t));
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
template<class D> struct Functor<Point_dimension_tag,D,Misc_tag> {
|
||||
typedef typename Get_functor<Approximate_kernel, Point_dimension_tag>::type FA;
|
||||
template<class T,class D> struct Functor<T,D,Misc_tag> {
|
||||
typedef typename Get_functor<Approximate_kernel, T>::type FA;
|
||||
struct type {
|
||||
FA fa;
|
||||
type(){}
|
||||
type(Kernel const&k):fa(k.approximate_kernel()){}
|
||||
template<class P>
|
||||
int operator()(P const&p)const{return fa(CGAL::approx(p));}
|
||||
};
|
||||
};
|
||||
template<class D> struct Functor<Vector_dimension_tag,D,Misc_tag> {
|
||||
typedef typename Get_functor<Approximate_kernel, Vector_dimension_tag>::type FA;
|
||||
struct type {
|
||||
FA fa;
|
||||
type(){}
|
||||
type(Kernel const&k):fa(k.approximate_kernel()){}
|
||||
template<class V>
|
||||
int operator()(V const&v)const{return fa(CGAL::approx(v));}
|
||||
template<class...P>
|
||||
decltype(auto) operator()(P&&...p)const{return fa(CGAL::approx(std::forward<P>(p))...);}
|
||||
};
|
||||
};
|
||||
template<class D> struct Functor<Linear_base_tag,D,Misc_tag> {
|
||||
|
|
|
|||
|
|
@ -157,7 +157,6 @@ namespace CGAL {
|
|||
CGAL_DECL_OBJ(Hyperplane, Object);
|
||||
CGAL_DECL_OBJ(Ray, Object);
|
||||
CGAL_DECL_OBJ(Iso_box, Object);
|
||||
CGAL_DECL_OBJ(Bbox, Bbox);
|
||||
CGAL_DECL_OBJ(Aff_transformation, Object);
|
||||
CGAL_DECL_OBJ(Weighted_point, Object);
|
||||
#undef CGAL_DECL_OBJ_
|
||||
|
|
@ -260,7 +259,6 @@ namespace CGAL {
|
|||
CGAL_DECL_CONSTRUCT(Construct_circumcenter,Point);
|
||||
CGAL_DECL_CONSTRUCT(Point_drop_weight,Point);
|
||||
CGAL_DECL_CONSTRUCT(Power_center,Weighted_point);
|
||||
CGAL_DECL_CONSTRUCT(Construct_bbox,Bbox);
|
||||
#undef CGAL_DECL_CONSTRUCT
|
||||
#if 0
|
||||
#define CGAL_DECL_ITER_CONSTRUCT(X,Y) struct X##_tag {}; \
|
||||
|
|
@ -315,6 +313,7 @@ namespace CGAL {
|
|||
//CGAL_DECL_MISC(Construct_vector_cartesian_const_iterator);
|
||||
CGAL_DECL_MISC(Point_dimension);
|
||||
CGAL_DECL_MISC(Vector_dimension);
|
||||
CGAL_DECL_MISC(Construct_bbox);
|
||||
CGAL_DECL_MISC(Linear_base); // Find a more appropriate category?
|
||||
#undef CGAL_DECL_MISC
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue