Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Using user defined field Number Type in CGAL

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Using user defined field Number Type in CGAL


Chronological Thread 
  • From: Marc Glisse <>
  • To:
  • Subject: Re: [cgal-discuss] Using user defined field Number Type in CGAL
  • Date: Mon, 7 Mar 2016 19:21:28 +0100 (CET)

On Mon, 7 Mar 2016, Indranil Chowdhury wrote:

Thank you for your suggestion. I tried with Simple_cartesian<myDouble>
but then I got the following error:

Error 1 error C2440: 'return' : cannot convert from
'CGAL::Null_functor::result_type' to 'CGAL::Sign'
E:\AnsysDev\3rdparty\CGAL\CGAL-4.4\include\CGAL\predicates\kernel_ftC2.h
413

Here -> orientationC2(const FT &px, const FT &py,
const FT &qx, const FT &qy,
const FT &rx, const FT &ry)
{
return sign_of_determinant(qx-px, qy-py, rx-px, ry-py);
}

Again I am clueless about what to do next. Did I forget to include any
header file?

Simple_cartesian ( http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Simple__cartesian.html ) takes as argument a FieldNumberType ( http://doc.cgal.org/latest/Algebraic_foundations/classFieldNumberType.html ) which in particular is RealEmbeddable ( http://doc.cgal.org/latest/Algebraic_foundations/classRealEmbeddable.html ) and must therefore specialize CGAL::Real_embeddable_traits ( http://doc.cgal.org/latest/Algebraic_foundations/classCGAL_1_1Real__embeddable__traits.html ). You can look for instance at CGAL/float.h (or any other number type) to see an example of how to teach CGAL about the properties of your number type.

--
Marc Glisse



Archive powered by MHonArc 2.6.18.

Top of Page