Game Development Reference
In-Depth Information
One important thing to remember about the view matrix is that, its inverse, is the camera's
transformation matrix, given the camera's view matrix we are able to find the position of
the camera in-world by computing its inverse.
This is because the job of the camera's view matrix is to bring world space geometry and
transformitsothatitisinfrontofthecamera byapplyingitsoppositedirection andorient-
ation. In other words, the “camera” is not really an entity that moves around in space, it is
actually the geometry which we transform and place in front of the camera. However, it is
more intuitive to think of the camera as an object or entity that can be placed and aimed in
any direction around the world, this is why usually we create a camera object that has an
interface that allows us to do just that.
4.2.3 World
The world transform converts coordinates from model space to world space. Model space
refers to the coordinates of a model's set of vertices relative to its own origin, think of a
modelexportedintoafileformat,anartistwillcreatethemodelrelativetosomeoriginthat
will be stored within the file. The world transform will bring those vertices and convert
them to world space, relative to an origin common to all the objects in the game world.
Figure 52 - World and local coordinate systems.
The world transformation may contain any combination of rotations, translations, scale
and shears. In the context of cameras, the world transformation, sometimes referred to as
Search WWH ::




Custom Search