- Timestamp:
- 05/31/06 09:17:58 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
GTP/trunk/Lib/Geom/shared/GTGeometry/src/GeoLodStripsConstructor.cpp
r993 r996 14 14 float percent; 15 15 16 percent = 10;17 16 18 17 this->GenerarModeloV(upb); … … 20 19 21 20 // Last updtate of the progress bar. 21 percent = 100.0; 22 22 upb(percent); 23 23 } … … 32 32 long int k; 33 33 long int i; 34 unsigned long int 34 unsigned long int t; 35 35 long int r; 36 unsigned long int 36 unsigned long int v; 37 37 long int p0; 38 38 long int lod = 0; … … 45 45 LODChanges listaCambios; 46 46 float percent; 47 float increment; 47 48 long int update; 48 49 49 // Guardamos copia original.50 TiraOriginal = this->cStrips;50 // Saves original copy. 51 TiraOriginal = this->cStrips; 51 52 52 53 this->MARCAVACIO = int(10 * this->cVerts.size()); … … 54 55 listaCambios.clear(); 55 56 56 update = 0; 57 // Initialize increment. 58 increment = 0.0; 57 59 58 60 for (lod = 0; ((this->cVerts[lod].Next) != -1); lod++) 59 61 { 60 update++; 61 } 62 63 update = update / 20; 64 percent = 0.5; 62 increment += 1.0; 63 } 64 65 update = -1; 66 increment = (float)30.0 / increment; 67 percent = 1.0; 65 68 66 69 this->LodsDisp = this->TOTALCAMBIOS = lod; … … 68 71 pCambios[0] = 0; 69 72 70 // 5 min.71 73 for (lod = 0; ((this->cVerts[lod].Next) != -1); lod++) 72 74 { 73 if ((lod % update) == 0) 74 { 75 if (update != (int)(increment * lod)) 76 { 77 update = (int)(increment * lod); 75 78 upb(percent); 76 } 79 } 77 80 78 81 RegsCambios = 0; … … 81 84 for(t = 0; t < this->cStrips.size(); t++) 82 85 { 83 // Inicializar86 // Initialize. 84 87 regLOD.strip = this->MARCAVACIO; 85 88 86 // PRIMERO: los cambios de los vertices89 // Change vertices. 87 90 totalRegs = 0; 88 91 89 92 for (v = 0; v < this->cStrips[t].size(); v++) 90 93 { 91 // RESOLUCION VARIABLE MAL.92 94 if (this->cStrips[t][v] == lod) 93 95 { 94 // Gestion de Tiras.96 // Strips. 95 97 if (regLOD.strip == this->MARCAVACIO) 96 98 { … … 108 110 regLOD.nP = char(totalRegs); 109 111 110 // SEGUNDO: Simplificaciones de Longitud 1111 // Cambio para simplifaciones de nivel 1 mayores de 2112 // Simplifications length 1. 113 // Changes for simplification of level 1 to greater than 2. 112 114 totalRegs = 0; 113 115 i = 0; … … 123 125 ) 124 126 { 125 // Sa lvar el inicio de la repeticion.127 // Saves beginning of repetition. 126 128 if (!r) 127 129 { … … 271 273 long int c2; 272 274 // Progress bar 273 float percent; 275 float percent; 276 float increment; 274 277 long int update; 275 278 276 279 bEncontrado = false; 277 280 278 c1 = 0; 279 c2 = 0; 280 281 update = long(geoMeshSQ->mSteps.size() / 20); 282 percent = 0.5; 281 c1 = 0; 282 c2 = 0; 283 284 update = -1; 285 percent = 1.0; 286 increment = (float)(10.0) / (float)(geoMeshSQ->mSteps.size()); 283 287 284 288 for (i = 0; i < this->geoMeshSQ->mSteps.size(); i++) 285 289 { 286 if ((i % update) == 0) 287 { 290 if (update != (int)(i * increment)) 291 { 292 update = (int)(i * increment); 288 293 upb(percent); 289 294 } … … 305 310 this->NumVertsRepetidos = c2; 306 311 307 update = long(Ordenacion.size() / 20);308 percent = 0.5;309 310 // 1 min. 312 update = -1; 313 increment = (float)(10.0) / (float)(Ordenacion.size()); 314 percent = 1.0; 315 311 316 // Change all vertices that have x != 0. 312 for(i=0;i<Ordenacion.size();i++) 313 { 314 if ((i % update) == 0) 315 { 317 for(i = 0; i < Ordenacion.size(); i++) 318 { 319 if (update != (int)(i * increment)) 320 { 321 update = (int)(i * increment); 316 322 upb(percent); 317 323 } 318 324 319 325 Ord = &(Ordenacion[i]); 320 326 … … 342 348 } 343 349 344 update = long(Ordenacion.size() / 20); 345 percent = 0.5; 350 update = -1; 351 increment = (float)(10.0) / (float)(Ordenacion.size()); 352 percent = 1.0; 346 353 347 354 // 3 seg. … … 349 356 for(i = 0; i < Ordenacion.size(); i++) 350 357 { 351 if ((i % update) == 0) 352 { 358 if (update != (int)(i * increment)) 359 { 360 update = (int)(i * increment); 353 361 upb(percent); 354 362 } … … 386 394 } 387 395 388 update = long(Ordenacion.size() / 20); 389 percent = 0.5; 396 update = -1; 397 increment = (float)(10.0) / (float)(Ordenacion.size()); 398 percent = 1.0; 390 399 391 400 // 2 min. … … 393 402 for (i = 0; i < Ordenacion.size(); i++) 394 403 { 395 if ((i % update) == 0) 396 { 404 if (update != (int)(i * increment)) 405 { 406 update = (int)(i * increment); 397 407 upb(percent); 398 408 } 399 409 400 410 v = Ordenacion[i].vQslimNext; 401 411 … … 430 440 } 431 441 432 update = long(NuevosVerts.size() / 40); 433 percent = 0.5; 442 update = -1; 443 increment = (float)(20.0) / (float)(NuevosVerts.size()); 444 percent = 1.0; 434 445 435 446 k = 0; … … 439 450 for(v = 0; v < NuevosVerts.size(); v++) 440 451 { 441 if ((v % update) == 0) 442 { 452 if (update != (int)(v * increment)) 453 { 454 update = (int)(v * increment); 443 455 upb(percent); 444 456 } 445 457 446 458 for(t = 0; t < this->cStrips.size(); t++) 447 459 { … … 469 481 this->cVerts = NuevosVerts; 470 482 471 percent = 10;472 upb(percent);473 } 483 //percent = 100.0; 484 //upb(percent); 485 } 474 486 475 487 //----------------------------------------------------------------------------- … … 541 553 { 542 554 unsigned int i, j; 543 int k=0;544 char simp[256];555 int k = 0; 556 char simp[256]; 545 557 546 558 //****************** 1º CONSTRUCCION DEL FICHERO.LOD ********************* … … 1114 1126 } 1115 1127 1116 // /GetMesh: Return de current Mesh.1128 // GetMesh: Return de current Mesh. 1117 1129 Mesh * LodStripsConstructor::GetMesh() 1118 1130 {
Note: See TracChangeset
for help on using the changeset viewer.