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: "Tomislav Maric" <>
  • To:
  • Subject: Re: [cgal-discuss] Point_3 and Vector_3 from a different library
  • Date: Mon, 26 Mar 2012 22:44:56 +0200

@Sebastien

Thank you very much for your advice! I've seen the PolyhedronTraits_3 concept
as well, and I was confused by the fact that it provides typedefs of the
stuff one would expect to be defined in the Kernel. This is why I tried
working with the Kernel, because the manual states that it defines the
primitive types and operations on them... I will read a bit more about
PolyhedronTraits_3.. I plan on using either Nef_3 or 3D triangulation later,
hopefully they will swallow "point" and "vector".

@All
Another question: why aren't the predicates/constructions satisfied by the
type restrictions placed on Point_3 and/or Vector_3 provided by a concept of
some kind (my guess would be the Kernel, since it defines both)? This would
make it easy to use such types from other libraries... if they model Point_3
and Vector_3 one to one...


Thanks again,
Tomislav

> ----- Original Message -----
> From: Sebastien Loriot (GeometryFactory)
> Sent: 03/26/12 10:24 PM
> To:
>
> Subject: Re: [cgal-discuss] Point_3 and Vector_3 from a different library
>
> 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.
>
>
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss




Archive powered by MHonArc 2.6.16.

Top of Page