Subject: CGAL users discussion list
List archive
- From: Liang <>
- To:
- Subject: [cgal-discuss] How to get a Face_handle pointer from a Polyhedron model?
- Date: Tue, 9 Aug 2011 08:19:50 -0700 (PDT)
Hi all,
Currently I am working on the extension of Polyhedron_3 class. I followed
the example:
===============================================================
#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 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::RED;
return 0;
}
===============================================================
The definition part is basically the same as the example's. But in our
situation, we load a model into a Polyhedron variable from an off. file. I
suppose if I can get the Face_handle pointer from this Polyhedron model,
then I will be able to refer to the added attribute of each face in the
model. The problem is how to get that Face_handle pointer?
Thanks,
Liang
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-to-get-a-Face-handle-pointer-from-a-Polyhedron-model-tp3730281p3730281.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How to get a Face_handle pointer from a Polyhedron model?, Liang, 08/09/2011
- Message not available
- [cgal-discuss] Re: How to get a Face_handle pointer from a Polyhedron model?, Liang, 08/11/2011
- Message not available
Archive powered by MHonArc 2.6.16.