Feature 1

Editing ObjUtilities code from class to work on real obj files was fairly straight forward. I looped over the file, incrementing nvertices anytime a line started with ‘v ‘ and incremented nfaces anytime a line started with ‘f ‘. Other lines were simply ignored.

Originally, I tried using the regex library for a bit more robust parsing, but my compiler did not support it and threw an error anytime I created a regex object.

Here is an album with the changes to the code: http://imgur.com/a/gWiwe#0

Here is a video showing the renderer working with normal obj files (the skybox cube from feature 4):
[youtube http://www.youtube.com/watch?v=5D4Z88ACYHM?feature=player_detailpage]

Comments

Leave a Reply

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