Graphics Reference
In-Depth Information
GUI placeholders. During layout design, we created two GUI placeholder
elements, one for the area of the large drawing area and the other for the
area of the small drawing area. During CTutorialDlg initialization (in
OnInitDialog() ), the WindowHandlers replace themselves onto the cor-
responding areas.
OnTimer . During OnTimer event services, besides calling the model com-
ponent's UpdateSimulation() function, CTutorialDlg must also ensure
that both of the handlers redraw their display.
UWBGL_D3D_Lib3
Change
Summary.
See
The third version of the library also includes the following utilities in the Common
Files folder:
p.
514
for
a
summary
of
changes to the library.
Utility
Function
Files
uwbgl _ Containers.h
UWB_Array
STL Dynamic array
uwbgl _ Utility2.h/.cpp
UWB_RandomNumbers
Randon number
uwbgl _ Clock.h/.cpp
UWB_Clock
Stop watch in msec
uwbgl _ Color1.h/.cpp
UWB_Color
Color
Tutorial 5.5. Application State Complexity
Tutorial 5.5.
Project Name:
D3D _ MultipleBalls
Library Support:
UWBGL _ MFC _ Lib1
UWBGL _ D3D _ Lib3
Goals. Demonstrate working with a more complex model component; un-
derstand that the UpdateSimulation() function can be complex.
Approach. Continue working with Tutorial 5.4. In this tutorial, we allow
the user to work with multiple free-falling balls.
Application specification. With an application similar to that of Tuto-
rial 5.4, our application should support:
- Left mouse button:
* down event—define the center of a new ball;
* drag event—define the radius of the new ball (similar to that of
Tutorial 5.3);
* up event—new ball starts to free fall.
- Right mouse button:
* down event—select the ball under the mouse pointer;
Search WWH ::




Custom Search