Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
BSP index implementation
Please, could someone explain to me how the BSP index of QGraphicsScene works?
Specifically, how is it possible that
itemsreturn a list sorted by z-value? Is it a property of BSP index or are the items explicitly "z-sorted" after a the index narrows down the possible candidates?
Also, if BSP is used with triangles, the slitting plate of a triangle might cut another triangle into halves. QGraphicsScene does not operate over triangles but, I presume, over minimum bounding rectangles. Where does the splitting plane cut through? Is it axis-aligned?
Thanks a lot in advance!
That's the kind of question you should rather ask on the "interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest You'll find there Qt's developers/maintainers (this forum is more user oriented)
Thanks for the hint, I just tried that.
kenchan last edited by
By the way the QGraphicsScene is 2D so the z value is just a way to manipulate the draw order.
Yes, I know and that's exactly my point. Where/when are them items z-sorted? Are they always kept z-sorted? If I change a z-value, is the whole BSP rebuilt?