mirror of https://github.com/CGAL/cgal
Remove dependencies of Triangulation_3 on Triangulation_2
This commit is contained in:
parent
3ec934e291
commit
8cbbe0e165
|
|
@ -30,7 +30,7 @@
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <CGAL/internal/Triangulation/Has_nested_type_Bare_point.h>
|
#include <CGAL/internal/Has_nested_type_Bare_point.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,10 @@
|
||||||
// Copyright (c) 2016 GeometryFactory Sarl (France)
|
// Copyright (c) 2016 GeometryFactory Sarl (France)
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org).
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// You can redistribute it and/or modify it under the terms of the GNU
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
// General Public License as published by the Free Software Foundation,
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
// either version 3 of the License, or (at your option) any later version.
|
// or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// Licensees holding a valid commercial license may use this file in
|
// Licensees holding a valid commercial license may use this file in
|
||||||
// accordance with the commercial license agreement provided with the software.
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
|
@ -13,14 +13,10 @@
|
||||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||||
//
|
//
|
||||||
//
|
|
||||||
// Author(s) : Jane Tournois
|
// Author(s) : Jane Tournois
|
||||||
|
|
||||||
#ifndef CGAL_TRIANGULATION_HAS_NESTED_TYPE_BARE_POINT_H
|
#ifndef CGAL_HAS_NESTED_TYPE_BARE_POINT_H
|
||||||
#define CGAL_TRIANGULATION_HAS_NESTED_TYPE_BARE_POINT_H
|
#define CGAL_HAS_NESTED_TYPE_BARE_POINT_H
|
||||||
|
|
||||||
#include <CGAL/license/Triangulation.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
|
|
||||||
|
|
@ -40,4 +36,4 @@ namespace CGAL {
|
||||||
} // end namespace internal
|
} // end namespace internal
|
||||||
} // end namespace CGAL
|
} // end namespace CGAL
|
||||||
|
|
||||||
#endif // CGAL_TRIANGULATION_HAS_NESTED_TYPE_BARE_POINT_H
|
#endif // CGAL_HAS_NESTED_TYPE_BARE_POINT_H
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
// Copyright (c) 2010 GeometryFactory (France).
|
// Copyright (c) 2010 GeometryFactory (France).
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org).
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// You can redistribute it and/or modify it under the terms of the GNU
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
// General Public License as published by the Free Software Foundation,
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
// either version 3 of the License, or (at your option) any later version.
|
// or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// Licensees holding a valid commercial license may use this file in
|
// Licensees holding a valid commercial license may use this file in
|
||||||
// accordance with the commercial license agreement provided with the software.
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
|
@ -22,8 +22,6 @@
|
||||||
#ifndef CGAL_INTERNAL_INFO_CHECK_H
|
#ifndef CGAL_INTERNAL_INFO_CHECK_H
|
||||||
#define CGAL_INTERNAL_INFO_CHECK_H
|
#define CGAL_INTERNAL_INFO_CHECK_H
|
||||||
|
|
||||||
#include <CGAL/license/Triangulation_2.h>
|
|
||||||
|
|
||||||
|
|
||||||
#include <boost/mpl/has_xxx.hpp>
|
#include <boost/mpl/has_xxx.hpp>
|
||||||
|
|
||||||
|
|
@ -1,10 +1,9 @@
|
||||||
// Copyright (c) 2001 INRIA Sophia-Antipolis (France).
|
// Copyright (c) 2001 INRIA Sophia-Antipolis (France). All rights reserved.
|
||||||
// All rights reserved.
|
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org).
|
// This file is part of CGAL (www.cgal.org); you can redistribute it and/or
|
||||||
// You can redistribute it and/or modify it under the terms of the GNU
|
// modify it under the terms of the GNU Lesser General Public License as
|
||||||
// General Public License as published by the Free Software Foundation,
|
// published by the Free Software Foundation; either version 3 of the License,
|
||||||
// either version 3 of the License, or (at your option) any later version.
|
// or (at your option) any later version.
|
||||||
//
|
//
|
||||||
// Licensees holding a valid commercial license may use this file in
|
// Licensees holding a valid commercial license may use this file in
|
||||||
// accordance with the commercial license agreement provided with the software.
|
// accordance with the commercial license agreement provided with the software.
|
||||||
|
|
@ -40,7 +39,6 @@
|
||||||
|| defined(NDEBUG)
|
|| defined(NDEBUG)
|
||||||
# define CGAL_triangulation_assertion(EX) (static_cast<void>(0))
|
# define CGAL_triangulation_assertion(EX) (static_cast<void>(0))
|
||||||
|
|
||||||
#include <CGAL/license/Triangulation_2.h>
|
|
||||||
|
|
||||||
# define CGAL_triangulation_assertion_msg(EX,MSG) (static_cast<void>(0))
|
# define CGAL_triangulation_assertion_msg(EX,MSG) (static_cast<void>(0))
|
||||||
# define CGAL_triangulation_assertion_code(CODE)
|
# define CGAL_triangulation_assertion_code(CODE)
|
||||||
|
|
@ -30,7 +30,7 @@
|
||||||
#include <CGAL/Regular_triangulation_vertex_base_2.h>
|
#include <CGAL/Regular_triangulation_vertex_base_2.h>
|
||||||
#include <CGAL/utility.h>
|
#include <CGAL/utility.h>
|
||||||
#include <CGAL/Object.h>
|
#include <CGAL/Object.h>
|
||||||
#include <CGAL/internal/Triangulation/Has_nested_type_Bare_point.h>
|
#include <CGAL/internal/Has_nested_type_Bare_point.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ struct Weighted_point_mapper_3
|
||||||
#include <CGAL/Triangulation_3.h>
|
#include <CGAL/Triangulation_3.h>
|
||||||
#include <CGAL/Regular_triangulation_vertex_base_3.h>
|
#include <CGAL/Regular_triangulation_vertex_base_3.h>
|
||||||
#include <CGAL/Regular_triangulation_cell_base_3.h>
|
#include <CGAL/Regular_triangulation_cell_base_3.h>
|
||||||
#include <CGAL/internal/Triangulation/Has_nested_type_Bare_point.h>
|
#include <CGAL/internal/Has_nested_type_Bare_point.h>
|
||||||
|
|
||||||
#include <boost/bind.hpp>
|
#include <boost/bind.hpp>
|
||||||
#include <boost/mpl/if.hpp>
|
#include <boost/mpl/if.hpp>
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,6 @@
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/triangulation_assertions.h>
|
#include <CGAL/triangulation_assertions.h>
|
||||||
#include <CGAL/Triangulation_utils_2.h>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
@ -36,6 +35,10 @@ struct Triangulation_utils_base_3
|
||||||
{
|
{
|
||||||
static const char tab_next_around_edge[4][4];
|
static const char tab_next_around_edge[4][4];
|
||||||
static const int tab_vertex_triple_index[4][3];
|
static const int tab_vertex_triple_index[4][3];
|
||||||
|
|
||||||
|
// copied from Triangulation_utils_2.h to avoid package dependency
|
||||||
|
static const int ccw_map[3];
|
||||||
|
static const int cw_map[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
template < class T >
|
template < class T >
|
||||||
|
|
@ -53,14 +56,31 @@ const int Triangulation_utils_base_3<T>::tab_vertex_triple_index[4][3] = {
|
||||||
{0, 1, 2}
|
{0, 1, 2}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template < class T >
|
||||||
|
const int Triangulation_utils_base_3<T>::ccw_map[3] = {1, 2, 0};
|
||||||
|
|
||||||
|
template < class T >
|
||||||
|
const int Triangulation_utils_base_3<T>::cw_map[3] = {2, 0, 1};
|
||||||
|
|
||||||
// We derive from Triangulation_cw_ccw_2 because we still use cw() and ccw()
|
// We derive from Triangulation_cw_ccw_2 because we still use cw() and ccw()
|
||||||
// in the 2D part of the code. Ideally, this should go away when we re-use
|
// in the 2D part of the code. Ideally, this should go away when we re-use
|
||||||
// T2D entirely.
|
// T2D entirely.
|
||||||
|
|
||||||
struct Triangulation_utils_3
|
struct Triangulation_utils_3
|
||||||
: public Triangulation_cw_ccw_2,
|
: public Triangulation_utils_base_3<>
|
||||||
public Triangulation_utils_base_3<>
|
|
||||||
{
|
{
|
||||||
|
static int ccw(const int i)
|
||||||
|
{
|
||||||
|
CGAL_triangulation_precondition( i >= 0 && i < 3);
|
||||||
|
return ccw_map[i];
|
||||||
|
}
|
||||||
|
|
||||||
|
static int cw(const int i)
|
||||||
|
{
|
||||||
|
CGAL_triangulation_precondition( i >= 0 && i < 3);
|
||||||
|
return cw_map[i];
|
||||||
|
}
|
||||||
|
|
||||||
static int next_around_edge(const int i, const int j)
|
static int next_around_edge(const int i, const int j)
|
||||||
{
|
{
|
||||||
// index of the next cell when turning around the
|
// index of the next cell when turning around the
|
||||||
|
|
|
||||||
|
|
@ -5,5 +5,4 @@
|
||||||
|
|
||||||
#define CGAL_LICENSE_ERROR
|
#define CGAL_LICENSE_ERROR
|
||||||
#define CGAL_TRIANGULATION_3_COMMERCIAL_LICENSE 22222222
|
#define CGAL_TRIANGULATION_3_COMMERCIAL_LICENSE 22222222
|
||||||
#define CGAL_TRIANGULATION_2_COMMERCIAL_LICENSE 22222222
|
|
||||||
#define CGAL_TDS_3_COMMERCIAL_LICENSE 22222222
|
#define CGAL_TDS_3_COMMERCIAL_LICENSE 22222222
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
|
|
||||||
|
#include "test_dependencies.h"
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Regular_triangulation_3.h>
|
#include <CGAL/Regular_triangulation_3.h>
|
||||||
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
|
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue