Skip to Main Content
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization
book

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

by Alejandro Terrazas, John Ostuni, Michael Barlow
November 2002
Intermediate to advanced content levelIntermediate to advanced
848 pages
19h 59m
English
Sams
Content preview from Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Picking

Picking is a bread and butter user interface technique for 3D. There are many forms of picking which we will discuss shortly, but the general idea is that picking is the process of selecting an object or polygon with an input device.

A general algorithm for picking is depicted in Figure 12.4, and the steps are as follows:

1.
Convert the mouse click or other input event into the display device coordinates (that is, screen).
2.
Cast a ray from the user's eye position through the display device coordinates.
3.
Convert the ray into the virtual space.
4.
Test for the intersection of any eligible model parts with the ray and report these as picked.
Figure 12.4. Ray casting. The user shoots an arrow from the eye through the screen and ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Reinventing the Organization for GenAI and LLMs

Reinventing the Organization for GenAI and LLMs

Ethan Mollick
JavaFX 9 by Example

JavaFX 9 by Example

Carl Dea, Gerrit Grunwald, José Pereda, Sean Phillips, Mark Heckler

Publisher Resources

ISBN: 0672320940Purchase book