Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Learn OpenGL

You're reading from   Learn OpenGL Beginner's guide to 3D rendering and game development with OpenGL and C++

Arrow left icon
Product type Paperback
Published in Aug 2018
Publisher Packt
ISBN-13 9781789340365
Length 208 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Frahaan Hussain Frahaan Hussain
Author Profile Icon Frahaan Hussain
Frahaan Hussain
Arrow right icon
View More author details
Toc

Adding a Camera class to the project

In the previous section, we learned how to add objects to our screen and how to apply texture, transformation and projection to the objects. As we progress ahead in the book, we will add various objects to our screen, but as we add more objects to it and if we wish to view those from different angles, we don't want to have specific code to be able to do that or to move freely around the objects. Therefore, in this chapter, we'll be looking at implementing a Camera class, which will help us to move around our world freely, using the keyboard, and view those objects from different angles. Implementing this class will help us to improvise a walking style of movement and take a look at the virtual world around the player with the help of the mouse. As we learned in the previous chapter, what we've got currently is the single cube...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime