Feature 1 – Load OBJ meshes into your scene

1.  Load OBJ meshes into your scene

 

 

In order to bring in standard obj meshes from Blender, we just need to increase the robustness of the code slightly.  First, the code checks the beginning of the file for a ‘#’ symbol.  If absent, the code continues as before.  Otherwise it goes through the file and determines the number of vertices and faces manually.  Finally, the utility imports the vertices and faces, ensuring to only read in lines beginning with ‘v’ or ‘f’.  I had some problems trying to use the seekg() function, but determined it was easier to merely reopen the file in another fstream.

Video

Jeremy Kieser                                   3/3/13

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *