mirror of
https://github.com/brl/mutter.git
synced 2024-12-25 12:32:05 +00:00
7d25cbe87f
This commit introduces a few important changes in order to acommodate graphene_ray_t. Most of them are positive changes, so don't panic :) The first very visible change is that neither the actor box nor the clip rectangles are projected before being pushed. This required changing the parameters of the related functions at both ClutterPickContext, and ClutterPickStack, to receive boxes instead of vertices. These rectangles are projected on demand now, so in the best case (first actor picked) only one projection happens; and in the worst case, it projects as much as it does now. The second important change is that there are no more checks for axis-alignment anymore. That's because picking now happens in 3D space, using triangles. Talking about triangles in 3D space, this is what is used now for picking. We break down each actor rectangle in 2 triangles, and check if the projected pick point is inside any one of them, of if the ray intersects any one of them. The same check happens for the clip rectangles. Checking the projected pick point is both an optimization for the 2D case, and a workaround to graphene_ray_t problems with float precision, which is specially visible on edges such as the top bar. https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1509 |
||
---|---|---|
.. | ||
clutter | ||
.gitignore | ||
meson.build |