kev.cpp

Go to the documentation of this file.
00001 /**
00002  *\file         kev.cpp
00003  *
00004  *\brief        merging edge cycles at 2 neighboring vertices.
00005  *
00006  *              kev(e) is inverse of mev: edge cycle (at tail of e) is merged to that at head of e.
00007  *
00008  *\author       Xianming Chen\n
00009  *              Computer Science Department\n
00010  *              University of Utah
00011  *
00012  *\date         16 Aug 2006\n
00013  *              Copyright (c) 2006, University of Utah
00014  */
00015 
00016 
00017 
00018 #include "print.h"
00019 #include <cassert>
00020 
00021 namespace euler
00022 {
00023   void solid_t :: kev(edge_t* e)
00024   { 
00025     assert(e->l->f != e->o->l->f); 
00026     return _kev(e); 
00027   }            
00028 
00029   void solid_t :: _kev(edge_t* e)
00030   {
00031     assert(e->o);
00032     
00033     edge_t *front = e->o->nxt, *end = e->nxt;
00034     vertex_t *v1 = end->v, *v2 = e->v;
00035 
00036     del_edge_pair(e);
00037 
00038     if(e->o->nxt != e)
00039       if(!front->o)
00040         front->v = front->nxt->v = v1;
00041       else
00042         for(; front != end; front = front->o->nxt)
00043           front->v = v1;
00044 
00045     del_vertex(v2);
00046 
00047     solid_t::assert_consistent_B_rep();
00048   }
00049 
00050   void loop_t :: kev(edge_t* e)              
00051   { 
00052     assert(e->l == e->o->l);
00053     f->s->_kev(e);
00054   }  
00055 
00056 
00057 }//end namespace euler
00058  

Generated on Wed Aug 30 16:27:58 2006 for euler by  doxygen 1.4.6