08.01.2015 Views

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

OpenGL viewing notes - Bryn Mawr Computer Science

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Moving the Camera<br />

<br />

We must be careful for two reasons:<br />

<br />

<br />

First, we usually want to define the camera<br />

before we position the objects in the scene.<br />

Second, transformations on the camera may<br />

appear to be backward from what we might<br />

expect.<br />

glMatrixMode(GL_MODELVIEW);<br />

glLoadIdentity( );<br />

glTranslatef(0.0, 0.0, -d);<br />

glRotatef(-90.0, 0.0, 1.0, 0.0)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!