- Timestamp:
- 05/24/06 13:48:26 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoMeshStripifier.cpp
r980 r985 649 649 return arbitrary 650 650 */ 651 if (x==4)651 // if (x==4) 652 652 return id1; 653 653 } … … 3234 3234 return ties_array[1]; 3235 3235 printf("There is an error trying to break sequential triangle \n"); 3236 return -1; 3236 3237 } 3237 3238 … … 8118 8119 8119 8120 // get the length of the fname. 8120 flength = strlen(fname);8121 flength = int(strlen(fname)); 8121 8122 8122 8123 // make a new string in memory one larger than fname. … … 8185 8186 void CustomStripifier::miReadFile(char *fname, char *file_open, FILE *bands, Geometry::SubMesh *geoSubMesh) 8186 8187 { 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;8197 8188 int face_id = 0; 8198 int aux1;8199 int aux2;8200 int aux3;8201 int swaps;8202 int strips;8203 int triangles;8204 8189 int vert_count; 8205 int loop;8206 8190 int num_vert=0; 8207 8191 int vertex; 8208 int vertex2;8209 8192 int temp[MAX1]; 8210 8193 int i = 0; … … 8215 8198 * Faces 8216 8199 */ 8217 for( int j = 0; j < geoSubMesh->mIndexCount; j = j + 3)8200 for(unsigned int j = 0; j < geoSubMesh->mIndexCount; j = j + 3) 8218 8201 { 8219 8202 … … 8259 8242 FILE *bands; 8260 8243 char *file_open; 8261 float norm_difference;8262 8244 int i; 8263 int j; 8264 int swaps; 8265 int strips; 8266 int triangles; 8245 unsigned int j; 8267 8246 int f; 8268 8247 int t; 8269 8248 int tr; 8270 int g;8271 8249 int num_buffers = 0; 8272 8250 int cost = 0; … … 8276 8254 int num_texture = 0; 8277 8255 int num_tris = 0; 8278 int totalIndices;8279 8256 int totalStripIndices; 8280 unsigned int lui_Index; 8257 8281 8258 Geometry::SubMesh* geoSubMesh; 8282 8259 mi_vector_tipo v_indices; … … 8294 8271 8295 8272 8296 // 2006-02-148297 8273 // Progress bar. 8298 8274 float percent; 8299 percent = 100.0 / (geoMesh->mSubMeshCount * 10.0);8275 percent = float(100.0 / (geoMesh->mSubMeshCount * 10.0)); 8300 8276 //-------------------------- 8301 8277 8302 8278 // For all submeshes. 8303 for( int k = 0; k < geoMesh->mSubMeshCount; k++)8279 for(unsigned int k = 0; k < geoMesh->mSubMeshCount; k++) 8304 8280 { 8305 8281 // Leaves submesh doesn't stripify. … … 8317 8293 geoSubMesh->mType = GEO_TRIANGLE_STRIPS; 8318 8294 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); 8321 8297 num_tris = num_faces; 8322 8298
Note: See TracChangeset
for help on using the changeset viewer.