Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jan 24, 2007, 8:48:26 PM (18 years ago)
Author:
bottac
Message:

Here comes the updated version.

Location:
branches/ODE
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/ODE/src/lib/graphics/importer/bsp/bsp_file.cc

    r10033 r10355  
    4040#include <vector>
    4141
     42#ifdef WITH_ODE
     43#include <ode/ode.h>
     44#endif
    4245
    4346
     
    330333    this->patchIndexes = new char[7*8*2*4*(this->numPatches+10)];
    331334 // this->patchRowIndexes = new int*[7*4*this->numPatches]; Not needed?
     335    #ifdef WITH_ODE
     336    this->ODE_Geometry = new dTriMeshDataID[this->numPatches*7*7];
     337    #endif
    332338    this->patchTrianglesPerRow = new char[7*4*this->numPatches];
    333339    this->VertexArrayModels  = new VertexArrayModel*[this->numPatches];
     
    728734 * @todo cleanup this function, let the user choose the level of tesselation
    729735 */
    730 
     736#ifdef WITH_ODE
     737uint  Ind [] = {8,0,9,     0,1,9,     9,1,10,   1,2,10,    10,2,11,  2,3,11,   11,3,12,  3,4,12,    12,4,13,  4,5,13,   13,5,14,   5,6,14,   14,6,15,  6,7,15, 
     738                16,8,17,   8,9,17,    17,9,18,  9,10,18,   18,10,19, 10,11,19, 19,11,20, 11,12,20,  20,12,21, 12,13,21, 21,13,22, 13,14,22,  22,14,23, 14,15,23,
     739                24,16,25,  16,17,25,  25,17,26, 17,18,26,  26,18,27, 18,19,27, 27,19,28, 19,20,28,  28,20,29, 20,21,29, 29,21,30, 21,22,30,  30,22,31, 22,23,31,
     740                32,24,33,  24,25,33,  33,25,34, 25,26,34,  34,26,35, 26,27,35, 35,27,36, 27,28,36,  36,28,37, 28,29,37 ,37,29,38, 29,30,38,  38,30,39, 30,31,39,
     741                40,32,41,  32,33,41,  41,33,42, 33,34,42,  42,34,43, 34,35,43, 43,35,44, 35,36,44,  44,36,45, 36,37,45, 45,37,46, 37,38,46,  46,38,47, 38,39,47,
     742                48,40,49,  40,41,49,  49,41,50, 41,42,50,  50,42,51, 42,43,51, 51,43,52, 43,44,52,  52,44,53, 44,45,53, 53,45,54, 45,46,54,  54,46,55, 46,47,55,
     743                56,48,57,  48,49,57,  57,49,58, 49,50,58,  58,50,59, 50,51,59, 59,51,60, 51,52,60,  60,52,61, 52,53,61, 61,53,62, 52,54,62,  62,54,63, 54,55,63, 0 };
     744#endif
    731745
    732746void BspFile::tesselate(int iface)
     
    888902        }
    889903      }
     904
     905        #ifdef WITH_ODE
     906        this->ODE_Geometry[this->patchOffset] = dGeomTriMeshDataCreate();
     907     // Create ODE Triangle Mesh Geometry
     908        dGeomTriMeshDataBuildSingle(this->ODE_Geometry[this->patchOffset], &((((BspVertex*)(this->patchVertice))[level1*level1*this->patchOffset ]).position[0]), sizeof(BspVertex), level1*level1, &(Ind[0]) ,7*14*3, 3* sizeof(uint) );
     909        #endif
    890910
    891911
Note: See TracChangeset for help on using the changeset viewer.