11 |
|
supported by the Swiss National Science Foundation (SNSF, #147053) |
12 |
|
================================================================== |
13 |
|
|
14 |
– |
$Id$ |
14 |
|
*/ |
15 |
|
|
16 |
|
|
1250 |
|
if (errno) |
1251 |
|
objerror(mat, WARNING, "compute error"); |
1252 |
|
else { |
1253 |
< |
mat = objptr(mod [pmapRandom(rouletteState) < coef ? 0 : 1]); |
1254 |
< |
photonScatter [mat -> otype] (mat, rayIn); |
1253 |
> |
OBJECT mxMod = mod [pmapRandom(rouletteState) < coef ? 0 : 1]; |
1254 |
> |
|
1255 |
> |
if (mxMod != OVOID) { |
1256 |
> |
mat = objptr(mxMod); |
1257 |
> |
photonScatter [mat -> otype] (mat, rayIn); |
1258 |
> |
} |
1259 |
> |
else { |
1260 |
> |
/* Transfer ray if no modifier */ |
1261 |
> |
RAY rayOut; |
1262 |
> |
|
1263 |
> |
photonRay(rayIn, &rayOut, PMAP_XFER, NULL); |
1264 |
> |
tracePhoton(&rayOut); |
1265 |
> |
} |
1266 |
|
} |
1267 |
|
|
1268 |
|
return 0; |
1314 |
|
if (errno) |
1315 |
|
objerror(mat, WARNING, "compute error"); |
1316 |
|
else { |
1317 |
< |
mat = objptr(mod [pmapRandom(rouletteState) < coef ? 0 : 1]); |
1318 |
< |
photonScatter [mat -> otype] (mat, rayIn); |
1317 |
> |
OBJECT mxMod = mod [pmapRandom(rouletteState) < coef ? 0 : 1]; |
1318 |
> |
|
1319 |
> |
if (mxMod != OVOID) { |
1320 |
> |
mat = objptr(mxMod); |
1321 |
> |
photonScatter [mat -> otype] (mat, rayIn); |
1322 |
> |
} |
1323 |
> |
else { |
1324 |
> |
/* Transfer ray if no modifier */ |
1325 |
> |
RAY rayOut; |
1326 |
> |
|
1327 |
> |
photonRay(rayIn, &rayOut, PMAP_XFER, NULL); |
1328 |
> |
tracePhoton(&rayOut); |
1329 |
> |
} |
1330 |
|
} |
1331 |
|
|
1332 |
|
return 0; |
1365 |
|
if (errno) |
1366 |
|
objerror(mat, WARNING, "compute error"); |
1367 |
|
else { |
1368 |
< |
mat = objptr(mod [pmapRandom(rouletteState) < coef ? 0 : 1]); |
1369 |
< |
photonScatter [mat -> otype] (mat, rayIn); |
1368 |
> |
OBJECT mxMod = mod [pmapRandom(rouletteState) < coef ? 0 : 1]; |
1369 |
> |
|
1370 |
> |
if (mxMod != OVOID) { |
1371 |
> |
mat = objptr(mxMod); |
1372 |
> |
photonScatter [mat -> otype] (mat, rayIn); |
1373 |
> |
} |
1374 |
> |
else { |
1375 |
> |
/* Transfer ray if no modifier */ |
1376 |
> |
RAY rayOut; |
1377 |
> |
|
1378 |
> |
photonRay(rayIn, &rayOut, PMAP_XFER, NULL); |
1379 |
> |
tracePhoton(&rayOut); |
1380 |
> |
} |
1381 |
|
} |
1382 |
|
|
1383 |
|
return 0; |