Changeset 3065 in orxonox.OLD for orxonox/trunk
- Timestamp:
- Dec 3, 2004, 2:54:36 PM (20 years ago)
- Location:
- orxonox/trunk/importer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/object.cc
r3064 r3065 377 377 } 378 378 379 currentGroup->faceCount ++;379 currentGroup->faceCount += currentGroup->currentFace->vertexCount -2; 380 380 } 381 381 … … 483 483 face->firstElem = NULL; 484 484 485 face->material = NULL;485 face->materialString = NULL; 486 486 487 487 face->next = NULL; … … 515 515 while (tmpFace != NULL) 516 516 { 517 if (tmpFace->vertexCount == 3) 517 if (tmpFace->vertexCount == 0 && tmpFace->materialString != NULL) 518 { 519 if (currentGroup->faceMode != -1) 520 glEnd(); 521 currentGroup->faceMode = 0; 522 if (verbose >= 2) 523 printf ("using material %s for coming Faces.\n", tmpFace->materialString); 524 material->search(tmpFace->materialString)->select(); 525 526 } 527 528 else if (tmpFace->vertexCount == 3) 518 529 { 519 530 if (currentGroup->faceMode != 3) … … 655 666 } 656 667 657 if (currentGroup->faceMode != -1) 658 glEnd(); 659 currentGroup->faceMode = 0; 660 if (verbose >= 2) 661 printf ("using material %s for coming Faces.\n", matString); 662 material->search(matString)->select(); 668 if (currentGroup->faceCount >0) 669 currentGroup->currentFace = currentGroup->currentFace->next = new Face; 670 initFace (currentGroup->currentFace); 671 672 currentGroup->currentFace->materialString = new char[strlen(matString)]; 673 strcpy (currentGroup->currentFace->materialString, matString); 674 675 if (currentGroup->faceCount == 0) 676 currentGroup->faceCount ++; 677 663 678 } 664 679 -
orxonox/trunk/importer/object.h
r3063 r3065 51 51 FaceElement* firstElem; 52 52 53 char* material ;53 char* materialString; 54 54 55 55 Face* next;
Note: See TracChangeset
for help on using the changeset viewer.