public GL_Mesh makeMeshObject(GL_OBJ_Reader objData) {
        ArrayList verts = objData.vertices;
        ArrayList txtrs = objData.textureCoords;
        ArrayList norms = objData.normals;
        ArrayList faces = objData.faces;

        // make a new mesh
        mesh = new GL_Mesh();
        mesh.name = objData.filename;
        mesh.materialLibeName = objData.materialLibeName;
        mesh.materials = (objData.materialLib != null)? objData.materialLib.materials : null;

        // add verts to GL_Mesh
        for (int i = 0; i < verts.size(); i++) {
            float[] coords = (float[]) verts.get(i);
			mesh.addVertex(coords[0], coords[1], coords[2]);
        }

        // allocate space for groups
        mesh.makeGroups(objData.numGroups());

        // init each group (allocate space for triangles)
        for (int g = 0; g < objData.numGroups(); g++) {
            mesh.initGroup(g,
                          objData.getGroupName(g),
                          objData.getGroupMaterialName(g),
                          objData.getGroupTriangleCount(g));
        }

        // add triangles to GL_Mesh.  OBJ "face" may be a triangle,
        // quad or polygon.  Convert all faces to triangles.
        for (int g = 0; g < objData.numGroups(); g++) {
            int triCount=0;
            faces = objData.getGroupFaces(g);
            for (int i = 0; i < faces.size(); i++) {
                Face face = (Face) faces.get(i);
                // put verts, normals, texture coords into triangle(s)
                if (face.vertexIDs.length == 3) {
                    addTriangle(mesh, g, triCount, face, txtrs, norms, 0, 1, 2, face.materialID);
                    triCount++;
                }
                else if (face.vertexIDs.length == 4) {
                    // convert quad to two triangles
                    addTriangle(mesh, g, triCount, face, txtrs, norms, 0, 1, 2, face.materialID);
                    triCount++;
                    addTriangle(mesh, g, triCount, face, txtrs, norms, 0, 2, 3, face.materialID);
                    triCount++;
                }
                else {
                    // convert polygon to triangle fan, with first vertex (0)
                    // at center:  0,1,2   0,2,3   0,3,4   0,4,5
                    for (int n = 0; n < face.vertexIDs.length - 2; n++) {
                        addTriangle(mesh, g, triCount, face, txtrs, norms, 0, n + 1, n + 2, face.materialID);
                        triCount++;
                    }
                }
            }
        }

		// optimize the GL_Mesh
		mesh.rebuild();

        // if no normals were loaded, generate some
        if (norms.size() == 0) {
        	mesh.regenerateNormals();
        }

		return mesh;
	}