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.27 by greg, Fri Aug 22 05:38:44 2014 UTC vs.
Revision 2.28 by greg, Thu May 28 15:46:28 2015 UTC

# Line 50 | Line 50 | double                 theta_in_deg, phi_in_deg;
50   int
51   new_input_direction(double new_theta, double new_phi)
52   {
53        if (!input_orient)              /* check input orientation */
54                input_orient = 1 - 2*(new_theta > 90.);
55        else if (input_orient > 0 ^ new_theta < 90.) {
56                fprintf(stderr,
57                "%s: Cannot handle input angles on both sides of surface\n",
58                                progname);
59                return(0);
60        }
53                                          /* normalize angle ranges */
54          while (new_theta < -180.)
55                  new_theta += 360.;
# Line 67 | Line 59 | new_input_direction(double new_theta, double new_phi)
59                  new_theta = -new_theta;
60                  new_phi += 180.;
61          }
70        if ((theta_in_deg = new_theta) < 1.0)
71                return(1);              /* don't rely on phi near normal */
62          while (new_phi < 0)
63                  new_phi += 360.;
64          while (new_phi >= 360.)
65                  new_phi -= 360.;
66 +                                        /* check input orientation */
67 +        if (!input_orient)
68 +                input_orient = 1 - 2*(new_theta > 90.);
69 +        else if (input_orient > 0 ^ new_theta < 90.) {
70 +                fprintf(stderr,
71 +                "%s: Cannot handle input angles on both sides of surface\n",
72 +                                progname);
73 +                return(0);
74 +        }
75 +        if ((theta_in_deg = new_theta) < 1.0)
76 +                return(1);              /* don't rely on phi near normal */
77          if (single_plane_incident > 0)  /* check input coverage */
78                  single_plane_incident = (round(new_phi) == round(phi_in_deg));
79          else if (single_plane_incident < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines