Пример #1
0
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);
}
Пример #2
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();
}