Subversion Repositories gelsvn

Rev

Rev 515 | Rev 572 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 515 Rev 518
Line 16... Line 16...
16
{
16
{
17
    using namespace std;
17
    using namespace std;
18
 
18
 
19
    void ConnectivityKernel::cleanup(IDRemap& map)
19
    void ConnectivityKernel::cleanup(IDRemap& map)
20
    {
20
    {
21
        IndexType k = 0;
21
        VertexID::IndexType vid = 0;
22
        for(VertexID v = vertices_begin(); v != vertices_end(); v = vertices_next(v), ++k)
22
        for(VertexID v = vertices_begin(); v != vertices_end(); v = vertices_next(v), ++vid)
23
            map.vmap[v] = VertexID(k);
23
            map.vmap[v] = VertexID(vid);
24
 
24
 
25
        k = 0;
25
        FaceID::IndexType fid = 0;
26
        for(FaceID f = faces_begin(); f != faces_end(); f = faces_next(f), ++k)
26
        for(FaceID f = faces_begin(); f != faces_end(); f = faces_next(f), ++fid)
27
            map.fmap[f] = FaceID(k);
27
            map.fmap[f] = FaceID(fid);
28
 
28
 
29
        k = 0;
29
        HalfEdgeID::IndexType hid = 0;
30
        for(HalfEdgeID h = halfedges_begin(); h != halfedges_end(); h = halfedges_next(h), ++k){
30
        for(HalfEdgeID h = halfedges_begin(); h != halfedges_end(); h = halfedges_next(h), ++hid){
31
            map.hmap[h] = HalfEdgeID(k);
31
            map.hmap[h] = HalfEdgeID(hid);
32
        }
32
        }
33
 
33
 
34
        //2. update the connectivity kernel connectivity with the new locations
34
        //2. update the connectivity kernel connectivity with the new locations
35
        for(VertexID v = vertices_begin(); v != vertices_end(); v = vertices_next(v))
35
        for(VertexID v = vertices_begin(); v != vertices_end(); v = vertices_next(v))
36
            set_out(v, map.hmap[out(v)]);
36
            set_out(v, map.hmap[out(v)]);