mirror of https://github.com/CGAL/cgal
Hide Regular_triangulation_euclidean_traits from the doc and use it internally
The user can now pass Epick_d directly to Regular_triangulation. Regular_triangulation_euclidean_traits is used internally to adapt the functors.
This commit is contained in:
parent
2b689787fe
commit
232efb9823
|
|
@ -1,13 +1,11 @@
|
|||
#include <CGAL/Epick_d.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
#include <CGAL/Regular_triangulation.h>
|
||||
#include <CGAL/IO/Triangulation_off_ostream.h>
|
||||
|
||||
#include <fstream>
|
||||
|
||||
typedef CGAL::Epick_d<CGAL::Dynamic_dimension_tag> K;
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<K> Traits;
|
||||
typedef CGAL::Regular_triangulation<Traits> RT;
|
||||
typedef CGAL::Regular_triangulation<K> RT;
|
||||
|
||||
void test(int dim)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <CGAL/Epick_d.h>
|
||||
#include <CGAL/Delaunay_triangulation.h>
|
||||
#include <CGAL/Regular_triangulation.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
|
||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
|
||||
|
|
@ -156,8 +155,7 @@ void go(const int N)
|
|||
points_d.push_back(Point_d(D, coords[i].begin(), coords[i].end()));
|
||||
|
||||
// RTd
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<Kd> Traits_d;
|
||||
typedef CGAL::Regular_triangulation<Traits_d> RT_d;
|
||||
typedef CGAL::Regular_triangulation<Kd> RT_d;
|
||||
typedef typename RT_d::Bare_point Bare_point_d;
|
||||
typedef typename RT_d::Point WPoint_d;
|
||||
|
||||
|
|
|
|||
|
|
@ -45,8 +45,7 @@ Parameters
|
|||
\tparam RegularTriangulationTraits is the geometric traits class that provides the
|
||||
geometric types and predicates needed by regular triangulations.
|
||||
`RegularTriangulationTraits` must be a model of the concept
|
||||
`RegularTriangulationTraits`. CGAL provides the class
|
||||
`Regular_triangulation_euclidean_traits` for this purpose.
|
||||
`RegularTriangulationTraits`.
|
||||
|
||||
\tparam TriangulationDataStructure must be a model of the concept
|
||||
`TriangulationDataStructure`. This model is used to store
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/*!
|
||||
\ingroup PkgTriangulationsTraitsClasses
|
||||
|
||||
The class `Regular_triangulation_euclidean_traits` is designed as a traits
|
||||
class for the class
|
||||
`Regular_triangulation<RegularTriangulationTraits, TriangulationDataStructure>`.
|
||||
|
||||
\tparam K must be a model of the `Kernel_d` concept. We recommend to use
|
||||
`Epick_d`.
|
||||
|
||||
\tparam Weight is optional. If is it not provided, `K::RT` will be used.
|
||||
|
||||
\cgalModels `RegularTriangulationTraits`
|
||||
*/
|
||||
template < class K, class Weight = typename K::RT >
|
||||
class Regular_triangulation_euclidean_traits
|
||||
: public K
|
||||
{
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
||||
|
|
@ -25,18 +25,13 @@ An arithmetic field type.
|
|||
typedef unspecified_type FT;
|
||||
|
||||
/*!
|
||||
The weighted point type. Must be the same type as `TriangulationTraits::Point_d`.
|
||||
The weighted point type.
|
||||
*/
|
||||
typedef unspecified_type Weighted_point;
|
||||
|
||||
/*!
|
||||
The un-weighted point type.
|
||||
*/
|
||||
typedef unspecified_type Bare_point;
|
||||
|
||||
/*!
|
||||
A predicate object that must provide the operator
|
||||
`Bare_point operator()(const Weighted_point & wp)`, returning
|
||||
`Point_d operator()(const Weighted_point & wp)`, returning
|
||||
`wp` without its weight.
|
||||
*/
|
||||
typedef unspecified_type Point_drop_weight_d;
|
||||
|
|
|
|||
|
|
@ -8,9 +8,6 @@
|
|||
/// \defgroup PkgTriangulationsVertexCellClasses Vertex, Face and Cell Classes
|
||||
/// \ingroup PkgTriangulations
|
||||
|
||||
/// \defgroup PkgTriangulationsTraitsClasses Traits Classes
|
||||
/// \ingroup PkgTriangulations
|
||||
|
||||
/*!
|
||||
\addtogroup PkgTriangulations
|
||||
\cgalPkgDescriptionBegin{dD Triangulations,PkgTriangulationsSummary}
|
||||
|
|
@ -110,10 +107,6 @@ The latter two concepts are also abbreviated respectively as `TrVertex` and `TrF
|
|||
- `CGAL::Triangulation_vertex<TriangulationTraits, Data, TriangulationDSVertex>`
|
||||
- `CGAL::Triangulation_full_cell<TriangulationTraits, Data, TriangulationDSFullCell>`
|
||||
|
||||
## Traits ##
|
||||
|
||||
- `CGAL::Regular_triangulation_euclidean_traits<K, Weight>`
|
||||
|
||||
## Enums ##
|
||||
|
||||
- `CGAL::Triangulation::Locate_type`
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <CGAL/Epick_d.h>
|
||||
#include <CGAL/point_generators_d.h>
|
||||
#include <CGAL/Regular_triangulation.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
#include <CGAL/assertions.h>
|
||||
|
||||
#include <iostream>
|
||||
|
|
@ -11,10 +10,9 @@
|
|||
const int D = 5; // Dimension
|
||||
const int N = 100; // Number of points
|
||||
typedef CGAL::Epick_d< CGAL::Dimension_tag<D> > K;
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<K> Traits;
|
||||
typedef Traits::Bare_point Bare_point;
|
||||
typedef Traits::Weighted_point Weighted_point;
|
||||
typedef CGAL::Regular_triangulation<Traits> T;
|
||||
typedef CGAL::Regular_triangulation<K> T;
|
||||
typedef T::Bare_point Bare_point;
|
||||
typedef T::Weighted_point Weighted_point;
|
||||
|
||||
int main()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -24,22 +24,26 @@
|
|||
#include <CGAL/Dimension.h>
|
||||
#include <CGAL/Default.h>
|
||||
#include <CGAL/spatial_sort.h>
|
||||
#include <CGAL/Spatial_sort_traits_adapter_d.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
|
||||
#include <boost/property_map/function_property_map.hpp>
|
||||
|
||||
namespace CGAL {
|
||||
|
||||
template< typename RTTraits, typename TDS_ = Default >
|
||||
template< typename Traits_, typename TDS_ = Default >
|
||||
class Regular_triangulation
|
||||
: public Triangulation<
|
||||
RTTraits,
|
||||
typename Default::Get<TDS_, Triangulation_data_structure<
|
||||
typename RTTraits::Dimension,
|
||||
Triangulation_vertex<RTTraits>,
|
||||
Triangulation_full_cell<RTTraits> >
|
||||
CGAL::Regular_triangulation_euclidean_traits<Traits_>,
|
||||
typename Default::Get<
|
||||
TDS_,
|
||||
Triangulation_data_structure<
|
||||
typename CGAL::Regular_triangulation_euclidean_traits<Traits_>::Dimension,
|
||||
Triangulation_vertex<CGAL::Regular_triangulation_euclidean_traits<Traits_> >,
|
||||
Triangulation_full_cell<CGAL::Regular_triangulation_euclidean_traits<Traits_> >
|
||||
>
|
||||
>::type>
|
||||
{
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<Traits_> RTTraits;
|
||||
typedef typename RTTraits::Dimension Maximal_dimension_;
|
||||
typedef typename Default::Get<
|
||||
TDS_,
|
||||
|
|
@ -49,7 +53,7 @@ class Regular_triangulation
|
|||
Triangulation_full_cell<RTTraits>
|
||||
> >::type TDS;
|
||||
typedef Triangulation<RTTraits, TDS> Base;
|
||||
typedef Regular_triangulation<RTTraits, TDS_> Self;
|
||||
typedef Regular_triangulation<Traits_, TDS_> Self;
|
||||
|
||||
typedef typename RTTraits::Orientation_d Orientation_d;
|
||||
typedef typename RTTraits::Power_test_d Power_test_d;
|
||||
|
|
@ -465,9 +469,9 @@ private:
|
|||
|
||||
// Warning: this function is not correct since it does not restore hidden
|
||||
// vertices
|
||||
template< typename RTTraits, typename TDS >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Full_cell_handle
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
template< typename Traits, typename TDS >
|
||||
typename Regular_triangulation<Traits, TDS>::Full_cell_handle
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::remove( Vertex_handle v )
|
||||
{
|
||||
CGAL_precondition( ! is_infinite(v) );
|
||||
|
|
@ -522,12 +526,12 @@ Regular_triangulation<RTTraits, TDS>
|
|||
typedef Triangulation_vertex<Geom_traits, Vertex_handle> Dark_vertex_base;
|
||||
typedef Triangulation_full_cell<
|
||||
Geom_traits,
|
||||
internal::Triangulation::Dark_full_cell_data<Self> > Dark_full_cell_base;
|
||||
internal::Triangulation::Dark_full_cell_data<TDS> > Dark_full_cell_base;
|
||||
typedef Triangulation_data_structure<Maximal_dimension,
|
||||
Dark_vertex_base,
|
||||
Dark_full_cell_base
|
||||
> Dark_tds;
|
||||
typedef Regular_triangulation<RTTraits, Dark_tds> Dark_triangulation;
|
||||
typedef Regular_triangulation<Traits, Dark_tds> Dark_triangulation;
|
||||
typedef typename Dark_triangulation::Face Dark_face;
|
||||
typedef typename Dark_triangulation::Facet Dark_facet;
|
||||
typedef typename Dark_triangulation::Vertex_handle Dark_v_handle;
|
||||
|
|
@ -762,9 +766,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
return ret_s;
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
template< typename Traits, typename TDS >
|
||||
void
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::remove_decrease_dimension(Vertex_handle v)
|
||||
{
|
||||
CGAL_precondition( current_dimension() >= 0 );
|
||||
|
|
@ -785,9 +789,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - INSERTIONS
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Vertex_handle
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
template< typename Traits, typename TDS >
|
||||
typename Regular_triangulation<Traits, TDS>::Vertex_handle
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::insert(const Weighted_point & p, const Locate_type lt, const Face & f, const Facet & ft, const Full_cell_handle s)
|
||||
{
|
||||
switch( lt )
|
||||
|
|
@ -821,9 +825,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
}
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Vertex_handle
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
template< typename Traits, typename TDS >
|
||||
typename Regular_triangulation<Traits, TDS>::Vertex_handle
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::insert_outside_affine_hull(const Weighted_point & p)
|
||||
{
|
||||
// we don't use Base::insert_outside_affine_hull(...) because here, we
|
||||
|
|
@ -870,9 +874,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
return v;
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Vertex_handle
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
template< typename Traits, typename TDS >
|
||||
typename Regular_triangulation<Traits, TDS>::Vertex_handle
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::insert_if_in_star(const Weighted_point & p,
|
||||
const Vertex_handle star_center,
|
||||
const Locate_type lt, const Face & f, const Facet & ft,
|
||||
|
|
@ -910,9 +914,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
return Vertex_handle();
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Vertex_handle
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
template< typename Traits, typename TDS >
|
||||
typename Regular_triangulation<Traits, TDS>::Vertex_handle
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::insert_in_conflicting_cell(const Weighted_point & p,
|
||||
const Full_cell_handle s,
|
||||
const Vertex_handle only_if_this_vertex_is_in_the_cz)
|
||||
|
|
@ -960,10 +964,10 @@ Regular_triangulation<RTTraits, TDS>
|
|||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - GATHERING CONFLICTING SIMPLICES
|
||||
|
||||
// NOT DOCUMENTED
|
||||
template< typename RTTraits, typename TDS >
|
||||
template< typename Traits, typename TDS >
|
||||
template< typename OrientationPred >
|
||||
Oriented_side
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::perturbed_power_test(const Weighted_point & p, Full_cell_const_handle s,
|
||||
const OrientationPred & ori) const
|
||||
{
|
||||
|
|
@ -1018,9 +1022,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
return ON_NEGATIVE_SIDE;
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
template< typename Traits, typename TDS >
|
||||
bool
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::is_in_conflict(const Weighted_point & p, Full_cell_const_handle s) const
|
||||
{
|
||||
CGAL_precondition( 1 <= current_dimension() );
|
||||
|
|
@ -1041,10 +1045,10 @@ Regular_triangulation<RTTraits, TDS>
|
|||
}
|
||||
}
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
template< typename Traits, typename TDS >
|
||||
template< typename OutputIterator >
|
||||
typename Regular_triangulation<RTTraits, TDS>::Facet
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
typename Regular_triangulation<Traits, TDS>::Facet
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::compute_conflict_zone(const Weighted_point & p, const Full_cell_handle s, OutputIterator out) const
|
||||
{
|
||||
CGAL_precondition( 1 <= current_dimension() );
|
||||
|
|
@ -1069,9 +1073,9 @@ Regular_triangulation<RTTraits, TDS>
|
|||
|
||||
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - VALIDITY
|
||||
|
||||
template< typename RTTraits, typename TDS >
|
||||
template< typename Traits, typename TDS >
|
||||
bool
|
||||
Regular_triangulation<RTTraits, TDS>
|
||||
Regular_triangulation<Traits, TDS>
|
||||
::is_valid(bool verbose, int level) const
|
||||
{
|
||||
if (!Base::is_valid(verbose, level))
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <CGAL/Epick_d.h>
|
||||
#include <CGAL/point_generators_d.h>
|
||||
#include <CGAL/Regular_triangulation.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
#include <CGAL/IO/Triangulation_off_ostream.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
|
||||
|
|
@ -81,8 +80,7 @@ void go(const int N)
|
|||
{
|
||||
//typedef CGAL::Epick_d<CGAL::Dynamic_dimension_tag> FK;
|
||||
typedef CGAL::Epick_d<CGAL::Dimension_tag<D> > FK;
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<FK> Traits;
|
||||
typedef CGAL::Regular_triangulation<Traits> Triangulation;
|
||||
typedef CGAL::Regular_triangulation<FK> Triangulation;
|
||||
//test<Triangulation>(D, "dynamic", N);
|
||||
test<Triangulation>(D, "static", N);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
#include <CGAL/Epick_d.h>
|
||||
#include <CGAL/point_generators_d.h>
|
||||
#include <CGAL/Regular_triangulation.h>
|
||||
#include <CGAL/Regular_triangulation_euclidean_traits.h>
|
||||
#include <CGAL/algorithm.h>
|
||||
|
||||
#include <tilted_grid.h>
|
||||
|
|
@ -110,8 +109,7 @@ void go(const int N)
|
|||
{
|
||||
//typedef CGAL::Epick_d<CGAL::Dynamic_dimension_tag> FK;
|
||||
typedef CGAL::Epick_d<CGAL::Dimension_tag<D> > FK;
|
||||
typedef CGAL::Regular_triangulation_euclidean_traits<FK> Traits;
|
||||
typedef CGAL::Regular_triangulation<Traits> Triangulation;
|
||||
typedef CGAL::Regular_triangulation<FK> Triangulation;
|
||||
//test<Triangulation>(D, "dynamic", N);
|
||||
test<Triangulation>(D, "static", N);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue