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

Comparing ray/src/gen/replmarks.c (file contents):
Revision 2.14 by greg, Wed Dec 28 18:35:42 2005 UTC vs.
Revision 2.15 by greg, Fri Jan 25 02:11:13 2008 UTC

# Line 391 | Line 391 | addrot(                /* compute rotation (x,y,z) => (xp,yp,zp) */
391          int     n;
392          double  theta;
393  
394 +        if (yp[2]*yp[2] + zp[2]*zp[2] < 2.*FTINY*FTINY) {
395 +                /* Special case for X' along Z-axis */
396 +                theta = -atan2(yp[0], yp[1]);
397 +                sprintf(xf, " -ry %f -rz %f",
398 +                                xp[2] < 0.0 ? 90.0 : -90.0,
399 +                                theta*(180./PI));
400 +                return(4);
401 +        }
402          n = 0;
403          theta = atan2(yp[2], zp[2]);
404          if (!FEQ(theta,0.0)) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines