Understanding the OBJ file format
The goal of this project is to view 3D models in the Wavefront OBJ format. Before we begin coding, let's take a look at the file format. A reference can be found at http://www.fileformat.info/format/wavefrontobj/egff.htm.
As we know, 3D models can be represented as a mesh of X, Y, and Z vertices. Sets of vertices are connected to define a face of the mesh surface. A full mesh surface is a collection of these faces.
Each vertex can also be assigned a normal vector and/or a texture coordinate. The normal vector defines the outward facing direction at that vertex, used in lighting calculations. The UV texture coordinate can be used to map texture images onto the mesh surface. There are other features of the format, including free-form curves and materials, which we will not support in this project.
As a plain text file, an OBJ is organized as separate lines of text. Each nonblank line begins with a keyword and data for that keyword separated by spaces. Comments...