PyOpenGL how do I import an obj file?
Set the keyword argument collect_faces = True, when you read the Wavefront .obj file. That causes that triangle face data are collected for every mesh.: (See PyWavefront) scene = pywavefront.Wavefront(‘Handgun_obj.obj’, collect_faces=True) Compute the scene box. The vertices are contained in scene.vertices. Each vertex is tuple with 3 components (x, y, z coordinate): scene_box = (scene.vertices[0], … Read more