Hi ,
Following is the source code which I use to split a polygon by a plane. Sometimes the polygons that are split are not correct and I can't seem to understand why. The source code is a pascal code found on Delphi3d.net web site which I changed to suit my needs. Please help me in fixing this.
If I traverse the polygon list to find the best node (that leads to less splits of polygon) rather than using the first polygon/plane of my list as the split plane, then my BSP works good, but it takes enormous time to calculate.