CGAL 5.6.3 - 3D Polyhedral Surface

Loading...
Searching...
No Matches
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::IO::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 CGAL::Simple_cartesian<double> Kernel;
typedef CGAL::Polyhedron_3<Kernel, My_items> Polyhedron;
typedef Polyhedron::Halfedge_handle Halfedge_handle;
int main() {
Polyhedron P;
Halfedge_handle h = P.make_tetrahedron();
h->facet()->color = CGAL::IO::red();
return 0;
}
CGAL::HalfedgeDS_face_base
CGAL::IO::Color
CGAL::Polyhedron_3
A polyhedral surface Polyhedron_3 consists of vertices V, edges E, facets F and an incidence relation...
Definition: Polyhedron_3.h:113
CGAL::Polyhedron_3::make_tetrahedron
Halfedge_handle make_tetrahedron()
a tetrahedron is added to the polyhedral surface.
CGAL::Polyhedron_items_3
The class Polyhedron_items_3 is a model of the PolyhedronItems_3 concept.
Definition: Polyhedron_items_3.h:35
Kernel
CGAL::Simple_cartesian