The BSP Tree generator now successfully processes the 'box in a box' model into a bunch of convex subspaces and creates the Portals, intializing their geometry with Big Fat Quads.
I have implemented a full triangle-splitting BSP Tree generator, however I intend to remain true to my original plan.. when the BSP Tree has been generated, I will convert my Triangle structs back into simple references (indices) to original triangles. This will allow me to avoid interpolating vertex components other than position (currently I do bother to interpolate for position, normal, uv) when creating new vertices whenever a visible triangle is split during tree creation, it will also allow me to discard all junk vertices, indices, etc that were produced as a byproduct of full triangle splitting, and go back to the original input geometry only - which is lucky because my mesh class already uploaded that to hardware before I got hold of it, lol.
[subheading]In case of emergency, break glass...[/subheading]
The next step is to Shatter the portals.
As outlined, this involves splitting our Big Fat Quads against all the splitting planes that we used in our tree, and keeping all the output polygons irrespective of what side of a splitting plane they fall on, and even what shape they are.
Since we began with a convex portal geometry, and only bisected it, we know that all the fragments will be convex too.
We also know that they are 'flat' since the portals were originally constructed apon planes.... all the fragments in a given portal will remain coplanar.
The geometric requirements for portals are different for those of the visible triangles we processed thus far.
For this reason, two new classes (Polygon and Portal) have been introduced.
Unless something else blows up, I will post an update of the sourcecode today
Here is a picture of the Box in a Box model for anyone who struggles with visualizing something like that.
A future implementation I'm planning with some of my base libs would try to avoid the splitting, because that's a very nice idea, you know .
Anyway, keep it up, it's getting better by the day!