Hi,
I can do this okay.
I want to create a struct FACE that stores 3, 4, 5....n number of vertices. This would allow me to parse a string from an .OBJ file that may contain anywhere from 3 or more vertices to define one polygon or face.Code:typedef struct TRIANGLE{ VERTEX a,b,c; }; vector<TRIANGLE> t; //or even this typedef struct QUAD{ VERTEX a,b,c,d; }; vector<QUAD> q;
There are work arounds. For example: I could decide that all faces are only 3, 4 or 5 vertices...I could create three respective vectors. As I read each line from the file, I could parse to determine if the line is 3, 4 or 5 and then load into appropriate vectors. I am looking for something a little more flexible.
Any clues? Suggestions?
Regards,
ChuckB




Reply With Quote