Changeset 4613 in orxonox.OLD for orxonox/trunk/src
- Timestamp:
- Jun 13, 2005, 12:39:21 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/src/lib/collision_detection/obb_tree_node.cc
r4612 r4613 311 311 partition2.add(&box->vertices[i]); 312 312 } 313 partition 2.add(&box->vertices[vertexIndex]);313 partition1.add(&box->vertices[vertexIndex]); 314 314 315 315 printf("\npartition1: got %i vertices/ partition 2: got %i vertices\n", partition1.getSize(), partition2.getSize()); 316 317 318 /* now comes the separation into two different sVec3D arrays */ 319 tIterator<sVec3D>* iterator; //!< the iterator to go through the lists 320 sVec3D* element; //!< the elements 321 int index; //!< index storage place 322 sVec3D* vertList1; //!< the vertex list 1 323 sVec3D* vertList2; //!< the vertex list 2 324 325 vertList1 = new sVec3D[partition1.getSize()]; 326 vertList2 = new sVec3D[partition2.getSize()]; 327 328 iterator = partition1.getIterator(); 329 element = iterator->nextElement(); 330 index = 0; 331 while( element != NULL) 332 { 333 vertList1[index][0] = element[0][0]; 334 vertList1[index][1] = element[0][1]; 335 vertList1[index][2] = element[0][2]; 336 ++index; 337 element = iterator->nextElement(); 338 } 339 340 printf("\npartition 1:\n"); 341 for(int i = 0; i < partition1.getSize(); ++i) 342 { 343 printf("v[%i][0] = %f\n", i, vertList1[i][0]); 344 printf("v[%i][1] = %f\n", i, vertList1[i][1]); 345 printf("v[%i][2] = %f\n", i, vertList1[i][2]); 346 } 347 348 iterator = partition2.getIterator(); 349 element = iterator->nextElement(); 350 index = 0; 351 while( element != NULL) 352 { 353 vertList2[index][0] = element[0][0]; 354 vertList2[index][1] = element[0][1]; 355 vertList2[index][2] = element[0][2]; 356 ++index; 357 element = iterator->nextElement(); 358 } 359 360 printf("\npartition 2:\n"); 361 for(int i = 0; i < partition2.getSize(); ++i) 362 { 363 printf("v[%i][0] = %f\n", i, vertList2[i][0]); 364 printf("v[%i][1] = %f\n", i, vertList2[i][1]); 365 printf("v[%i][2] = %f\n", i, vertList2[i][2]); 366 } 316 367 317 368 }
Note: See TracChangeset
for help on using the changeset viewer.