Minor update to the graphics town Framework code

by Mike Gleicher on October 21, 2015

So there was another (very minor) change to the graphics town framework code. (the first one was the helicopter)

The change adds 1 important line – when the drawing state is defined, it also sets “camera” to be the camera matrix (the inverse of the view matrix). Of course, you didn’t need this (your objects could have gotten the camera by inverting the view matrix), but since the framework already had it, it’s easier to pass it.

There is a discussion of why this change is valuable on Piazza.

You don’t need to grab the new version – just add the one line in the draw loop (where it says “view:viewM,” add “camera:cameraM,”). The official version also sets this up in the “dummy” drawing state used for init, as well as adds a comment to the definition of drawing state.

Print Friendly, PDF & Email

Previous post:

Next post: