Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (myDFP.stringCompare(l_lineType, "f"))
- {
- int t_counter = 0;
- int t_triA = l_vCount;
- //parse index data into our ptObjTriples structure
- while (myDFP.getWordNoNewLine(l_vertexString))
- {
- l_objTriples[l_vCount].parseTriple(l_vertexString, l_pCount, l_uCount, l_nCount, l_smoothingGroup);
- t_counter++;
- l_vCount++;
- }
- //create triangles from faces
- //this is tricky to work out the logic, basically a face is a triangle fan
- int t_secondCounter = 2;
- while (t_secondCounter < t_counter)
- {
- m_triangles[l_tCount].a = t_triA;
- m_triangles[l_tCount].b = t_triA + t_secondCounter - 1;
- m_triangles[l_tCount].c = t_triA + t_secondCounter;
- t_secondCounter++;
- l_tCount++;
- }//while
- l_fCount++;
- }
Advertisement
Add Comment
Please, Sign In to add comment