Revision 07b0ddf9a5bc1cf8638c7c8b376e1d47bb869f28 authored by Andreas Fabri on 13 February 2018, 14:15:38 UTC, committed by Andreas Fabri on 13 February 2018, 14:15:38 UTC
1 parent df2e978
Raw File
hds_prog_graph2.cpp
#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;
}
back to top