Merge branch 'cgal/releases/CGAL-4.12-branch'

This commit is contained in:
Sébastien Loriot 2018-05-15 22:32:45 +02:00
commit 4d00a8e070
17 changed files with 69 additions and 35 deletions

View File

@ -291,7 +291,8 @@ public:
*/
class Sort_primitives
{
const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& m_traits;
typedef AABB_traits<GeomTraits,AABBPrimitive,BboxMap> Traits;
const Traits& m_traits;
public:
Sort_primitives(const AABB_traits<GeomTraits,AABBPrimitive,BboxMap>& traits)
: m_traits(traits) {}
@ -302,16 +303,16 @@ public:
const typename AT::Bounding_box& bbox) const
{
PrimitiveIterator middle = first + (beyond - first)/2;
switch(longest_axis(bbox))
switch(Traits::longest_axis(bbox))
{
case AT::CGAL_AXIS_X: // sort along x
std::nth_element(first, middle, beyond, boost::bind(less_x,_1,_2,m_traits));
std::nth_element(first, middle, beyond, boost::bind(Traits::less_x,_1,_2,m_traits));
break;
case AT::CGAL_AXIS_Y: // sort along y
std::nth_element(first, middle, beyond, boost::bind(less_y,_1,_2,m_traits));
std::nth_element(first, middle, beyond, boost::bind(Traits::less_y,_1,_2,m_traits));
break;
case AT::CGAL_AXIS_Z: // sort along z
std::nth_element(first, middle, beyond, boost::bind(less_z,_1,_2,m_traits));
std::nth_element(first, middle, beyond, boost::bind(Traits::less_z,_1,_2,m_traits));
break;
default:
CGAL_error();

View File

@ -201,7 +201,9 @@ public:
}; // class Algebraic_real_traits
struct Construct_algebraic_real_1;
// Functors of Algebraic_kernel_d_1
struct Solve_1 {
public:

View File

@ -45,7 +45,7 @@ namespace internal {
//
template < class Input_traits, class Kernel_approx, class Kernel_exact,
class Weighted_tag >
class Is_traits_point_convertible
class Is_traits_point_convertible_2
{
typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel Kernel_input;
@ -60,7 +60,7 @@ public:
};
template < class Input_traits, class Kernel_approx, class Kernel_exact >
class Is_traits_point_convertible<Input_traits, Kernel_approx, Kernel_exact,
class Is_traits_point_convertible_2<Input_traits, Kernel_approx, Kernel_exact,
::CGAL::Tag_true /* Weighted_tag */>
{
typedef typename Kernel_traits<typename Input_traits::Point_2>::Kernel Kernel_input;
@ -157,7 +157,7 @@ class Lazy_alpha_nt_2
Approx_point to_approx(const Input_point& wp) const
{
// The traits class' Point_2 must be convertible using the Cartesian converter
CGAL_static_assertion((Is_traits_point_convertible<
CGAL_static_assertion((Is_traits_point_convertible_2<
Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value));
To_approx converter;
@ -167,7 +167,7 @@ class Lazy_alpha_nt_2
Exact_point to_exact(const Input_point& wp) const
{
// The traits class' Point_2 must be convertible using the Cartesian converter
CGAL_static_assertion((Is_traits_point_convertible<
CGAL_static_assertion((Is_traits_point_convertible_2<
Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value));
To_exact converter;

View File

@ -45,7 +45,7 @@ namespace internal{
//
template < class Input_traits, class Kernel_approx, class Kernel_exact,
class Weighted_tag >
class Is_traits_point_convertible
class Is_traits_point_convertible_3
{
typedef typename Kernel_traits<typename Input_traits::Point_3>::Kernel Kernel_input;
@ -60,7 +60,7 @@ public:
};
template < class Input_traits, class Kernel_approx, class Kernel_exact >
class Is_traits_point_convertible<Input_traits, Kernel_approx, Kernel_exact,
class Is_traits_point_convertible_3<Input_traits, Kernel_approx, Kernel_exact,
::CGAL::Tag_true /* Weighted_tag */>
{
typedef typename Kernel_traits<typename Input_traits::Point_3>::Kernel Kernel_input;
@ -148,7 +148,7 @@ class Lazy_alpha_nt_3{
Approx_point to_approx(const Input_point& wp) const
{
// The traits class' Point_3 must be convertible using the Cartesian converter
CGAL_static_assertion((Is_traits_point_convertible<
CGAL_static_assertion((Is_traits_point_convertible_3<
Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value));
To_approx converter;
@ -158,7 +158,7 @@ class Lazy_alpha_nt_3{
Exact_point to_exact(const Input_point& wp) const
{
// The traits class' Point_3 must be convertible using the Cartesian converter
CGAL_static_assertion((Is_traits_point_convertible<
CGAL_static_assertion((Is_traits_point_convertible_3<
Input_traits, Kernel_approx, Kernel_exact, Weighted_tag>::value));
To_exact converter;

View File

@ -163,6 +163,9 @@ public:
/// \name Construction functors(based on the subcurve traits).
//@{
#ifndef DOXYGEN_RUNNING
class Push_back_2;
#endif
/*! \class
* A functor that divides an arc into x-monotone arcs. That are, arcs that
* do not cross the identification arc.

View File

@ -347,6 +347,9 @@ public:
return os;
}
class Parameter_space_in_x_2;
class Parameter_space_in_y_2;
/*! A functor that computes intersections between x-monotone curves. */
class Intersect_2 {
protected:

View File

@ -41,6 +41,7 @@
#include <CGAL/CORE/extLong.h>
#include <CGAL/atomic.h>
#include <CGAL/disable_warnings.h>
#ifdef CGAL_HEADER_ONLY
@ -340,4 +341,6 @@ inline void setPositionalFormat(std::ostream& o = std::cout) {
#include <CGAL/CORE/CoreDefs_impl.h>
#endif // CGAL_HEADER_ONLY
#include <CGAL/enable_warnings.h>
#endif // _CORE_COREDEFS_H_

View File

@ -33,6 +33,7 @@ protected:
private:
DT * dt;
typedef typename DT::Vertex_handle Vertex_handle;
typename DT::Vertex_handle hint;
typename DT::Face_handle fh;
QGraphicsScene *scene_;
@ -89,8 +90,12 @@ TriangulationCircumcircle<T>::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
{
if(dt->dimension() != 2){
circle->hide();
hint = Vertex_handle();
return;
}
if (hint == Vertex_handle()){
hint = dt->infinite_vertex();
}
typename T::Point p = typename T::Point(event->scenePos().x(), event->scenePos().y());
fh = dt->locate(p, hint->face());
hint = fh->vertex(0);

View File

@ -34,6 +34,7 @@
# pragma warning(disable: 4714) // function marked as __forceinline not inlined
# pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' (performance warning)
# pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used
# pragma warning(disable: 4834) // discarding return value of function with 'nodiscard' attribute
#endif

View File

@ -98,11 +98,7 @@ printed.
See \cgalFigureRef{Conformexampleconform}
\cgalFigureBegin{Conformexampleconform,example-conform-Delaunay-Gabriel.png}
Initial triangulation and the corresponding Delaunay and Gabriel triangulation.
\cgalFigureEnd
\cgalFigureBegin{ConformexampleconformDelaunay,example-conform-Delaunay.png}
The corresponding conforming Delaunay triangulation.
From left to right: Initial Delaunay triangulation, the corresponding conforming Delaunay, and the corresponding Gabriel triangulation.
\cgalFigureEnd
\section secMesh_2_meshes Meshes

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

View File

@ -102,11 +102,11 @@ public:
if (bbox.xmax()-bbox.xmin() >= bbox.ymax()-bbox.ymin())
{
std::nth_element(first, middle, beyond, less_x); // sort along x
std::nth_element(first, middle, beyond, AABB_traits_2::less_x); // sort along x
}
else
{
std::nth_element(first, middle, beyond, less_y); // sort along y
std::nth_element(first, middle, beyond, AABB_traits_2::less_y); // sort along y
}
}
};

View File

@ -36,6 +36,8 @@
#ifndef CGAL_ROTATION_TREE_H
#define CGAL_ROTATION_TREE_H
#include <CGAL/disable_warnings.h>
#include <CGAL/license/Partition_2.h>
@ -178,6 +180,8 @@ private:
#include <CGAL/Partition_2/Rotation_tree_2_impl.h>
#include <CGAL/enable_warnings.h>
#endif // CGAL_ROTATION_TREE_H
// For the Emacs editor:

View File

@ -501,11 +501,12 @@ create_mst_graph(
/**
\ingroup PkgPointSetProcessingAlgorithms
Orients the normals of the range of `points` using the propagation
of a seed orientation through a minimum spanning tree of the Riemannian graph [Hoppe92].
of a seed orientation through a minimum spanning tree of the Riemannian graph.
This method modifies the order of input points so as to pack all sucessfully oriented points first,
and returns an iterator over the first point with an unoriented normal (see erase-remove idiom).
For this reason it should not be called on sorted containers.
It is based on \cgalCite{cgal:hddms-srup-92}.
\warning This function may fail when Boost version 1.54 is used,
because of the following bug: https://svn.boost.org/trac/boost/ticket/9012

View File

@ -729,7 +729,9 @@ public:
return gic( gc( p, exponent ), ev );
};
};
typedef CGAL::internal::Monomial_representation<Polynomial_d> Monomial_representation;
// Swap variable x_i with x_j
struct Swap {
typedef Polynomial_d result_type;
@ -1537,10 +1539,6 @@ struct Construct_innermost_coefficient_const_iterator_range
};
typedef
CGAL::internal::Monomial_representation<Polynomial_d>
Monomial_representation;
// returns the Exponten_vector of the innermost leading coefficient
struct Degree_vector{
typedef Exponent_vector result_type;

View File

@ -20,7 +20,7 @@
#ifndef CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
#define CGAL_INTERNAL_ARRAY_BINARY_TREE_HPP
#include <boost/iterator.hpp>
#include <iterator>
#include <functional>
#include <boost/config.hpp>
@ -52,12 +52,12 @@ public:
struct children_type {
struct iterator
: ::boost::iterator<std::forward_iterator_tag,
//JT: the iterator type is "forward" and not "bidirectional",
//because it does not implement unary operator--
ArrayBinaryTreeNode,
difference_type, array_binary_tree_node*, ArrayBinaryTreeNode&>
{ // replace with iterator_adaptor implementation -JGS
typedef std::forward_iterator_tag Category;
typedef ArrayBinaryTreeNode value_type;
typedef size_type difference_type
typedef ArrayBinaryTreeNode* Pointer;
typedef ArrayBinaryTreeNode& Reference;
inline iterator() : i(0), n(0) { }
inline iterator(const iterator& x) : r(x.r), i(x.i), n(x.n), id(x.id) { }

View File

@ -107,7 +107,8 @@ protected:
typedef Segment_tree_node<C_Data,C_Window,C_Interface> Segment_tree_node_t;
typedef Segment_tree_node<C_Data,C_Window,C_Interface> *link_type;
std::allocator<Segment_tree_node_t> alloc;
typedef std::allocator<Segment_tree_node_t> allocator_type;
allocator_type alloc;
C_Interface m_interface;
bool is_built;
@ -197,7 +198,11 @@ protected:
{
Segment_tree_node_t node(l,r,kl,kr);
Segment_tree_node_t* node_ptr = alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
#else
alloc.construct(node_ptr, node);
#endif
return node_ptr;
}
@ -205,7 +210,11 @@ protected:
{
Segment_tree_node_t node(kl,kr);
Segment_tree_node_t* node_ptr = alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
#else
alloc.construct(node_ptr, node);
#endif
return node_ptr;
}
@ -213,7 +222,11 @@ protected:
{
Segment_tree_node_t node;
Segment_tree_node_t* node_ptr = alloc.allocate(1);
#ifdef CGAL_CXX11
std::allocator_traits<allocator_type>::construct(alloc, node_ptr, node);
#else
alloc.construct(node_ptr, node);
#endif
return node_ptr;
}
@ -298,7 +311,11 @@ protected:
void delete_node(Segment_tree_node_t* node_ptr)
{
#ifdef CGAL_CXX11
std::allocator_traits<allocator_type>::destroy(alloc, node_ptr);
#else
alloc.destroy(node_ptr);
#endif
alloc.deallocate(node_ptr,1);
}