i
i
i
i
i
i
i
i
512 19. Building Interactive Graphics Applications
containing GUI elements that affect/echo the entir e a pplication state, TheModel
component, and all the view/controller pairs.
Since Maya is a 3D media creation system, TheModel componentcontains 3D
content information (e.g. scene graph, 3D geometry, material properties, lighting,
camera, animation, etc.). Once again, the rest of the components in the MainUI-
Window are designed to facilitate the user’s view an d to change TheModel. Here
is the functionality of the four view/controller pairs:
• GraphPane. The view component displays the scene graph of the 3D con-
tent; the controller component supports navigating the graph and selecting
scene nodes in the graph.
• CameraPane. The view component renders the scene graph from a cam-
era viewing position; the controller component supports manipulating the
camera view and selecting objects in the scene.
• MaterialPane. The view component displays all the defined materials; the
controller component supports selecting and editing materials.
• OutlinePane. The view component displays all the transform nodes in the
scene; the controller component supports manipulating the transforms (e.g.
create/change parent-child relationships, etc.).
Once again, the coherency among the different view/controller pairs can be main-
tained while servicing the application timer events.
We do not speculate that PowerPoint or Maya is implemented according to
our framework. These are h ighly sophisticated commercial applications and the
underlying implementation is certainly much more complex. However, based on
the knowledge we have gained from this chapter, we can begin to understand how
to approach discussing, designing, and building such interactive graphics appli-
cations. Remember that the important lesson we want to learn from this chapter
is how to organize the func tionality of an interactive graphics application into
components and understand how the components interact so that we can better
understand, maintain, modify, and expand an interactive graphics application.
Notes
I first learned about the model view controller framework and event-driven pro-
gramming from SmallTalk (Goldberg & Robson, 1989) (You may also want to
refer to the SmallTalk web site (http://www.smalltalk.org/main/).) Both Design
Patterns—Elements of Reusable Object-Oriented Design (Gamma et al., 1995)