Time complexity of collision detection

Should collision detection prove to be too slow for your needs, you might also want to look into a technique involving a shader that writes the index associated with specific vertices to a texture. All you need to do then is to iterate over its texels to see which vertices were rendered within a rectangular section of the screen.
In case you’re interested in implementing more sophisticated selection methods like lasso-selection, fence-selection, paint-selection or restricting selection to objects completely enclosed within the selection rectangle, then I can definitely recommend that technique.

You can find a working example in this post. Although that code deals with a point-cloud, the technique is applicable to GeomTriangles as well. The only requirement for your geometry is that its format contains an "index" column.

If this seems useful to you, I’d be happy to provide more info :slight_smile: .