The class Polyhedron_items_3
is a model of the PolyhedronItems_3
concept.
It provides definitions for vertices with points, halfedges, and faces with plane equations. The polyhedron traits class must provide the respective types for the point and the plane equation. Vertices and facets both contain a halfedge handle to an incident halfedge.
- Is model of
PolyhedronItems_3
- See also
CGAL::Polyhedron_3<Traits>
-
CGAL::Polyhedron_min_items_3
-
CGAL::HalfedgeDS_min_items
-
CGAL::HalfedgeDS_items_2
Example
The following example program defines a new face class based on the CGAL::HalfedgeDS_face_base
and adds a new color member variable. The new face class is used to replace the face definition in the CGAL::Polyhedron_items_3
class. The main function illustrates the access to the new member variable. See also the PolyhedronItems_3
concept for another illustrative example.
File Polyhedron/polyhedron_prog_color.cpp
#include <CGAL/Simple_cartesian.h>
#include <CGAL/IO/Color.h>
#include <CGAL/Polyhedron_3.h>
template <class Refs>
struct My_face : public CGAL::HalfedgeDS_face_base<Refs> {
CGAL::IO::Color color;
};
template <class Refs, class Traits>
struct Face_wrapper {
typedef My_face<Refs> Face;
};
};
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Polyhedron::Halfedge_handle Halfedge_handle;
int main() {
Polyhedron P;
h->facet()->color = CGAL::IO::red();
return 0;
}
A polyhedral surface Polyhedron_3 consists of vertices V, edges E, facets F and an incidence relation...
Definition Polyhedron_3.h:113
Halfedge_handle make_tetrahedron()
a tetrahedron is added to the polyhedral surface.
The class Polyhedron_items_3 is a model of the PolyhedronItems_3 concept.
Definition Polyhedron_items_3.h:35
- Examples
- Polyhedron/polyhedron_prog_color.cpp, and Polyhedron/polyhedron_prog_vector.cpp.