0

I'm using CGAL 2D Delaunay triangulation to define a terrain. I can't use the terrain class because my triangulation has constraints and they can't be used on terrain or 3D triangulations. (That's what I see so far, since there are no terrain properties or 3D triangulation classes). Due to the constraints I'm using the make_conforming_delaunay_2 function to refine the triangulation. I have a problem when using this function. Everything is compiling and running OK, but the problem is with the results:

  1. The function is inserting some points out of any existing triangle face. Is this correct?

  2. Since it is a terrain I need the elevation of these inserted points. Is there any way to make CGAL tell me what triangle face these inserted points are in, so that I could calculate its elevation? I expected the points only in existing triangles faces.

  3. Is there anyway even in a 2d triangulation to use 3D points? (So that the interpolated points will come with the elevation already calculated.)

Ram
  • 3,092
  • 10
  • 40
  • 56
  • Did you try [CGAL::Projection_traits_xy_3](http://doc.cgal.org/latest/Kernel_23/classCGAL_1_1Projection__traits__xy__3.html) like in [this example](http://doc.cgal.org/latest/Triangulation_2/index.html#title14)? – sloriot Sep 01 '15 at 06:00
  • It seems exactly what I´m looking for!!!! I´ll try it. Thank you very much for your help. – Carlos A. Rabelo Sep 02 '15 at 22:54

1 Answers1

0

You can use the class CGAL::Projection_traits_xy_3 like in this example.

sloriot
  • 6,070
  • 18
  • 27