Subject: CGAL users discussion list
List archive
- From: Evan Behar <>
- To:
- Subject: Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq
- Date: Sat, 27 Apr 2013 18:05:04 -0400
Ah, thanks. I also forgot to ask the other part of the question, though this helps me get to the point:
Is FT not Lazy_exact_nt< CGAL::Gmpq >? If it is, [1] says that Lazy_exact_nt< CGAL::Gmpq > has .exact() which should be CGAL::Gmpq, which does have .to_double().
[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/NumberTypeSupport_ref/Class_Lazy_exact_nt.html
I want to convert values in my Point_3 to doubles (for rendering, output, etc.), but when I write
p.x().exact().to_double()
or
p.x().to_double() I get the error:
or
p.x().to_double() I get the error:
/home/ebehar/test/test.cpp:14:20: error: ‘const FT’ has no member named ‘exact’
double d = p.x().exact().to_double();
^
/home/ebehar/test/test.cpp:20:22: error: ‘const FT’ has no member named ‘to_double’
d = p.x().to_double();
Is FT not Lazy_exact_nt< CGAL::Gmpq >? If it is, [1] says that Lazy_exact_nt< CGAL::Gmpq > has .exact() which should be CGAL::Gmpq, which does have .to_double().
[1] http://www.cgal.org/Manual/latest/doc_html/cgal_manual/NumberTypeSupport_ref/Class_Lazy_exact_nt.html
On Sat, Apr 27, 2013 at 5:46 PM, Marc Glisse <> wrote:
On Sat, 27 Apr 2013, Evan Behar wrote:Try Kernel::Point_3 instead, that's the proper way to use a traits class.
Hi,
I have the following code:
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Gmpq.h>
#include <CGAL/Lazy_exact_nt.h>
#include <CGAL/Extended_cartesian.h>
typedef CGAL::Extended_cartesian< CGAL::Lazy_exact_nt<CGAL::Gmpq> > Kernel;
typedef CGAL::Point_3<Kernel> Point;
--
int main() {
Point p(1.0f,1.0f,1.0f);
return 0;
}
When I try to compile this program, I get the following error:
In file included from /opt/local/CGAL-4.1/include/CGAL/assertions.h:34:0,
from /opt/local/CGAL-4.1/include/CGAL/basic.h:42,
from /opt/local/CGAL-4.1/include/CGAL/Polyhedron_3.h:24,
from /home/ebehar/test/test.cpp:1:
/opt/local/CGAL-4.1/include/CGAL/Point_3.h: In instantiation of ‘class
CGAL::Point_3<CGAL::Extended_cartesian<CGAL::Lazy_exact_nt<CGAL::Gmpq> > >’:
/home/ebehar/test/test.cpp:12:10: required from here
/opt/local/CGAL-4.1/include/CGAL/assertions.h:124:6: error: invalid
application of ‘sizeof’ to incomplete type
‘boost::STATIC_ASSERTION_FAILURE<false>’
BOOST_STATIC_ASSERT(EX)
^
/opt/local/CGAL-4.1/include/CGAL/Point_3.h:47:3: note: in expansion of macro
‘CGAL_static_assertion’
CGAL_static_assertion((boost::is_same<Self, typename
R_::Point_3>::value));
Is there something additional I have forgotten to do in order to use the
Extended_cartesian kernel with Point_3 or Vector_3?
Thanks,
Evan
Marc Glisse
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://sympa.inria.fr/sympa/info/cgal-discuss
- [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Evan Behar, 04/27/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Marc Glisse, 04/27/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Evan Behar, 04/28/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Marc Glisse, 04/28/2013
- [cgal-discuss] Trouble with instalation of CGAL, Eliseu Castelo Branco Jr, 04/28/2013
- Re: [cgal-discuss] Trouble with instalation of CGAL, Marc Glisse, 04/28/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Evan Behar, 04/28/2013
- [cgal-discuss] Trouble with instalation of CGAL, Eliseu Castelo Branco Jr, 04/28/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Marc Glisse, 04/28/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Evan Behar, 04/28/2013
- Re: [cgal-discuss] Converting FT to double in Extended_cartesian with Gmpq, Marc Glisse, 04/27/2013
Archive powered by MHonArc 2.6.18.