Hello,

I'm trying to create a map to dxf converter, using the code that Valve gave
gratefully (http://www.coding.valve-erc.com) ;) But I don't understand the
LAST (!!) loop :( Here's the malicious piece of code :) :

   // triangulate each face and write
   for(i = 0; i < m_nFaces; i++)
   {
      CSSFace &face = m_Faces[i];
      PINT pVerts = CreatePointIndexList(face);

      for(int v = 0; v < face.nEdges; v++)
         pVerts[v]++;

      for(v = 0; v < face.nEdges-2; v++)
      {
         fprintf(stream, "0\nVERTEX\n8\n%s\n10\n0\n20\n0\n30\n"
            "0\n70\n128\n71\n%d\n72\n%d\n73\n%d\n", szName,
            v == 0 ? pVerts[0] : -pVerts[0],
            pVerts[v+1],
            v == (face.nEdges-3) ? pVerts[v+2] : -pVerts[v+2]
            );
      }
   }

I only need more informations about the CSSFace class (the members), the
CreatePointIndexList and the calculation of the "nEdges" member of CSSFace
:) Then, I'll be able to understand what gets done, and be able to merge it
to my code.

Thanks to anyone who could help me ;)

     - Cortex : HL Albator coder and mapper ( www.hlalbator.fr.st )
     - email : [EMAIL PROTECTED]  &  ICQ : 71548738



_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to