Skip to Content.
Sympa Menu

cgal-discuss - [cgal-discuss] Shouldn't derive from Polyhedron_3

Subject: CGAL users discussion list

List archive

[cgal-discuss] Shouldn't derive from Polyhedron_3


Chronological Thread 
  • From: Zohar <>
  • To:
  • Subject: [cgal-discuss] Shouldn't derive from Polyhedron_3
  • Date: Wed, 10 Jun 2015 08:57:22 -0700 (PDT)


I have a code base that uses a mesh that is derived from Polyhedron_3. The
derivation was done to add methods in the mesh level such as bbox(). It
appears that you shouldn't derive from Polyhedron_3, since packages such as
the simplification package uses template specializations to handle the BGL
interface, and these need to be reproduced in the derived class.

To correct this, one should hold an additional class for these methods.
Unfortunately, it would be too much code to change. Do you have perhaps
other suggestions?

It would help me if similar to the decorated items (vertex, edge, face),
you'll add a general decorator for the mesh. In practice, I would provide in
the Polyhedron_3 object definition a template parameter for a base class it
would derive from (i.e. Polyhedron_3 would derive from my class, instead of
the other way around).



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Shouldn-t-derive-from-Polyhedron-3-tp4660910.html
Sent from the cgal-discuss mailing list archive at Nabble.com.


  • [cgal-discuss] Shouldn't derive from Polyhedron_3, Zohar, 06/10/2015

Archive powered by MHonArc 2.6.18.

Top of Page