Hit-testing
Encyclopedia
In computer graphics programming, hit-testing is the process of determining whether a user-controlled cursor (such as a mouse cursor or touch-point on a touch-screen interface) intersects a given shape, line, or curve drawn on the screen. This may be done for movements of the pointer or the underlying shape, or restricted to user-initiated selection, such as a mouse-click.

Hit-testing is important for user interfaces
User interface
The user interface, in the industrial design field of human–machine interaction, is the space where interaction between humans and machines occurs. The goal of interaction between a human and a machine at the user interface is effective operation and control of the machine, and feedback from the...

 and interactivity.

In some graphics languages and graphics textbooks, hit-testing is known as "hit detection", "picking", or "pick correlation" . In Web programming languages such as SVG and CSS
CSS
-Computing:*Cascading Style Sheets, a language used to describe the style of document presentations in web development*Central Structure Store in the PHIGS 3D API*Closed source software, software that is not distributed with source code...

, this is associated with the concept of pointer-events (e.g. user-initiated cursor movement or object selection).

There are many different algorithms that may be used to perform hit-testing, with different performance or accuracy outcomes.

Collision detection
Collision detection
Collision detection typically refers to the computational problem of detecting the intersection of two or more objects. While the topic is most often associated with its use in video games and other physical simulations, it also has applications in robotics...

is a related concept for detecting intersections of two or more different shapes, points, or lines, rather than intersection of one or more shapes with a cursor.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK