Subject: CGAL users discussion list
List archive
- From: Youssef ALJ <>
- To: <>
- Subject: [cgal-discuss] Display selected faces of polyhedra
- Date: Mon, 21 Jun 2010 18:58:05 +0200
- Importance: Normal
Hi, I'd like to know if it is possible to display a face color and how using the example provided by CGAL: #include <CGAL/Simple_cartesian.h> #include <CGAL/IO/Color.h> #include <CGAL/Polyhederon.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 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( Point( 1, 0, 0), Point( 0, 0, 1), Point( 0, 0, 0), Point( 0, 1, 0)); h->facet()->color = CGAL::RED; // How to display this face with red color return 0; } Can we visualize this polyhedron using geomview, such as all faces are in the default color and one facet has red color for example? Thanks, Youssef ALJ Hotmail: Trusted email with Microsoft’s powerful SPAM protection. Sign up now. |
- [cgal-discuss] 3D multi-domain meshes, Noura, 06/21/2010
- [cgal-discuss] Display selected faces of polyhedra, Youssef ALJ, 06/21/2010
- Re: [cgal-discuss] 3D multi-domain meshes, Mariette Yvinec, 06/22/2010
Archive powered by MHonArc 2.6.16.