1 |
+ |
/* RCSid $Id$ */ |
2 |
|
/* |
3 |
|
================================================================== |
4 |
|
Photon map data structures and kd-tree handling |
9 |
|
supported by the Swiss National Science Foundation (SNSF, #147053) |
10 |
|
================================================================== |
11 |
|
|
11 |
– |
$Id$ |
12 |
|
*/ |
13 |
|
|
14 |
|
|
34 |
|
|
35 |
|
/* Primary photon ray for light source contributions */ |
36 |
|
typedef struct { |
37 |
< |
short srcIdx; /* Index of emitting light source */ |
38 |
< |
float dir [3], pos [3]; /* Incident dir & hit point */ |
37 |
> |
int32 srcIdx; /* Index of emitting light source */ |
38 |
> |
int32 dir; /* Encoded ray direction */ |
39 |
> |
float pos [3]; /* Hit point */ |
40 |
|
} PhotonPrimary; |
41 |
|
|
42 |
|
#define photonSrcIdx(pm, p) ((pm) -> primary [(p) -> primary].srcIdx) |