5.A] Explain in detail the logical classification of input devices
Answer:
From the perspective of logical devices, inputs originate from within the application program.
The two main characteristics that describe the logical behavior of input devices are:
- The measurements returned by the device to the user program
- The timing of when these measurements are returned
The API defines six classes of logical input devices as follows:
- STRING: This logical device provides ASCII values of input characters to the user program, typically implemented via a physical keyboard.
- LOCATOR: A locator device supplies a position in world coordinates to the user program, usually implemented with pointing devices such as a mouse or trackball.
- PICK: A pick device returns the identifier of an object on the display to the user program. It is generally implemented with the same physical device as the locator but features a separate software interface. In OpenGL, picking can be accomplished through a selection process.
- CHOICE: A choice device enables the user to select from a discrete number of options. In OpenGL, this can be achieved using various widgets provided by the window system. Widgets are graphical interactive components, such as menus, scrollbars, and buttons. For instance, a menu with multiple selections functions as a choice device, allowing the user to pick from ‘n’ alternatives.
- VALUATORS: These devices provide analog input to the user program. Graphical systems may use boxes or dials for this purpose.
- STROKE: A stroke device returns an array of locations. For example, pressing a mouse button initiates data transfer into a specified array, and releasing the button concludes this transfer.