mirror of https://github.com/CGAL/cgal
update polyline writing functions
This commit is contained in:
parent
5a0044c917
commit
0b362d2d69
|
|
@ -1401,15 +1401,8 @@ private: // functions :
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// \cond SKIP_IN_MANUAL
|
/// \cond SKIP_IN_MANUAL
|
||||||
void dump_to_polylines(std::ostream& os) const {
|
template <class K>
|
||||||
for (const auto n: traverse<Orthtrees::Preorder_traversal>())
|
void dump_box_to_polylines(const Iso_rectangle_2<K>& box, std::ostream& os) const {
|
||||||
if (is_leaf(n)) {
|
|
||||||
Bbox box = bbox(n);
|
|
||||||
dump_box_to_polylines(box, os);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void dump_box_to_polylines(const Bbox_2& box, std::ostream& os) const {
|
|
||||||
// dump in 3D for visualisation
|
// dump in 3D for visualisation
|
||||||
os << "5 "
|
os << "5 "
|
||||||
<< box.xmin() << " " << box.ymin() << " 0 "
|
<< box.xmin() << " " << box.ymin() << " 0 "
|
||||||
|
|
@ -1419,7 +1412,8 @@ public:
|
||||||
<< box.xmin() << " " << box.ymin() << " 0" << std::endl;
|
<< box.xmin() << " " << box.ymin() << " 0" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_box_to_polylines(const Bbox_3& box, std::ostream& os) const {
|
template <class K>
|
||||||
|
void dump_box_to_polylines(const Iso_cuboid_3<K>& box, std::ostream& os) const {
|
||||||
// Back face
|
// Back face
|
||||||
os << "5 "
|
os << "5 "
|
||||||
<< box.xmin() << " " << box.ymin() << " " << box.zmin() << " "
|
<< box.xmin() << " " << box.ymin() << " " << box.zmin() << " "
|
||||||
|
|
@ -1451,6 +1445,14 @@ public:
|
||||||
<< box.xmax() << " " << box.ymax() << " " << box.zmax() << std::endl;
|
<< box.xmax() << " " << box.ymax() << " " << box.zmax() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void dump_to_polylines(std::ostream& os) const {
|
||||||
|
for (Node_index n: traverse(Orthtrees::Preorder_traversal<Self>(*this)))
|
||||||
|
if (is_leaf(n)) {
|
||||||
|
Bbox box = bbox(n);
|
||||||
|
dump_box_to_polylines(box, os);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
std::string to_string(Node_index node) {
|
std::string to_string(Node_index node) {
|
||||||
std::stringstream stream;
|
std::stringstream stream;
|
||||||
internal::print_orthtree_node(stream, node, *this);
|
internal::print_orthtree_node(stream, node, *this);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue