ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/hd/sm_del.c
(Generate patch)

Comparing ray/src/hd/sm_del.c (file contents):
Revision 3.1 by gwlarson, Wed Aug 19 17:45:24 1998 UTC vs.
Revision 3.2 by gwlarson, Mon Aug 24 12:38:57 1998 UTC

# Line 60 | Line 60 | SM *sm;
60   int t_id;
61   {
62  
63    /* first remove from point location structure */
64    smLocator_remove_tri(sm,t_id);
63  
64    /* NOTE: Assumes that a new triangle adjacent to each vertex
65       has been added- before the deletion: replacing
# Line 142 | Line 140 | int id;
140      while(tlist)
141      {
142          t_id = (int)pop_list(&tlist);
143 +        /* first remove from point location structure */
144 +        smLocator_remove_tri(sm,t_id);
145          smDelete_tri(sm,t_id);
146      }
147      return(elist);
# Line 307 | Line 307 | LIST *plist;
307          v_id2 = E_NTH_VERT(e_id1,1);
308          /* form a triangle for each triple of with v0 as base of star */
309          t_id = smAdd_tri(sm,v_id0,v_id1,v_id2,&tri);
310 +        smLocator_add_tri(sm,t_id,v_id0,v_id1,v_id2);
311          /* add which pointer?*/
312  
313          lptr = LIST_NEXT(lptr);
# Line 447 | Line 448 | smFix_edges(sm)
448      TRI *t0,*t1,*nt0,*nt1;
449      int i,id_v0,id_v1,id_v2,id_p,nid_t0,nid_t1;
450      FVECT v0,v1,v2,p,np,v;
451 <
451 >    LIST *add,*del;
452 >    
453 >    add = del = NULL;
454      FOR_ALL_EDGES(e)
455      {
456          id_t0 = E_NTH_TRI(e,0);
# Line 479 | Line 482 | smFix_edges(sm)
482          VSUB(p,p,SM_VIEW_CENTER(sm));
483          if(point_in_cone(p,v0,v1,v2))
484          {
485 <            smTris_swap_edge(sm,id_t0,id_t1,e0,e1,&nid_t0,&nid_t1);
485 >            smTris_swap_edge(sm,id_t0,id_t1,e0,e1,&nid_t0,&nid_t1,&add,&del);
486              
487              nt0 = SM_NTH_TRI(sm,nid_t0);
488              nt1 = SM_NTH_TRI(sm,nid_t1);
# Line 510 | Line 513 | smFix_edges(sm)
513              SET_E_NTH_TRI(e_new,1,id_t1);
514          }
515      }
516 <
516 >    smUpdate_locator(sm,add,del);
517   }
518  
519   int

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines