c++ - CGAL - wrong vertices index retrieved after Delaunay Triangulation in 3d -


I use the latest CGL (4.5) with VS 2012, after Delaunay triangulation, I complete Tetrahedron trap CAGL Delaunay triangulation Production for "testFile1" with default stream output. Data in "Testfile1" is correct. (I saw the mesh and it is okay)

Then I repeat it through all the tetrahedrons and get the vertical index and output them to "testfile2", but the indices in the index "Testfile1" I have seen the trap and it is completely a mess.

I also produce the top position of each Tetherahren in my own iterations, they are similar with testFile1 (1 coordinate of the first head of Tetrahedron is similar, and so on). So TestFell 1 is similar to testfile 1 and testfile 2, the problem is in getting the top coordinates.

My code:

  std :: vector & lt; Std :: pair & lt; Point, integer & gt; & Gt; V V.reserve (pointCount); // Push the selected point in VA with the information of the index (int i = 0; i & lt; pointcount; i ++) {int id = random numbers [i]; V.push_back (std :: make_pair (point (number [id] ._p [0], number [id] ._p [1], number [id] ._p [2]), i)); } Deluene T; T.Entert (V. Begin (), V. and ()); // Position of the output corner and the vertical index and the cell neighboring index for test data in testfile1 // true std :: ofstream oFileT ("testfile1", std :: ios :: out); Opium T & lt; & Lt; T; // output index to testfile2 by its own repetition std :: ofstream oFileT ("testfile2", std :: ios :: out); Int index = 0; Delaunay :: Finite_cells_iterator This; (This is = T.finite_cells_begin () = it. = T.finite_cells_end (); ++ this) {for (int i = 0; i & lt; 4; i ++) {// coordinate here right float testcore = t Is quaternary (this) .vertex (i) .x (); // Here the index is completely different with the testFile1 int info = 0; If (! TISINFINETT (IT- & gt; Vertex (I)) information = it- & gt; Vertex (I) - & gt; Information (); OFileT & lt; & Lt; Info & lt; & Lt; ""; // indexFile2} oFileT for Output Corner & lt; & Lt; Std :: endl; Index ++; }  

Any ideas?

Update:

Strange matter, for example:

in testFile1: tet index: 702 25 35 153

And my In its iterative, it-> peak (i) -> point (). X synchronization of X () 702 \ 25 \ 35 \ 153 gets but this-> top (I) -> info () 1601 \ 1352 .....

The corner is solved with a Hilbert curve to speed up the construction of the triangle, if you want the frequency of matching the information () field, then just Repeat once again from the corner and set the information ()


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -