⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 halfedgeds_items_decorator.h

📁 很多二维 三维几何计算算法 C++ 类库
💻 H
📖 第 1 页 / 共 2 页
字号:
    void    set_vertex_in_vertex_loop( Halfedge_handle h, Vertex_handle v) const {        // loops around the vertex incident to h and sets all vertex        // pointers to v. Precondition: `h != Halfedge_handle()'.        CGAL_precondition( h != Halfedge_handle());        set_vertex_in_vertex_loop( h, v, Supports_halfedge_vertex());    }    void set_face_in_face_loop( Halfedge_handle h, Face_handle f,                                CGAL::Tag_false) const {}    void set_face_in_face_loop( Halfedge_handle h, Face_handle f,                                CGAL::Tag_true) const {        CGAL_assertion_code( size_t termination_count = 0;)        Halfedge_handle end = h;        do {            CGAL_assertion( ++termination_count != 0);            h->HBase::set_face( f);            h = h->next();        } while ( h != end);    }    void set_face_in_face_loop( Halfedge_handle h, Face_handle f) const {        // loops around the face incident to h and sets all face pointers        // to f. Precondition: `h != Halfedge_handle()'.        CGAL_precondition( h != Halfedge_handle());        set_face_in_face_loop( h, f, Supports_halfedge_face());    }    Halfedge_handle flip_edge( Halfedge_handle h) const {        // performs an edge flip, i.e. a Delaunay flip. It returns h after        // rotating the edge h one vertex in the direction of the face        // orientation. Precondition: `h != Halfedge_handle()' and both        // incident faces of h are triangles.        CGAL_precondition( h != Halfedge_handle());        CGAL_precondition( h == h->next()->next()->next());        CGAL_precondition( h->opposite() ==                    h->opposite()->next()->next()->next());        Halfedge_handle hprev = h->next()->next();        Halfedge_handle gprev = h->opposite()->next()->next();        remove_tip( hprev);        remove_tip( gprev);        set_face_halfedge(  hprev);        set_face_halfedge(  gprev);        set_vertex_halfedge( hprev);        set_vertex_halfedge( gprev);        set_face( hprev->next(), hprev->face());        set_face( gprev->next(), gprev->face());        hprev = hprev->next();        gprev = gprev->next();        insert_tip( h, gprev);        insert_tip( h->opposite(), hprev);        CGAL_postcondition( h == h->next()->next()->next());        CGAL_postcondition( h->opposite() ==                     h->opposite()->next()->next()->next());        return h;    }// Implementing These Functions.// ====================================================// Access Functions// ----------------------------------    Halfedge_handle    get_vertex_halfedge( Vertex_handle  ,CGAL::Tag_false) const {        return Halfedge_handle();    }    Halfedge_handle    get_vertex_halfedge( Vertex_handle v,CGAL::Tag_true) const {        return v->halfedge();    }    Vertex_handle get_vertex( Halfedge_handle  , CGAL::Tag_false) const {        return Vertex_handle();    }    Vertex_handle get_vertex( Halfedge_handle h, CGAL::Tag_true)  const {        return h->vertex();    }    Halfedge_handle get_prev( Halfedge_handle  , CGAL::Tag_false) const {        return Halfedge_handle();    }    Halfedge_handle get_prev( Halfedge_handle h, CGAL::Tag_true)  const {        return h->HBase::prev();    }    Halfedge_handle find_prev( Halfedge_handle h, CGAL::Tag_true) const {        return h->HBase::prev();    }    Halfedge_handle find_prev( Halfedge_handle h, CGAL::Tag_false) const {        Halfedge_handle g = h;        while ( g->next() != h)            g = g->next();        return g;    }    Halfedge_handle find_prev_around_vertex( Halfedge_handle h,                                             CGAL::Tag_true) const {        return h->HBase::prev();    }    Halfedge_handle find_prev_around_vertex( Halfedge_handle h,                                             CGAL::Tag_false) const {        Halfedge_handle g = h->opposite();        while ( g->next() != h)            g = g->next()->opposite();        return g;    }    Face_handle get_face( Halfedge_handle  , CGAL::Tag_false) const {        return Face_handle();    }    Face_handle get_face( Halfedge_handle h, CGAL::Tag_true)  const {        return h->face();    }    Halfedge_handle get_face_halfedge( Face_handle  ,                                       CGAL::Tag_false) const {        return Halfedge_handle();    }    Halfedge_handle get_face_halfedge( Face_handle f,                                       CGAL::Tag_true) const {        return f->halfedge();    }// Const Access Functions// ----------------------------------    Halfedge_const_handle    get_vertex_halfedge( Vertex_const_handle  ,CGAL::Tag_false) const {        return Halfedge_const_handle();    }    Halfedge_const_handle    get_vertex_halfedge( Vertex_const_handle v,CGAL::Tag_true) const {        return v->halfedge();    }    Vertex_const_handle    get_vertex( Halfedge_const_handle  , CGAL::Tag_false) const {        return Vertex_const_handle();    }    Vertex_const_handle    get_vertex( Halfedge_const_handle h, CGAL::Tag_true)  const {        return h->vertex();    }    Halfedge_const_handle    get_prev( Halfedge_const_handle  , CGAL::Tag_false) const {        return Halfedge_const_handle();    }    Halfedge_const_handle    get_prev( Halfedge_const_handle h, CGAL::Tag_true)  const {        return h->HBase::prev();    }    Halfedge_const_handle    find_prev( Halfedge_const_handle h, CGAL::Tag_true) const {        return h->HBase::prev();    }    Halfedge_const_handle    find_prev( Halfedge_const_handle h, CGAL::Tag_false) const {        Halfedge_const_handle g = h;        while ( g->next() != h)            g = g->next();        return g;    }    Halfedge_const_handle    find_prev_around_vertex( Halfedge_const_handle h, CGAL::Tag_true) const {        return h->HBase::prev();    }    Halfedge_const_handle    find_prev_around_vertex( Halfedge_const_handle h, CGAL::Tag_false) const {        Halfedge_const_handle g = h->opposite();        while ( g->next() != h)            g = g->next()->opposite();        return g;    }    Face_const_handle    get_face( Halfedge_const_handle  , CGAL::Tag_false) const {        return Face_const_handle();    }    Face_const_handle    get_face( Halfedge_const_handle h, CGAL::Tag_true)  const {        return h->face();    }    Halfedge_const_handle    get_face_halfedge( Face_const_handle  , CGAL::Tag_false) const {        return Halfedge_const_handle();    }    Halfedge_const_handle    get_face_halfedge( Face_const_handle f, CGAL::Tag_true) const {        return f->halfedge();    }// Modifying Function Primitives// ----------------------------------    void set_vertex_halfedge( Vertex_handle,                              Halfedge_handle,                              CGAL::Tag_false) const {}    void set_vertex_halfedge( Vertex_handle v,                              Halfedge_handle g,                              CGAL::Tag_true)  const {        v->VBase::set_halfedge(g);    }    void set_vertex_halfedge( Halfedge_handle,                              Halfedge_handle,                              CGAL::Tag_false) const {}    void set_vertex_halfedge( Halfedge_handle h,                              Halfedge_handle g,                              CGAL::Tag_true) const {        set_vertex_halfedge( h->vertex(), g);    }    void set_vertex( Halfedge_handle,                     Vertex_handle,                     CGAL::Tag_false) const {}    void set_vertex( Halfedge_handle h,                     Vertex_handle v,                     CGAL::Tag_true)  const {        h->HBase::set_vertex(v);    }    void set_prev( Halfedge_handle,                   Halfedge_handle,                   CGAL::Tag_false) const {}    void set_prev( Halfedge_handle h,                   Halfedge_handle g,                   CGAL::Tag_true)  const {        h->HBase::set_prev( g);    }    void set_face( Halfedge_handle,                   Face_handle,                   CGAL::Tag_false) const {}    void set_face( Halfedge_handle h,                   Face_handle f,                   CGAL::Tag_true)  const {        h->HBase::set_face(f);    }    void set_face_halfedge( Face_handle,                            Halfedge_handle,                            CGAL::Tag_false) const {}    void set_face_halfedge( Face_handle f,                            Halfedge_handle g,                            CGAL::Tag_true)  const {        f->FBase::set_halfedge(g);    }    void set_face_halfedge( Halfedge_handle,                            Halfedge_handle,                            CGAL::Tag_false) const {}    void set_face_halfedge( Halfedge_handle h,                            Halfedge_handle g,                            CGAL::Tag_true) const {        set_face_halfedge( h->face(), g);    }};CGAL_END_NAMESPACE#endif // CGAL_HALFEDGEDS_ITEMS_DECORATOR_H //

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -