Lecture 1 - Projections and Transformations (slides)

graphics lecture 1 slide 15 simple callback procedure

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: essed. ! •  The operating system informs the application program of events that are relevant to it. ! •  The application program must receive this information in what is sometimes called a callback procedure (or event loop). ! Graphics Lecture 1: Slide 15! Simple callback procedure ! ! while(executing) do { ! !if(menu event) ! ! !ProcessMenuRequest(); ! !if(mouse event) { ! ! !GetMouseCoordinates(); ! ! !GetMouseButtons(); ! ! !PerformMouseProcess(); ! !} ! !if(window resize event) ! ! !RedrawGraphics(); ! }! ! Graphics Lecture 1: Slide 16! Polygon rendering ! •  Many graphics applications use scenes built out of planar polyhedra. ! •  These are three dimensional objects whose faces are all planar polygons (often called faces or facets). ! Graphics Lecture 1: Slide 17! Representing planar polygons ! •  In order to represent planar polygons in the computer we need a mixture of different data:! –  Numerical Data! •  Actual 3D coordinates of vertices, etc.! –  To...
View Full Document

Ask a homework question - tutors are online