190 likes | 322 Views
Computer Graphic. Creator: Mohsen Asghari Session 6 Fall 2014. Matrixes. World
E N D
Computer Graphic Creator: Mohsen Asghari Session 6 Fall 2014
Matrixes • World • The World matrix being the first, is unique for every object within your world, and is responsible for transforming the vertices of an object from its own local space, to a common coordinate system called world space. • View • After that, the view matrix provides the concept of a mobile camera, when it reality the camera is actually the only constant point of reference within the world. The view matrix is a transformation that is applied to every object in the scene (but is not unique to each object), and provides the illusion of a camera. The view matrix is basically the inverse of what could be considered a world matrix for the camera. Yet instead of moving the camera itself, it provides the opposite movements to the rest of the scene (the illusion ;) ).
Projection • Finally the projection matrix is responsible for converting a 3D world into the homogeneous screen space that you see on your screen. This is the matrix used to represent your view frustum, and is usually represented as an orthographic or perspective projection.
Trick in OpenGL (Transpose) • ترانهاده
Trick in OpenGL • it is important to remember that matrices in OpenGL are defined using a column-major notation (as opposed to a row-major).
Question? • All the matrix is related to • Left = l • right = r • Bottom = b • Top = t • Near = n • Far = f
ProjectionMatrix • Projection Matrix (GL_PROJECTION) • GL_PROJECTION matrix is used to define the frustum. This frustum determines which objects or portions of objects will be clipped out. Also, it determines how the 3D scene is projected onto the screen. (Please see more details Ortho Perspective
Model View Matrix "World Matrix" and a "View Matrix", they are both transformation matrices.
View LookAt() • Eye • Target • Up
END OF SESSION 5 ANY QUESTION?