568 |
|
/* If the set size is below expansion threshold,or at maximum |
569 |
|
number of quadtree levels : just add */ |
570 |
|
optr = qtqueryset(qt); |
571 |
< |
if(QT_SET_CNT(optr) < QT_SET_THRESHOLD || (n >= QT_MAX_LEVELS)) |
571 |
> |
if(QT_SET_CNT(optr) < QT_SET_THRESHOLD || (n > (QT_MAX_LEVELS-2))) |
572 |
|
return(qtadduelem(qt,t_id)); |
573 |
|
/* otherwise: expand node- and insert tri, and reinsert existing tris |
574 |
|
in set to children of new node |
769 |
|
!T_IS_VALID(SM_NTH_TRI(sm,T_NTH_NBR(tb,1))) || |
770 |
|
!T_IS_VALID(SM_NTH_TRI(sm,T_NTH_NBR(tb,2)))) |
771 |
|
goto Ltri_error; |
772 |
+ |
/* |
773 |
|
if(SM_NTH_TRI(sm,T_NTH_NBR(ta,0))==SM_NTH_TRI(sm,T_NTH_NBR(ta,1)) || |
774 |
|
SM_NTH_TRI(sm,T_NTH_NBR(ta,0))==SM_NTH_TRI(sm,T_NTH_NBR(ta,2)) || |
775 |
|
SM_NTH_TRI(sm,T_NTH_NBR(ta,1))==SM_NTH_TRI(sm,T_NTH_NBR(ta,2)) || |
777 |
|
SM_NTH_TRI(sm,T_NTH_NBR(tb,0))==SM_NTH_TRI(sm,T_NTH_NBR(tb,2)) || |
778 |
|
SM_NTH_TRI(sm,T_NTH_NBR(tb,1))==SM_NTH_TRI(sm,T_NTH_NBR(tb,2)) ) |
779 |
|
goto Ltri_error; |
780 |
+ |
*/ |
781 |
|
#endif |
782 |
|
/* Reset neighbor pointers of original neighbors */ |
783 |
|
n = SM_NTH_TRI(sm,T_NTH_NBR(t,enext)); |