3D Graphics Programming with QuickDraw 3D
Figure 2-1 An instance of the 3D Viewer displaying three-dimensional data
An instance of the 3D Viewer is a viewer object. Every viewer object is associated with exactly one window, within which the viewer object must be entirely contained. The viewer object can occupy the entire content region of the window, or it can occupy some smaller portion of the window. Your application can create more than one viewer object; indeed, it can create more than one viewer object associated with a single window.
The 3D Viewer is currently available only on the Macintosh Operating System.<8bat>u
When a viewer object is first created and displayed to the user, it consists of a picture area that contains the displayed image and either a controller strip or a badge. The controller strip is a rectangular area at the bottom of the viewer object that contains one or more controls. (See the following section for a complete explanation of these controls.) A badge is a visual element that is displayed in the picture area when the controller strip is not visible. The user can click on the badge to make the controller strip appear.
The part of the window that contains the picture area and the controller strip (if present) is the viewer pane (or viewer frame). In Figure 2-1, the viewer pane entirely fills the window's content region. Alternatively, you can place the viewer pane in part of the window; you would do this to embed a 3D picture in a document window.
It's important to understand that the 3D Viewer is built on top of QuickDraw3D, but you don't need to call any QuickDraw3D functions to use the 3D Viewer. The 3D Viewer is a shared library that is separate from the QuickDraw3D shared library. You can call Q3ViewerNew
(and any other 3D Viewer functions) without having called Q3Initialize
to initialize QuickDraw3D. The models displayed by the Viewer must be structured according to the QuickDraw3D Object Metafile specification, but the metafile data can be stored either in a file or in memory.
Figure 2-2 The controller strip of the 3D Viewer
These controls are, from left to right:
Figure 2-3 A 3D model with a badge
The badge lets the user know that the image represents a 3D model rather
than a static image. A badge appears when the viewer object is first displayed and the kQ3ViewerShowBadge
flag is set in the object's viewer flags. When
the user clicks the badge, the badge disappears and the standard controller strip appears.
Your application can control whether the 3D Viewer displays a badge in a viewer pane by appropriately setting a viewer's flags. See "Viewer Flags" on page 2-12 for more information.
Let us know what you think of these prototype pages.
Generated with Harlequin WebMaker