Bbox_3 ClippedModel::bb() const { Bbox_3 b; list<Point_2> points = _t.outline(); foreach (const Point_2& p, points) { b.add(_m*to3(p)); // b.add(to3(p)); }
CGAL_BEGIN_NAMESPACE Geomview_stream::Geomview_stream(const Bbox_3 &bbox, const char *machine, const char *login) : bb(bbox), vertex_color(BLACK), edge_color(BLACK), face_color(BLACK), wired_flag(false), echo_flag(true), raw_flag(false), trace_flag(false), binary_flag(false), line_width(1) { setup_geomview(machine, login); frame(bbox); pickplane(bbox); set_vertex_radius((bbox.xmax() - bbox.xmin())/100.0); }
void KnotsViewer::set_scene(Bbox_3 &box) { Mesh::Point bbMin(box.xmin(), box.ymin(), box.zmin()); Mesh::Point bbMax(box.xmax(), box.ymax(), box.zmax()); Mesh::Point center= (bbMin + bbMax)*0.5; double radius=0.5*(bbMin - bbMax).norm(); setSceneCenter(Vec(center[0], center[1], center[2])); setSceneRadius(radius); camera()->showEntireScene(); }
void Geomview_stream::pickplane(const Bbox_3 &bbox) { bool bin_bak = set_binary_mode(); (*this) << "(geometry pickplane {QUAD BINARY\n" << 1 // here are the four corners << bbox.xmin() << bbox.ymin() << bbox.zmin() << bbox.xmin() << bbox.ymax() << bbox.zmin() << bbox.xmax() << bbox.ymax() << bbox.zmin() << bbox.xmax() << bbox.ymin() << bbox.zmin() // close the text bracket << "}) (pickable pickplane no)"; set_ascii_mode(bin_bak); }