The Animator Program

Architecture: How It does It

The Animator program is implemented as a collection of objects. Each object has a particular set of responsibilities.

The application object initializes the OpenGL graphics environment and then enters a loop which drives the program by responding to user input events. User input events are handled by an Input object which dispatches each mouse or keyboard event to the interested subscribers. Drawable objects such as the camera and figure can dynamically subscribe to mouse drags and then unsubscribe when no longer interested.

The drawable objects are drawn by the application in response to user input. As a drawable object is dragged, it calls back to the application object requesting a redraw. This mechanism allows each object to maintain its own state information and only request a redraw of the application when necessary.

Each drawable object also maintains its own 3D input buttons so that it can be selected by an OpenGL selection process. The user picks the camera button if camera placement is desired. The figure manipulation can be turned on and off by pressing the figure button. All of the logic that handles selection and animation of each drawable object is encapsulated within that object.


Table of Contents < Interaction with the Figure: What It Does The Structure of the Figure >

Michael Quinn
University of Minnesota
6/17/2000