I've got a qcanvas with a number of canvasitems moving about on it. I need to efficiently identify which areas of the canvas are empty (ie. don't have any objects on them).

The simplest implementation is to lay down a grid of qpoints on the canvas, and then just check whether there are collisions with each point -- if there are no collisions then that particular point area is empty.

The problem with this is that it's really slow... a 40x40 grid has 1600 points and looping through all of them and calling 'collisions' on each one makes my display slow to a crawl.

Can anyone suggest an efficient way of identifying which points on a grid are clear (don't have collisions above them)?

Thanks for your help....!

Solly

_______________________________________________
PyKDE mailing list    PyKDE@mats.imk.fraunhofer.de
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde

Reply via email to