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

Comparing ray/src/hd/sm_stree.c (file contents):
Revision 3.1 by gwlarson, Wed Aug 19 17:45:24 1998 UTC vs.
Revision 3.2 by gwlarson, Thu Aug 20 16:47:22 1998 UTC

# Line 110 | Line 110 | stPoint_locate(st,npt,type,which)
110      QUADTREE *rootptr,qt;
111      FVECT v1,v2,v3;
112      OBJECT os[MAXSET+1],*optr;
113    FVECT p0,p1,p2;
113      char w;
114 <    
114 >    FVECT p0,p1,p2;
115 >
116      /* Test each of the root triangles against point id */
117      for(i=0; i < 4; i++)
118       {
119           rootptr = ST_NTH_ROOT_PTR(st,i);
120           stNth_base_verts(st,i,v1,v2,v3);
121           /* Return tri that p falls in */
122 <         qt = qtPoint_locate(rootptr,v1,v2,v3,npt,type,which,p0,p1,p2);
122 >         qt = qtRoot_point_locate(rootptr,v1,v2,v3,npt,type,which);
123           if(QT_IS_EMPTY(qt))
124              continue;
125           /* Get the set */
# Line 148 | Line 148 | stPoint_locate(st,npt,type,which)
148   }
149  
150   int
151 < stPoint_locate_cell(st,p,p0,p1,p2,type,which)
151 > stPoint_locate_cell(st,p,type,which)
152      STREE *st;
153 <    FVECT p,p0,p1,p2;
153 >    FVECT p;
154      char *type,*which;
155   {
156      int i,d;
# Line 164 | Line 164 | stPoint_locate_cell(st,p,p0,p1,p2,type,which)
164           rootptr = ST_NTH_ROOT_PTR(st,i);
165           stNth_base_verts(st,i,v0,v1,v2);
166           /* Return tri that p falls in */
167 <         qt = qtPoint_locate(rootptr,v0,v1,v2,p,type,which,p0,p1,p2);
167 >         qt = qtRoot_point_locate(rootptr,v0,v1,v2,p,type,which);
168           /* NOTE: For now return only one triangle */
169           if(!QT_IS_EMPTY(qt))
170              return(qt);
# Line 177 | Line 177 | stPoint_locate_cell(st,p,p0,p1,p2,type,which)
177   }
178  
179   int
180 < stAdd_tri(st,id,v1,v2,v3)
180 > stAdd_tri(st,id,v0,v1,v2)
181   STREE *st;
182   int id;
183 < FVECT v1,v2,v3;
183 > FVECT v0,v1,v2;
184   {
185    
186    int i,found;
187    QUADTREE *rootptr;
188 <  FVECT t1,t2,t3;
189 <  
188 >  FVECT t0,t1,t2;
189 >
190    found = 0;
191    for(i=0; i < 4; i++)
192    {
193      rootptr = ST_NTH_ROOT_PTR(st,i);
194 <    stNth_base_verts(st,i,t1,t2,t3);
195 <    found |= qtAdd_tri(rootptr,id,v1,v2,v3,t1,t2,t3,0);
194 >    stNth_base_verts(st,i,t0,t1,t2);
195 >    found |= qtAdd_tri(rootptr,id,v0,v1,v2,t0,t1,t2,0);
196    }
197    return(found);
198   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines