Skip to Content.
Sympa Menu

cgal-discuss - Re: Re:Re: [cgal-discuss] Compile errors with lazy_exact_nt.h ??

Subject: CGAL users discussion list

List archive

Re: Re:Re: [cgal-discuss] Compile errors with lazy_exact_nt.h ??


Chronological Thread 
  • From: Peter Hachenberger <>
  • To:
  • Subject: Re: Re:Re: [cgal-discuss] Compile errors with lazy_exact_nt.h ??
  • Date: Mon, 27 Aug 2007 13:34:05 +0200

You should add the GMP support to CGAL. Otherwise, you will have a
problem. As soon as the GMP support is there, you need not to worry
about MP_FLoat any more---Gmpq is used automatically by the kernel.

Use the following includes and typedefs for the Kernel and
Nef_polyhedron_3

#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/Nef_3/SNC_indexed_items.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>

typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Nef_polyhedron_3<Kernel, SNC_indexed_items> Nef_polyhedron_3;

Peter


On Mon, 2007-08-27 at 20:08 +0900, Wonwoo Lee wrote:
> > Your implementation must have been terribly slow.
>
> Yes, mine is very slow if the number of views increases and the shape
> of the silhouette becomes complicated.
> It may not be my intention to use filtering, because I'm not much
> familiar with the kernel things.
> When I wrote the code, I referred your visual hull example and demo
> codes.
>
> Here is the question.
> If I want to compute the exact visual hull from silhouettes,
> How do I have to change my headers and kernels from the current code,
> while preserving the compatibility with CGAL 3.3 ?
>
> And, which header file employs the use of MP_Float ?
>
>
> On Aug 27, 2007, at 5:29 PM, Peter Hachenberger wrote:
>
> > Hi,
> >
> > I'm a bit surprised that you used filtering with Nef_3 in CGAL 3.2.1,
> > because filtering was not supported for Nef_3 in that CGAL version.
> > Your
> > implementation must have been terribly slow.
> >
> > The problem with your program is, that Nef_3 does not work with
> > MP_Float, since it does not support divisions. You must have installed
> > CGAL 3.3 without GMP. If you add GMP support, the Exact_..._kernel
> > uses
> > Gmpq instead of MP_Float and the compilation works.
> >
> > Peter
> >
> > On Mon, 2007-08-27 at 14:11 +0900, Wonwoo Lee wrote:
> >>
> >> Hi, CGAL developers and users.
> >>
> >> I wrote a class which uses Nef_3 boolean operation for the
> >> exact visual hull reconstruction from silhouette images.
> >> My code had no errors with the CGAL 3.2.1, when I built it.
> >>
> >> However, it causes many compile errors with the file
> >> 'lazy_exact_nt.h'
> >> when I try to compile my code
> >> after I updated the CGAL to version 3.3.
> >>
> >> The errors are about the definition of the operator '/', such as :
> >>
> >> c:\program files\cgal-3.3\include\cgal\lazy_exact_nt.h(325) : error
> >> C2784: 'CGAL::Root_of_2<RT_> CGAL::operator /(const
> >> CGAL::Root_of_2<RT_> &,const CGAL::Root_of_2<RT_> &)' : could not
> >> deduce template argument for 'const CGAL::Root_of_2<RT_> &' from
> >> 'CGAL::MP_Float'
> >>
> >> 1>c:\program files\cgal-3.3\include\cgal\lazy_exact_nt.h(325) : error
> >> C2784: 'CGAL::Interval_nt<Protected> CGAL::operator /(double,const
> >> CGAL::Interval_nt<Protected> &)' : could not deduce template argument
> >> for 'const CGAL::Interval_nt<Protected> &' from 'CGAL::MP_Float'
> >>
> >> Actually, I'm not much familar with the way CGAL works.
> >> I referred the demos and examples to develop my code.
> >> Anyone can help me ?
> >>
> >>
> >>
> >> For more information, I listed header files I'm using.
> >>
> >> #include <CGAL/Homogeneous.h>
> >> #include <CGAL/Nef_polyhedron_3.h>
> >> #include <CGAL/IO/Nef_polyhedron_iostream_3.h>
> >> // Headers for Polydedron_3
> >> #include <CGAL/Polyhedron_3.h>
> >> #include <CGAL/IO/Polyhedron_iostream.h>
> >> #include <CGAL/Polyhedron_incremental_builder_3.h>
> >>
> >> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
> >>
> >> // typedefs....
> >> typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
> >>
> >> typedef CGAL::Nef_polyhedron_3<Kernel> Nef_polyhedron_3;
> >>
> >> typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3;
> >> typedef Polyhedron_3::HalfedgeDS HalfedgeDS;
> >> typedef Kernel::Point_3 Point_3;
> >> typedef Kernel::Vector_3 Vector_3 ;
> >> typedef Kernel::Plane_3 Plane_3;
> >> typedef Kernel::Line_3 Line_3 ;
> >>
> >> typedef Nef_polyhedron_3::Aff_transformation_3
> >> Aff_transformation_3 ;
> >>
> >>
> >>
> >>
> > --
> > 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