Guest User

Untitled

a guest
Jan 5th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. if (myDFP.stringCompare(l_lineType, "f"))
  2. {
  3. int t_counter = 0;
  4. int t_triA = l_vCount;
  5.  
  6. //parse index data into our ptObjTriples structure
  7. while (myDFP.getWordNoNewLine(l_vertexString))
  8. {
  9. l_objTriples[l_vCount].parseTriple(l_vertexString, l_pCount, l_uCount, l_nCount, l_smoothingGroup);
  10. t_counter++;
  11. l_vCount++;
  12. }
  13. //create triangles from faces
  14. //this is tricky to work out the logic, basically a face is a triangle fan
  15. int t_secondCounter = 2;
  16. while (t_secondCounter < t_counter)
  17. {
  18. m_triangles[l_tCount].a = t_triA;
  19. m_triangles[l_tCount].b = t_triA + t_secondCounter - 1;
  20. m_triangles[l_tCount].c = t_triA + t_secondCounter;
  21. t_secondCounter++;
  22. l_tCount++;
  23. }//while
  24. l_fCount++;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment