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_3/include/CGAL/Alpha_shape_vertex_base_3.h $
7 // $Id: Alpha_shape_vertex_base_3.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
12 
13 #ifndef CGAL_ALPHA_SHAPE_VERTEX_BASE_3_H
14 #define CGAL_ALPHA_SHAPE_VERTEX_BASE_3_H
15 
16 #include <CGAL/license/Alpha_shapes_3.h>
17 
18 
19 #include <utility>
20 #include <CGAL/Compact_container.h>
21 #include <CGAL/Triangulation_vertex_base_3.h>
22 #include <CGAL/Alpha_shape_cell_base_3.h>
23 #include <CGAL/Default.h>
24 
25 namespace CGAL {
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_3
32   : public Default::Get<Vb_, Triangulation_vertex_base_3<Gt> >::type
33 {
34   typedef typename Default::Get<Vb_, Triangulation_vertex_base_3<Gt> >::type Vb;
35 
36 public:
37   typedef typename Vb::Cell_handle    Cell_handle;
38 
39   template < typename TDS2 >
40   struct Rebind_TDS {
41     typedef typename Vb::template Rebind_TDS<TDS2>::Other   Vb2;
42     typedef Alpha_shape_vertex_base_3<Gt, Vb2, ExactAlphaComparisonTag, Weighted_tag>              Other;
43   };
44 
45   typedef typename Vb::Point Point;
46   typedef typename internal::Alpha_nt_selector_3<
47     Gt, ExactAlphaComparisonTag, Weighted_tag>::Type_of_alpha  NT;
48   typedef CGAL::Alpha_status<NT>                               Alpha_status;
49   typedef Compact_container<Alpha_status>                      Alpha_status_container;
50   typedef typename Alpha_status_container::const_iterator      Alpha_status_const_iterator;
51   typedef typename Alpha_status_container::iterator            Alpha_status_iterator;
52 
53 private:
54   Alpha_status _as;
55 
56 public:
Alpha_shape_vertex_base_3()57   Alpha_shape_vertex_base_3()
58     : Vb() {}
59 
Alpha_shape_vertex_base_3(const Point & p)60   Alpha_shape_vertex_base_3(const Point& p)
61     : Vb(p) {}
62 
Alpha_shape_vertex_base_3(const Point & p,Cell_handle c)63   Alpha_shape_vertex_base_3(const Point& p, Cell_handle c)
64     : Vb(p, c) {}
65 
get_alpha_status()66   Alpha_status*  get_alpha_status() { return &_as;}
set_alpha_status(Alpha_status_iterator as)67   void set_alpha_status(Alpha_status_iterator as) {_as= as;}
68 };
69 
70 } //namespace CGAL
71 
72 #endif // CGAL_ALPHA_SHAPE_VERTEX_BASE_3_H
73