Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Point_3 and Vector_3 from a different library

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Point_3 and Vector_3 from a different library


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Point_3 and Vector_3 from a different library
  • Date: Mon, 26 Mar 2012 22:24:02 +0200

On 03/26/2012 09:31 PM, Tomislav Maric wrote:
Hi everyone,

I went through the MyPoint2 and MyKernel files from the Kernel examples
directory. Also, I've
spent some time reading on the Kernel concept. The thing is, I would like to
use Polyhedron_3
with Point_3 and Vector_3 coming from another library (point and vector
classes). Both of them
conform to the requirements prescribed by the Kernel::Point_3 and
Kernel::Vector_3 concepts(trivial),
and they do not bring any new information (such as color from the above
mentioned example of a 2D
point). Also, I expect them to behave exactly as Point_3 and Vector_3 when it
comes to geometrical
predicates and other function objects (after all, they are just a point and a
vector).


Is it O.K. if I simply typedef the new point/vector type into Kernel::Point_3
and Kernel::Vector_3, after inheriting from a specific Kernel Class, within
my Kernel?

I have tried different things, but I would really appreciate some guidance on
this, as I want to
do things right and there is a lot of information to process...

Thanks,
Tomislav

If you provide a new model for the following concept
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Polyhedron_ref/Concept_PolyhedronTraits_3.html
as first template parameter of te Polyhedron_3 class that should work.

For predicates then this is another story. I think you need to follow
the instructions.

Sebastien.




Archive powered by MHonArc 2.6.16.

Top of Page