   BSP leaf tree
  Hi, I’m working on a BSP leaf tree so all the polygons have to be in leafs(like in Quake 3) but there is small problem. I created  function that create BSP with sectors, and I tried to change it in to leaf tree by pushing splitting polygon in front node and mark it as used. But this just don’t work correct, sometimes I create node that is not sector and consist only of used polygons ( splitters ). What am I doing wrong?   