9 |
|
|
10 |
|
Roland Schregle (roland.schregle@{hslu.ch, gmail.com}) |
11 |
|
(c) Fraunhofer Institute for Solar Energy Systems, |
12 |
+ |
supported by the German Research Foundation |
13 |
+ |
(DFG LU-204/10-2, "Fassadenintegrierte Regelsysteme FARESYS") |
14 |
|
(c) Lucerne University of Applied Sciences and Arts, |
15 |
< |
supported by the Swiss National Science Foundation (SNSF, #147053) |
15 |
> |
supported by the Swiss National Science Foundation |
16 |
> |
(SNSF #147053, "Daylight Redirecting Components") |
17 |
|
====================================================================== |
18 |
|
|
19 |
|
$Id$ |
28 |
|
#include "pmapbias.h" |
29 |
|
#include "pmapdiag.h" |
30 |
|
#include "otypes.h" |
31 |
+ |
#include "otspecial.h" |
32 |
|
#include <time.h> |
33 |
|
#if NIX |
34 |
|
#include <sys/stat.h> |
173 |
|
if (localhit(ray, &thescene)) { |
174 |
|
mod = ray -> ro -> omod; |
175 |
|
|
176 |
< |
if (port && ray -> ro != port) { |
176 |
> |
/* XXX: Is port -> omod != mod sufficient here? Probably not... */ |
177 |
> |
if ( |
178 |
> |
port && ray -> ro != port && |
179 |
> |
findmaterial(port) != findmaterial(ray -> ro) |
180 |
> |
) { |
181 |
|
/* !!! PHOTON PORT REJECTION SAMPLING HACK !!! |
182 |
< |
* Terminate photon if emitted from port without intersecting it; |
183 |
< |
* this can happen when the port's partitions extend beyond its |
182 |
> |
* Terminate photon if emitted from port without intersecting it or |
183 |
> |
* its other associated surfaces or same material. |
184 |
> |
* This can happen when the port's partitions extend beyond its |
185 |
|
* actual geometry, e.g. with polygons. Since the total flux |
186 |
|
* relayed by the port is based on the (in this case) larger |
187 |
|
* partition area, it is overestimated; terminating these photons |