|
![](/i/fill.gif) |
You're right, of course. I didn't see the advantage at first. It might have a
drawback, but I'm not sure yet, so I won't discuss this.
The case whether or not a cell contains light sources is already determined with
a simple boolean test; also, I dont't test all 26 adjacent cells, only 13 at the
most (those that have already been processed). The rest are empty anyway.
Btw. I checked out the kd-tree... Not that I'm math-oriented enough to
comprehend the method, but I got the impression that the it is optimal for very
large data sets; I currently have to deal with somewhere around 100-500 points,
so the computational overhead might not be worth it - even if I could implemet
it.
Thanks
Margus
Ron Parker wrote:
>
> Except that the closest point for a face-adjacent cell will always
> have two coordinates the same as the current intersection point, so
> you don't need to use vlength. For the other 20 cells you'd have
> to compute a distance anyway, so you might not save anything unless
> one of those cells has more than one or two light sources in it or
> unless the difference on a single axis is already larger than the
> bound. For example, if you can throw away a face-adjacent cell,
> you can automatically throw away 8 more cells.
Post a reply to this message
|
![](/i/fill.gif) |