Reader small image

You're reading from  Game Physics Cookbook

Product typeBook
Published inMar 2017
Reading LevelIntermediate
PublisherPackt
ISBN-139781787123663
Edition1st Edition
Languages
Tools
Concepts
Right arrow
Author (1)
Gabor Szauer
Gabor Szauer
author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer

Right arrow

View matrix


The LookAt function is mainly used for 3D graphics. It is a convenient way to position a 3D camera. While graphics programming is outside the scope of this book, for our math library to be practical we need to implement some graphics-related functionality.

Getting a vertex (vector) to become a pixel primarily involves three matrix transformations. The world transform, view transform, and projection transform. All three of these transformations are expressed as a matrix multiplication.

  • The world transform takes the vertex from model space to world space, we've already implemented this as the Transform function

  • The view transform takes a vertex from world space and transforms it to eye space, sometimes called view space or camera space

  • The projection transform takes vertices from eye space and puts them into normalized device coordinates

If we multiply a vertex by the view matrix, the vertex ends up in eye space. Eye space transforms the vertex in the world so it's relative to a camera...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Game Physics Cookbook
Published in: Mar 2017Publisher: PacktISBN-13: 9781787123663

Author (1)

author image
Gabor Szauer

Gabor Szauer has been making games since 2010. He graduated from Full Sail University in 2010 with a bachelor's degree in game development. Gabor maintains an active Twitter presence, and maintains a programming-oriented game development blog. Gabor's previously published books are Game Physics Programming Cookbook and Lua Quick Start Guide, both published by Packt.
Read more about Gabor Szauer