File: hds_prog_graph2.cpp

package info (click to toggle)
cgal 3.6.1-2
  • links: PTS
  • area: non-free
  • in suites: squeeze
  • size: 62,184 kB
  • ctags: 95,782
  • sloc: cpp: 453,758; ansic: 96,821; sh: 226; makefile: 120; xml: 2
file content (27 lines) | stat: -rw-r--r-- 877 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <CGAL/HalfedgeDS_min_items.h>
#include <CGAL/HalfedgeDS_default.h>
#include <CGAL/HalfedgeDS_decorator.h>

// An items type using a halfedge with previous-pointer.
struct My_items : public CGAL::HalfedgeDS_min_items {
    template <class Refs, class Traits>
    struct Halfedge_wrapper {
        typedef CGAL::HalfedgeDS_halfedge_base< Refs,
            CGAL::Tag_true,  // previous pointer selected.
            CGAL::Tag_false, // pointer to vertex not selected.
            CGAL::Tag_false  // pointer to face not selected.
        > Halfedge;
    };
};

// no traits needed, argument can be arbitrary dummy.
typedef CGAL::HalfedgeDS_default<int, My_items> HDS;
typedef CGAL::HalfedgeDS_decorator<HDS>        Decorator;

int main() {
    HDS hds;
    Decorator decorator(hds);
    decorator.create_loop();
    CGAL_assertion( decorator.is_valid());
    return 0;
}