Ignore:
Timestamp:
05/24/06 13:48:26 (18 years ago)
Author:
gumbau
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshStripifier.cpp

    r980 r985  
    649649       return arbitrary  
    650650  */ 
    651   if (x==4) 
     651//  if (x==4) 
    652652    return id1; 
    653653} 
     
    32343234    return ties_array[1]; 
    32353235  printf("There is an error trying to break sequential triangle \n"); 
     3236  return -1; 
    32363237} 
    32373238 
     
    81188119   
    81198120  // get the length of the fname. 
    8120   flength       =       strlen(fname); 
     8121  flength       =       int(strlen(fname)); 
    81218122 
    81228123  // make a new string in memory one larger than fname. 
     
    81858186void CustomStripifier::miReadFile(char *fname, char *file_open, FILE *bands, Geometry::SubMesh *geoSubMesh) 
    81868187{ 
    8187   BOOL  texture; 
    8188         BOOL    normal; 
    8189         BOOL    normal_and_texture; 
    8190   char  *all; 
    8191         char    *ptr; 
    8192         char    *ptr2; 
    8193   char  aux[255]; 
    8194         FILE    *file; 
    8195   float center[3]; 
    8196   int           num2; 
    81978188  int           face_id =       0; 
    8198   int           aux1; 
    8199         int             aux2; 
    8200         int             aux3; 
    8201   int           swaps; 
    8202         int             strips; 
    8203         int             triangles; 
    82048189  int           vert_count; 
    8205         int             loop; 
    82068190        int             num_vert=0; 
    82078191  int           vertex; 
    8208         int             vertex2; 
    82098192  int           temp[MAX1]; 
    82108193        int             i       =       0; 
     
    82158198         * Faces 
    82168199         */ 
    8217         for(int j = 0; j < geoSubMesh->mIndexCount; j = j + 3) 
     8200        for(unsigned int j = 0; j < geoSubMesh->mIndexCount; j = j + 3) 
    82188201        { 
    82198202                 
     
    82598242        FILE                                                            *bands; 
    82608243        char                                                            *file_open; 
    8261   float                                                         norm_difference; 
    82628244        int                                                                     i; 
    8263         int                                                                     j; 
    8264   int                                                                   swaps; 
    8265         int                                                                     strips; 
    8266         int                                                                     triangles; 
     8245        unsigned int                                            j; 
    82678246        int                                                                     f; 
    82688247        int                                                                     t; 
    82698248        int                                                                     tr; 
    8270         int                                                                     g; 
    82718249        int                                                                     num_buffers     =       0; 
    82728250        int                                                                     cost                            =       0; 
     
    82768254        int                                                                     num_texture     = 0; 
    82778255        int                                                                     num_tris    = 0; 
    8278         int                                                                     totalIndices; 
    82798256        int                                                                     totalStripIndices; 
    8280         unsigned int                            lui_Index; 
     8257 
    82818258        Geometry::SubMesh*      geoSubMesh; 
    82828259  mi_vector_tipo                        v_indices; 
     
    82948271 
    82958272 
    8296         //      2006-02-14 
    82978273        //      Progress bar. 
    82988274        float   percent; 
    8299         percent =       100.0 / (geoMesh->mSubMeshCount * 10.0); 
     8275        percent =       float(100.0 / (geoMesh->mSubMeshCount * 10.0)); 
    83008276        //-------------------------- 
    83018277 
    83028278        //      For all submeshes. 
    8303         for(int k = 0; k < geoMesh->mSubMeshCount; k++) 
     8279        for(unsigned int k = 0; k < geoMesh->mSubMeshCount; k++) 
    83048280        { 
    83058281                //      Leaves submesh doesn't stripify. 
     
    83178293                        geoSubMesh->mType       =       GEO_TRIANGLE_STRIPS; 
    83188294 
    8319                         num_vert        =       geoSubMesh->mVertexBuffer->mVertexCount; 
    8320                         num_faces       =       geoSubMesh->mIndexCount / 3; 
     8295                        num_vert        =       int(geoSubMesh->mVertexBuffer->mVertexCount); 
     8296                        num_faces       =       int(geoSubMesh->mIndexCount / 3); 
    83218297                        num_tris        =       num_faces; 
    83228298 
Note: See TracChangeset for help on using the changeset viewer.