From: Filip Volejnik <f.volejnik@ce...> - 2006-07-20 22:17:06
I've an idea, unfortunately I do not have time to test it:
Get the parent cell the camera is in.
For each plane containing portals,
create a Region, using the portal plane as the splitter
add all the portals the plane contains to the region.
Processing the region should work like this:
get the targeting cells the portals in that region target.
Process the target cell's portals with bounding rectangle
intersection for all the portal boundaries that region has.
Add new regions, containing the planes the previous region had, and
the new one from the portal. (to stop going to wrong directions)
The point is we'll end up having subspaces described by planes, and
we'll process a bunch of portals in one go using the regions.
So instead of having one screen rectangle per cell processing, we'll
have number of those.
Something like this.... I know this is far from being even a sketch
I'll think it up at the weekend