|
|
I have just recently been looking at the pov source code to get some
ideas for my own raytracer. Anyway, looking through the sor.cpp
source I see the following if at the start of the intersect_sor function...
if (((D[Y] >= 0.0) && (P[Y] > Sor->Height2)) ||
((D[Y] <= 0.0) && (P[Y] < Sor->Height1)) ||
((D[X] >= 0.0) && (P[X] > Sor->Radius2)) ||
((D[X] <= 0.0) && (P[X] < -Sor->Radius2)))
{
return(false);
}
I'm probably missing something, but why isn't there equivalent
lines for the Z coord as for the X? I have put the Z tests into
a test sor.cpp and ran it with the sor1.pov scene example
file, with a camera pos of (60,60,-10), antialias on, 1000x800
res and bounding volumes off. This takes about 1min 28 secs
on my 'puter, but with the Z statements added it takes 1min 26 secs.
Ok, so not much of a speed up, but still, it's a speed up. Why was
the Z tests in this if statement left out when it seems (seems to
me anyway!) that they should be in there?
Anyway, just curious :)
S
Post a reply to this message
|
|