Remove ToS2's old IO functions

This commit is contained in:
Mael Rouxel-Labbé 2021-01-28 18:26:03 +01:00
parent ec85832e51
commit f2c844ec51
1 changed files with 0 additions and 96 deletions

View File

@ -278,102 +278,6 @@ public:
bool is_valid(bool verbose = false, int level = 0) const;
bool is_valid_face(Face_handle fh, bool verbose = false, int level = 0) const;
bool is_valid_vertex(Vertex_handle fh, bool verbose = false, int level = 0) const;
template <typename Stream>
Stream& write_vertices(Stream& out, std::vector<Vertex_handle>& t)
{
for(typename std::vector<Vertex_handle>::iterator it=t.begin(); it!=t.end(); ++it)
{
if((*it)->face() == Face_handle())
{
const Point& p = point(*it);
out << p.x() << " " << p.y() << " " << p.z() << std::endl;
}
}
return out;
}
// @todo move this stuff to helper
template <typename Stream>
Stream& write_triangulation_to_off(Stream& out, Stream& out2)
{
// Points of triangulation
for(All_faces_iterator it=tds().face_iterator_base_begin(); it!=all_faces_end(); ++it)
{
if(!it->is_ghost())
write_face_to_off(out, it);
else
write_face_to_off(out2, it);
}
return out;
}
template <typename Stream>
Stream& write_triangulation_to_off(Stream& out)
{
std::vector<Face_handle> faces;
// Points of triangulation
for(All_faces_iterator it=all_faces_begin(); it!=all_faces_end(); ++it)
{
for(int i=0; i<3; ++i)
{
const Point& p = point(it, i);
out << p.x() << " " << p.y() << " " << p.z() << std::endl;
}
}
return out;
}
template <typename Stream >
Stream& write_face_to_off(Stream& out, Face_handle f)
{
for(int i=0; i<3; ++i)
{
const Point& p = point(f, i);
out << p.x() << " " << p.y() << " " << p.z() << std::endl;
}
return out;
}
template <typename Stream, typename FaceIt>
Stream& write_faces_to_off(Stream& out, FaceIt face_begin, FaceIt face_end)
{
FaceIt fit = face_begin;
for(; fit!=face_end; ++fit)
{
for(int i=0; i<3; ++i)
{
const Point& p = point(*fit, i);
out << p.x() << " " << p.y() << " " << p.z() << std::endl;
}
}
return out;
}
template <typename Stream, typename FaceIt>
Stream& write_edges_to_off(Stream& out, FaceIt face_begin, FaceIt face_end)
{
FaceIt fit=face_begin;
for(; fit!=face_end; ++fit)
{
Face_handle f = (*fit).first;
int i = (*fit).second;
const Point& p = point(f->vertex(cw(i)));
const Point& q = point(f->vertex(ccw(i)));
out << p.x() << " " << p.y() << " " << p.z() << std::endl;
out << q.x() << " " << q.y() << " " << q.z() << std::endl;
}
return out;
}
};
// ------------------------ PREDICATES / CONSTRUCTIONS --------------------------------//