When looking for some good free .obj files to use, I found that a lot of them tended to have quads. I took one of them and manually made it into triangles, then realized that the same thing could be accomplished within the obj-loader itself. I have heard that it is possible to do this in something like blender too, but I'm sure I'm not alone in that I don't have any software like that.
The changes I made have no affect on properly triangulated objects. They only take effect when faces have more than 3 sets of items (assuming that means they are quads). I tested it on several objects, and it worked as I would have expected. It even resulted in having less vertices than the object I had triangulated manually.
Let me know if you have any questions or issues with it. It is entirely possible that I didn't think of something.
When looking for some good free .obj files to use, I found that a lot of them tended to have quads. I took one of them and manually made it into triangles, then realized that the same thing could be accomplished within the obj-loader itself. I have heard that it is possible to do this in something like blender too, but I'm sure I'm not alone in that I don't have any software like that.
The changes I made have no affect on properly triangulated objects. They only take effect when faces have more than 3 sets of items (assuming that means they are quads). I tested it on several objects, and it worked as I would have expected. It even resulted in having less vertices than the object I had triangulated manually.
Let me know if you have any questions or issues with it. It is entirely possible that I didn't think of something.