interaction

interaction - CS148 Introduction to Computer Graphics and...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon
Page 1 CS148: Introduction to Computer Graphics and Imaging Interactive Techniques Ben Fry’s Zipdecode http://acg.media.mit.edu/people/fry/zipdecode/
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Page 2 CS148 Lecture 6 Pat Hanrahan, Winter 2009 Topics Responding to Input Polling vs. interrupts Event queues Building UI idioms Picking Clicking Dragging Game interaction idioms Game input loop 3 rd -person character control CS148 Lecture 6 Pat Hanrahan, Winter 2009 Polling and Interrupts Polling - Periodically read the state of the device Mouse sends messages 100 times per second State of the buttons Relative motion of the mouse ( Δ x, Δ y) Joystick/Gamepad interface glutJoyStick( int buttonmask, int x, int y, int z ) STJoystick supports multiple joysticks, axes, balls, hats, and buttons Interrupts - Send changes when they occur Keyboard sends “make” and “break” messages
Background image of page 2
Page 3 CS148 Lecture 6 Pat Hanrahan, Winter 2009 Event Queue Operating system responds to interrupt
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 4
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/12/2010.

Page1 / 10

interaction - CS148 Introduction to Computer Graphics and...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online