#include #include #include // A face type with a color member variable. template struct My_face : public CGAL::HalfedgeDS_face_base { CGAL::Color color; My_face() {} My_face( CGAL::Color c) : color(c) {} }; // An items type using my face. struct My_items : public CGAL::HalfedgeDS_items_2 { template struct Face_wrapper { typedef My_face Face; }; }; struct My_traits { // arbitrary point type, not used here. typedef int Point_2; }; typedef CGAL_HALFEDGEDS_DEFAULT HDS; typedef HDS::Face Face; typedef HDS::Face_handle Face_handle; int main() { HDS hds; Face_handle f = hds.faces_push_back( Face( CGAL::RED)); f->color = CGAL::BLUE; CGAL_assertion( f->color == CGAL::BLUE); return 0; }