1 // Copyright (c) 1997, 2012  INRIA Sophia-Antipolis (France).
2 // All rights reserved.
3 //
4 // This file is part of CGAL (www.cgal.org).
5 //
6 // $URL: https://github.com/CGAL/cgal/blob/v5.3/Alpha_shapes_2/include/CGAL/Alpha_shape_vertex_base_2.h $
7 // $Id: Alpha_shape_vertex_base_2.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot
8 // SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
9 //
10 //
11 // Author(s)     : Tran Kai Frank DA <Frank.Da@sophia.inria.fr>
12 
13 #ifndef CGAL_ALPHA_SHAPE_VERTEX_BASE_2_H
14 #define CGAL_ALPHA_SHAPE_VERTEX_BASE_2_H
15 
16 #include <CGAL/license/Alpha_shapes_2.h>
17 
18 
19 #include <utility>
20 #include <CGAL/Triangulation_vertex_base_2.h>
21 #include <CGAL/internal/Lazy_alpha_nt_2.h>
22 
23 //-------------------------------------------------------------------
24 namespace CGAL {
25 //-------------------------------------------------------------------
26 
27 template <class Gt,
28           class Vb_ = Default,
29           class ExactAlphaComparisonTag = Tag_false,
30           class Weighted_tag = Tag_false>
31 class Alpha_shape_vertex_base_2
32   : public Default::Get<Vb_, Triangulation_vertex_base_2<Gt> >::type
33 {
34   typedef typename Default::Get<Vb_, Triangulation_vertex_base_2<Gt> >::type Vb;
35 
36 public:
37   typedef typename Vb::Vertex_handle                            Vertex_handle;
38   typedef typename Vb::Face_handle                              Face_handle;
39   typedef typename Vb::Point                                    Point;
40 
41   template < typename TDS2 >
42   struct Rebind_TDS {
43     typedef typename Vb::template Rebind_TDS<TDS2>::Other       Vb2;
44     typedef Alpha_shape_vertex_base_2<
45       Gt, Vb2, ExactAlphaComparisonTag, Weighted_tag>           Other;
46   };
47 
48   typedef typename internal::Alpha_nt_selector_2<
49     Gt, ExactAlphaComparisonTag, Weighted_tag>::Type_of_alpha   Type_of_alpha;
50   typedef Type_of_alpha                                         NT;
51 
52   typedef std::pair< Type_of_alpha, Type_of_alpha >             Interval2;
53 
54 private:
55   Interval2 I;
56 
57 public:
Alpha_shape_vertex_base_2()58   Alpha_shape_vertex_base_2()
59     : Vb()
60   {}
61 
Alpha_shape_vertex_base_2(const Point & p)62   Alpha_shape_vertex_base_2(const Point & p)
63     : Vb(p)
64   {}
65 
Alpha_shape_vertex_base_2(const Point & p,Face_handle f)66   Alpha_shape_vertex_base_2(const Point & p, Face_handle f)
67     : Vb(p, f)
68   {}
69 
70 public:
get_range()71   inline Interval2 get_range() { return I; }
set_range(Interval2 Inter)72   inline void set_range(Interval2 Inter) { I = Inter; }
73 
74 };
75 
76 //-------------------------------------------------------------------
77 } //namespace CGAL
78 //-------------------------------------------------------------------
79 
80 #endif //ALPHA_SHAPE_VERTEX_BASE_2_H
81