CGAL 6.2 - Halfedge Data Structures

Loading...
Searching...
No Matches
HalfedgeDS/hds_prog_edge_iterator.cpp
#include <CGAL/HalfedgeDS_default.h>
#include <CGAL/HalfedgeDS_decorator.h>
#include <CGAL/N_step_adaptor.h>
#include <cassert>
struct Traits { typedef int Point_2; };
typedef CGAL::HalfedgeDS_default<Traits> HDS;
typedef CGAL::HalfedgeDS_decorator<HDS> Decorator;
typedef HDS::Halfedge_iterator Halfedge_iterator;
typedef CGAL::N_step_adaptor< Halfedge_iterator, 2> Iterator;
int main() {
HDS hds;
Decorator decorator(hds);
decorator.create_loop();
decorator.create_segment();
assert( decorator.is_valid());
int n = 0;
for ( Iterator e = hds.halfedges_begin(); e != hds.halfedges_end(); ++e)
++n;
assert( n == 2); // == 2 edges
return 0;
}
CGAL::HalfedgeDS_decorator
The class CGAL::HalfedgeDS_items_decorator<HDS> provides additional functions for vertices,...
Definition: HalfedgeDS_decorator.h:54
CGAL::HalfedgeDS_default
The class HalfedgeDS_default is a model for the HalfedgeDS concept.
Definition: HalfedgeDS_default.h:36
CGAL::N_step_adaptor
Iterator