| 23 |
|
static RREAL Lambfa[5] = {PI, PI, PI, 0.0, 0.0}; |
| 24 |
|
OBJREC Lamb = { |
| 25 |
|
OVOID, MAT_PLASTIC, "Lambertian", |
| 26 |
< |
{0, 5, NULL, Lambfa}, NULL, |
| 26 |
> |
{NULL, Lambfa, 0, 5}, NULL |
| 27 |
|
}; /* a Lambertian surface */ |
| 28 |
|
|
| 29 |
|
OBJREC Aftplane; /* aft clipping plane object */ |
| 93 |
|
colval(ro->cext,RED) : colval(ro->cext,GRN); |
| 94 |
|
if (colval(ro->cext,BLU) < re) re = colval(ro->cext,BLU); |
| 95 |
|
re *= ro->rot; |
| 96 |
< |
if (re > 0.1) |
| 97 |
< |
if (re > 92.) |
| 96 |
> |
if (re > 0.1) { |
| 97 |
> |
if (re > 92.) { |
| 98 |
|
r->rweight = 0.0; |
| 99 |
< |
else |
| 99 |
> |
} else { |
| 100 |
|
r->rweight *= exp(-re); |
| 101 |
+ |
} |
| 102 |
+ |
} |
| 103 |
|
} |
| 104 |
|
rayclear(r); |
| 105 |
|
if (r->rweight <= 0.0) /* check for expiration */ |
| 120 |
|
r->rweight = minweight; |
| 121 |
|
return(0); |
| 122 |
|
} |
| 123 |
< |
return(r->rlvl <= maxdepth && r->rweight >= minweight ? 0 : -1); |
| 123 |
> |
return(r->rlvl <= abs(maxdepth) && r->rweight >= minweight ? 0 : -1); |
| 124 |
|
} |
| 125 |
|
|
| 126 |
|
|