Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] 3D Mesh Generation Sphere example - changing radius?

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] 3D Mesh Generation Sphere example - changing radius?


Chronological Thread 
  • From: "Sebastien Loriot (GeometryFactory)" <>
  • To:
  • Subject: Re: [cgal-discuss] 3D Mesh Generation Sphere example - changing radius?
  • Date: Mon, 28 Oct 2013 16:09:38 +0100
  • Organization: GeometryFactory

If you want to hold a state you need to use a functor instead of a function.

Sebastien.

On 10/28/2013 02:43 PM, msmith81 wrote:
thanks for confirming that I do need to modify the sphere_function, but I
tried adding a variable to the sphere_function parameters, as:

FT sphere_function (const Point& p, K::FT squared_radius)
{ return CGAL::squared_distance(p, Point(CGAL::ORIGIN))-squared_radius; }

and it no longer compiled because the Mesh_domain constructor didn't like
the sphere_function any more... I'm confused how to change the radius with a
variable since I'm not actually calling the sphere function myself. How do I
pass a variable to the sphere function to be the radius?




--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/3D-Mesh-Generation-Sphere-example-changing-radius-tp4658300p4658319.html
Sent from the cgal-discuss mailing list archive at Nabble.com.





Archive powered by MHonArc 2.6.18.

Top of Page