Note: in this note I'm discussed one of important question of CG
LOGICAL INPUT DEVICES:
- These are characterized by its high-level interface with the application program rather than by its physical characteristics.
- Consider the following fragment of C code:
int x;
scanf(“%d”,&x);
printf(“%d”,x);
- The measurements that the device returns to the user program
- The time when the device returns those measurements
API defines six classes of logical input devices which are given below:
-
A locator device provides a position in world coordinates to the user program. It is usually implemented by means of pointing devices such as mouse or track ball.
-
3. PICK:
-
A pick device returns the identifier of an object on the display to the user program. It is usually implemented with the same physical device as the locator but has a separate software interface to the user program.
- In OpenGL, we can use a process of selection to accomplish picking.
-
4. CHOICE:
-
A choice device allows the user to select one of a discretenumber of options. In OpenGL, we can use various widgets provided by the window system.
- A widget is a graphical interactive component provided by the window system or a toolkit. The Widgets include menus, scrollbars andgraphical buttons.
For example, a menu with n selections acts as a choice device, allowing user to select one of ‘n’ alternatives.