Loading [MathJax]/extensions/TeX/newcommand.js
\newcommand{\E}{\mathrm{E}} \newcommand{\A}{\mathrm{A}} \newcommand{\R}{\mathrm{R}} \newcommand{\N}{\mathrm{N}} \newcommand{\Q}{\mathrm{Q}} \newcommand{\Z}{\mathrm{Z}} \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }
CGAL 4.14.3 - 3D Polyhedral Surface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Modules Pages
Polyhedron/polyhedron_prog_color.cpp
#include <CGAL/Simple_cartesian.h>
#include <CGAL/IO/Color.h>
#include <CGAL/Polyhedron_3.h>
// A face type with a color member variable.
template <class Refs>
struct My_face : public CGAL::HalfedgeDS_face_base<Refs> {
CGAL::Color color;
};
// An items type using my face.
struct My_items : public CGAL::Polyhedron_items_3 {
template <class Refs, class Traits>
struct Face_wrapper {
typedef My_face<Refs> Face;
};
};
typedef Polyhedron::Halfedge_handle Halfedge_handle;
int main() {
Polyhedron P;
Halfedge_handle h = P.make_tetrahedron();
h->facet()->color = CGAL::RED;
return 0;
}