getting multiple ints from string data.

Feb 18, 2013 at 9:04pm
Hi all I'm having trouble making a .obj loader at present I'm trying to load faces that are defined as follows:

f 1/1/1 2/2/2/ 3/3/3

so far I've separated the the three number groupings into three strings, I've had a few issues with stringstreams and would like a simple solution.

please help.
Feb 18, 2013 at 9:07pm
Which face data are you after? All three? (and by that I mean vertex, texture and normal).

Funnily enough, I've already done this; I wrote a parser that converts .obj files into a smaller proprietary project for my university project.

The reason I'm asking about the face data is that I'm guessing that you might be drawing models using indexed data, which is similar to what I did. I only used the vertex faces. I didn't need texture faces and calculated the normals myself.

Last edited on Feb 18, 2013 at 9:12pm
Topic archived. No new replies allowed.