mirror of https://github.com/CGAL/cgal
WIP
This commit is contained in:
parent
8282e7f0ba
commit
dfd5d383fc
|
|
@ -4,8 +4,10 @@
|
|||
#include <CGAL/algorithm.h>
|
||||
#include <CGAL/Timer.h>
|
||||
#include <CGAL/assertions.h>
|
||||
#include <CGAL/NewKernel_d/Wrapper/Point_d.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <iterator>
|
||||
#include <vector>
|
||||
|
||||
|
|
@ -58,5 +60,17 @@ int main(int argc, char **argv)
|
|||
}
|
||||
|
||||
std::cout << c << " points were actually inserted.\n";
|
||||
std::ofstream ofs("/home/gimeno/test.txt");
|
||||
//CGAL::set_binary_mode(ofs);
|
||||
ofs << t;
|
||||
ofs.close();
|
||||
T t2(D);
|
||||
std::ifstream ifs("/home/gimeno/test.txt");
|
||||
//CGAL::set_binary_mode(ifs);
|
||||
ifs >> t2;
|
||||
ifs.close();
|
||||
if(t.number_of_vertices() != t2.number_of_vertices())
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1408,12 +1408,19 @@ operator<<(std::ostream & os, const Triangulation<TT, TDS> & tr)
|
|||
|
||||
// infinite vertex has index 0 (among all the vertices)
|
||||
index_of_vertex[tr.infinite_vertex()] = i++;
|
||||
os << *tr.infinite_vertex() <<"\n";
|
||||
if(is_ascii(os))
|
||||
os << *tr.infinite_vertex() <<"\n";
|
||||
else
|
||||
write(os, *tr.infinite_vertex(), io_Read_write());
|
||||
|
||||
for( Vertex_iterator it = tr.vertices_begin(); it != tr.vertices_end(); ++it )
|
||||
{
|
||||
if( tr.is_infinite(it) )
|
||||
continue;
|
||||
os << *it <<"\n"; // write the vertex
|
||||
if(is_ascii(os))
|
||||
os << *it <<"\n"; // write the vertex
|
||||
else
|
||||
write(os, *it, io_Read_write());
|
||||
index_of_vertex[it] = i++;
|
||||
}
|
||||
CGAL_assertion( i == n+1 );
|
||||
|
|
|
|||
Loading…
Reference in New Issue