Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] Question about CGAL example: mesh_implicit_domains

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] Question about CGAL example: mesh_implicit_domains


Chronological Thread 
  • From: "Laurent Rineau (CGAL/GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] Question about CGAL example: mesh_implicit_domains
  • Date: Fri, 11 Apr 2014 15:23:16 +0200
  • Organization: GeometryFactory

Le Wednesday 09 April 2014 15:28:05 tang a écrit :
> Hi Sebastien,
>
> Thank you very much for your kindly reply. Is there any good method to pass
> double data to this kind of function?

No, you cannot. But you could use a functor, that is a class with operator(),
instead of a function.

class Cube_functor {
public:
Cube_functor(double x0,double y0,double z0,double r0);

double operator()(double x, double y, double z) const;
};

Then you can create a functor object with the right parameters:

Cube_functor my_cube(0.5, 0.5, 0.5, 0.5);

and use it as a function. Mesh_3 implicit domains can deal with a functor.




Archive powered by MHonArc 2.6.18.

Top of Page