vertex indexed for POD exporter

This topic contains 1 reply, has 1 voice, and was last updated by  dgu 5 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30839

    dgu
    Member

    Dear Team

    The goal is to make an exporter for ODE-PHYSICS and Bullet From a Pod so

    i am tryiing to get the vertex indexed correctly,

    May you tell me how to get it , i am a bit lost .

    for now i am able to get

    for (unsigned int i = 0; i < m_Scene.nNumMesh; ++i) {

                   // Load vertex data into buffer object

                  Â SPODMesh& Mesh = m_Scene.pMesh;

                  Â unsigned int uiSize = Mesh.nNumVertex * Mesh.sVertex.nStride;

                  Â printf(“Size pMesh %i for object id=%i n”, uiSize, i);

                  Â float* pfData = (float*) Mesh.pInterleaved;

                  Â pqpModel = new PQP_Model;

                   int cpt = 0;

                   int count=0;

                  for (unsigned int j = 1; j < Mesh.nNumVertex; ++j) {

                        float p1[3],p2[3],p3[3];

                        pfData = (float*) (((char*) pfData) + Mesh.sVertex.nStride);

                        float p1x,p1y,p1z,p2x,p2y,p2z,p3x,p3y,p3z;

    if (cpt == 0) {

                             p1x = pfData[0];

                             p1y = pfData[1];

                             p1z = pfData[2];

                             printf(“%f %f %f n”,p1x,p1y,p1z);

                        }

    …. etc etc

    of course nothing is indexed…..

    any idea how to get it right ?

    Kind regards

    david G

                             }

    dgu2012-04-25 10:29:31

    #35756

    dgu
    Member

    The response is in the demo shaders… and the extra package mesh classes

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.