Advertisement

OpenGL Best Mouse Picking Technique

Started by February 23, 2021 07:30 AM
12 comments, last by skatehumor 3 years, 11 months ago

skatehumor said:
Does this sound right?

yep. : )

I know you might already be experienced in what you do but I had good results in using an R-Tree for spatial positioning. It is perhaps more costly when something changes but lookup is considered to be faster than QuadTree for example. I use the R-Tree also for picking in my UI framework because it has the benefit to be dynamic, so it's overall bounds change depending on the position and size of nodes it contains in opposite to a QuadTree, which is considered to always have the same bounds

Advertisement

@shaarigan Yup that's essentially what I'm trying to implement, albeit in 3 dimensional space. From what I understand an R-Tree is just a specific kind of BVH that uses axis-aligned rectangles as the bounding volumes, with BVHs being a generalized superset of data structures. I'm trying to implement BVH using AABBs as the bounding volumes, which is not far off from what an R-tree is. As a matter of fact they're almost identical I think.

This topic is closed to new replies.

Advertisement