731 |
|
} |
732 |
|
|
733 |
|
QUADTREE |
734 |
< |
smPointLocateCell(sm,pt,v0,v1,v2,type,which,norm) |
734 |
> |
smPointLocateCell(sm,pt,type,which,norm) |
735 |
|
SM *sm; |
736 |
< |
FVECT pt,v0,v1,v2; |
736 |
> |
FVECT pt; |
737 |
|
char *type,*which; |
738 |
|
char norm; |
739 |
|
{ |
746 |
|
{ |
747 |
|
point_on_sphere(npt,pt,SM_VIEW_CENTER(sm)); |
748 |
|
|
749 |
< |
qt = stPoint_locate_cell(st,npt,v0,v1,v2,type,which); |
749 |
> |
qt = stPoint_locate_cell(st,npt,type,which); |
750 |
|
} |
751 |
|
else |
752 |
< |
qt = stPoint_locate_cell(st,pt,v0,v1,v2,type,which); |
752 |
> |
qt = stPoint_locate_cell(st,pt,type,which); |
753 |
|
|
754 |
|
return(qt); |
755 |
|
} |
1184 |
|
d = -DOT(b,dir); |
1185 |
|
if(EQUAL_VEC3(orig,SM_VIEW_CENTER(smMesh)) || EQUAL(fabs(d),1.0)) |
1186 |
|
{ |
1187 |
< |
qt = smPointLocateCell(smMesh,dir,v0,v1,v2,NULL,NULL,FALSE); |
1187 |
> |
qt = smPointLocateCell(smMesh,dir,NULL,NULL,FALSE); |
1188 |
|
/* Test triangles in the set for intersection with Ray:returns |
1189 |
|
first found |
1190 |
|
*/ |
1199 |
|
{ |
1200 |
|
/* Starting with orig, Walk along projection of ray onto sphere */ |
1201 |
|
point_on_sphere(r,orig,SM_VIEW_CENTER(smMesh)); |
1202 |
< |
qt = smPointLocateCell(smMesh,r,v0,v1,v2,NULL,NULL,FALSE); |
1202 |
> |
qt = smPointLocateCell(smMesh,r,NULL,NULL,FALSE); |
1203 |
|
qtgetset(t_set,qt); |
1204 |
|
/* os will contain all triangles seen thus far */ |
1205 |
|
setcopy(os,t_set); |
1219 |
|
return(s_id); |
1220 |
|
/* Find next cell that projection of ray intersects */ |
1221 |
|
smTraceRay(smMesh,r,dir,v0,v1,v2,r); |
1222 |
< |
qt = smPointLocateCell(smMesh,r,v0,v1,v2,NULL,NULL,FALSE); |
1222 |
> |
qt = smPointLocateCell(smMesh,r,NULL,NULL,FALSE); |
1223 |
|
qtgetset(t_set,qt); |
1224 |
|
/* Check triangles in set against those seen so far(os):only |
1225 |
|
check new triangles for intersection (t_set') |