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

Comparing ray/src/common/cone.c (file contents):
Revision 2.8 by schorsch, Thu Jun 26 00:58:09 2003 UTC vs.
Revision 2.9 by schorsch, Sun Jul 27 22:12:01 2003 UTC

# Line 56 | Line 56 | int  getxf;
56  
57                  co->ca = o->oargs.farg;
58                                                  /* get radii */
59 <                if (o->otype == OBJ_CYLINDER | o->otype == OBJ_TUBE) {
59 >                if ((o->otype == OBJ_CYLINDER) | (o->otype == OBJ_TUBE)) {
60                          if (o->oargs.nfargs != 7)
61                                  goto argcerr;
62                          if (co->ca[6] < -FTINY) {
# Line 79 | Line 79 | int  getxf;
79                          else sgn1 = 0;
80                          if (sgn0+sgn1 == 0)
81                                  goto raderr;
82 <                        if (sgn0 < 0 | sgn1 < 0) {
82 >                        if ((sgn0 < 0) | (sgn1 < 0)) {
83                                  objerror(o, o->otype==OBJ_RING?USER:WARNING,
84                                          "negative radii");
85                                  o->otype = o->otype == OBJ_CONE ?
# Line 126 | Line 126 | int  getxf;
126                  if (o->otype == OBJ_RING) {
127                          co->al = 0.0;
128                          co->sl = CO_R1(co) - CO_R0(co);
129 <                } else if (o->otype == OBJ_CONE | o->otype == OBJ_CUP) {
129 >                } else if ((o->otype == OBJ_CONE) | (o->otype == OBJ_CUP)) {
130                          co->sl = co->ca[7] - co->ca[6];
131                          co->sl = sqrt(co->sl*co->sl + co->al*co->al);
132                  } else { /* OBJ_CYLINDER or OBJ_TUBE */
# Line 206 | Line 206 | register CONE  *co;
206          multmat4(co->tm, co->tm, m4);
207  
208                                  /* scale z-axis */
209 <        if (co->p0 != co->p1 & co->r0 != co->r1) {
209 >        if ((co->p0 != co->p1) & (co->r0 != co->r1)) {
210                  setident4(m4);
211                  m4[2][2] = (CO_R1(co) - CO_R0(co)) / co->al;
212                  multmat4(co->tm, co->tm, m4);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines