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

Comparing ray/src/cv/bsdfrep.c (file contents):
Revision 2.36 by greg, Wed Nov 17 01:39:04 2021 UTC vs.
Revision 2.37 by greg, Wed Dec 15 01:38:50 2021 UTC

# Line 228 | Line 228 | rotate_rbf(RBFNODE *rbf, const FVECT invec)
228   void
229   ovec_from_pos(FVECT vec, int xpos, int ypos)
230   {
231 <        double  uv[2];
231 >        RREAL   uv[2];
232          double  r2;
233          
234 <        SDsquare2disk(uv, (xpos+.5)/grid_res, (ypos+.5)/grid_res);
234 >        square2disk(uv, (xpos+.5)/grid_res, (ypos+.5)/grid_res);
235                                  /* uniform hemispherical projection */
236          r2 = uv[0]*uv[0] + uv[1]*uv[1];
237          vec[0] = vec[1] = sqrt(2. - r2);
# Line 244 | Line 244 | ovec_from_pos(FVECT vec, int xpos, int ypos)
244   void
245   pos_from_vec(int pos[2], const FVECT vec)
246   {
247 <        double  sq[2];          /* uniform hemispherical projection */
247 >        RREAL   sq[2];          /* uniform hemispherical projection */
248          double  norm = 1./sqrt(1. + fabs(vec[2]));
249  
250 <        SDdisk2square(sq, vec[0]*norm, vec[1]*norm);
250 >        disk2square(sq, vec[0]*norm, vec[1]*norm);
251  
252          pos[0] = (int)(sq[0]*grid_res);
253          pos[1] = (int)(sq[1]*grid_res);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines