Changeset 3195 in orxonox.OLD for orxonox/trunk/importer/object.cc
- Timestamp:
- Dec 17, 2004, 12:03:30 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/trunk/importer/object.cc
r3190 r3195 25 25 { 26 26 27 initialize();28 29 BoxObject();30 31 importToGL ();32 33 cleanup();27 this->initialize(); 28 29 this->BoxObject(); 30 31 this->importToGL (); 32 33 this->cleanup(); 34 34 } 35 35 … … 40 40 Object::Object(char* fileName) 41 41 { 42 initialize();43 44 importFile (fileName);45 46 importToGL ();47 48 cleanup();42 this->initialize(); 43 44 this->importFile (fileName); 45 46 this->importToGL (); 47 48 this->cleanup(); 49 49 } 50 50 … … 56 56 Object::Object(char* fileName, float scaling) 57 57 { 58 initialize();59 scaleFactor = scaling;60 61 importFile (fileName);62 63 importToGL ();64 65 cleanup();58 this->initialize(); 59 this->scaleFactor = scaling; 60 61 this->importFile (fileName); 62 63 this->importToGL (); 64 65 this->cleanup(); 66 66 } 67 67 … … 75 75 if (verbose >= 2) 76 76 printf ("Deleting display Lists.\n"); 77 Group* walker = firstGroup;77 Group* walker = this->firstGroup; 78 78 while (walker != NULL) 79 79 { … … 84 84 } 85 85 86 if ( objPath)87 delete [] objPath;88 if ( objFileName)89 delete [] objFileName;90 if ( mtlFileName)91 delete [] mtlFileName;86 if (this->objPath) 87 delete []this->objPath; 88 if (this->objFileName) 89 delete []this->objFileName; 90 if (this->mtlFileName) 91 delete []this->mtlFileName; 92 92 93 93 if (verbose >=2) 94 94 printf("Deleting Materials.\n"); 95 if ( material)96 delete material;95 if (this->material) 96 delete this->material; 97 97 } 98 98 … … 106 106 if (verbose >=2) 107 107 printf("drawing the 3D-Objects\n"); 108 Group* walker = firstGroup;108 Group* walker = this->firstGroup; 109 109 while (walker != NULL) 110 110 { … … 124 124 void Object::draw (int groupNumber) const 125 125 { 126 if (groupNumber >= groupCount)126 if (groupNumber >= this->groupCount) 127 127 { 128 128 if (verbose>=1) 129 printf ("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, groupCount);129 printf ("You requested object number %i, but this File only contains of %i Objects.\n", groupNumber-1, this->groupCount); 130 130 return; 131 131 } 132 132 if (verbose >=2) 133 133 printf("drawing the requested 3D-Objects if found.\n"); 134 Group* walker = firstGroup;134 Group* walker = this->firstGroup; 135 135 int counter = 0; 136 136 while (walker != NULL) … … 147 147 } 148 148 if (verbose >= 1) 149 printf("Object number %i in %s not Found.\n", groupNumber, objFileName);149 printf("Object number %i in %s not Found.\n", groupNumber, this->objFileName); 150 150 return; 151 151 … … 162 162 if (verbose >=2) 163 163 printf("drawing the requested 3D-Objects if found.\n"); 164 Group* walker = firstGroup;164 Group* walker = this->firstGroup; 165 165 while (walker != NULL) 166 166 { … … 175 175 } 176 176 if (verbose >= 2) 177 printf("Object Named %s in %s not Found.\n", groupName, objFileName);177 printf("Object Named %s in %s not Found.\n", groupName, this->objFileName); 178 178 return; 179 179 } … … 184 184 int Object::getGroupCount (void) const 185 185 { 186 return groupCount;186 return this->groupCount; 187 187 } 188 188 … … 199 199 200 200 // setting the start group; 201 firstGroup = new Group;202 currentGroup =firstGroup;203 groupCount = 0;201 this->firstGroup = new Group; 202 this->currentGroup = this->firstGroup; 203 this->groupCount = 0; 204 204 205 initGroup (firstGroup);206 objPath = NULL;207 objFileName = NULL;208 mtlFileName = NULL;209 scaleFactor = 1;210 material = new Material();211 212 vertices = new Array();213 vTexture = new Array();214 normals = new Array();205 this->initGroup (this->currentGroup); 206 this->objPath = NULL; 207 this->objFileName = NULL; 208 this->mtlFileName = NULL; 209 this->scaleFactor = 1; 210 this->material = new Material(); 211 212 this->vertices = new Array(); 213 this->vTexture = new Array(); 214 this->normals = new Array(); 215 215 216 216 return true; … … 233 233 234 234 group->firstFace = new Face; 235 initFace (group->firstFace);235 this->initFace (group->firstFace); 236 236 group->currentFace = group->firstFace; 237 237 } … … 263 263 printf("cleaning up the 3D-Object to save Memory.\n"); 264 264 265 if ( vertices != NULL)266 delete vertices;267 if ( vTexture != NULL)268 delete vTexture;269 if ( normals != NULL)270 delete normals;271 272 cleanupGroup(firstGroup);265 if (this->vertices) 266 delete this->vertices; 267 if (this->vTexture) 268 delete this->vTexture; 269 if (this->normals) 270 delete this->normals; 271 272 this->cleanupGroup(this->firstGroup); 273 273 return true; 274 274 } … … 306 306 if (face->firstElem != NULL) 307 307 { 308 cleanupFaceElement(face->firstElem);308 this->cleanupFaceElement(face->firstElem); 309 309 delete face->firstElem; 310 310 } … … 312 312 if (face->next != NULL) 313 313 { 314 cleanupFace (face->next);314 this->cleanupFace (face->next); 315 315 delete face->next; 316 316 } … … 327 327 if (faceElem->next != NULL) 328 328 { 329 cleanupFaceElement (faceElem->next);329 this->cleanupFaceElement (faceElem->next); 330 330 delete faceElem->next; 331 331 } … … 357 357 name = tmpName+1; 358 358 } 359 objPath = new char[name-fileName];360 strncpy( objPath, fileName, name-fileName);361 objPath[name-fileName] = '\0';359 this->objPath = new char[name-fileName]; 360 strncpy(this->objPath, fileName, name-fileName); 361 this->objPath[name-fileName] = '\0'; 362 362 if (verbose >=2) 363 363 if (strlen(objPath)> 0) … … 368 368 printf("Resolved file %s.\n", name); 369 369 370 if ( material)371 material->addTexturePath(objPath);372 objFileName = new char[strlen(name)+1];373 strcpy ( objFileName, name);370 if (this->material) 371 this->material->addTexturePath(this->objPath); 372 this->objFileName = new char[strlen(name)+1]; 373 strcpy (this->objFileName, name); 374 374 this->readFromObjFile (); 375 375 return true; … … 383 383 { 384 384 char* fileName = new char [strlen(objPath)+strlen(objFileName)+1]; 385 if ( objFileName != NULL && !strcmp(objFileName, ""))385 if (this->objFileName != NULL && !strcmp(this->objFileName, "")) 386 386 return false; 387 strcpy(fileName, objPath);388 strcat(fileName, objFileName);387 strcpy(fileName, this->objPath); 388 strcat(fileName, this->objFileName); 389 389 390 390 ifstream* OBJ_FILE = new ifstream(fileName); … … 394 394 printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName); 395 395 BoxObject(); 396 OBJ_FILE->close(); 396 397 delete []fileName; 397 OBJ_FILE->close();398 delete OBJ_FILE; 398 399 return false; 399 400 } … … 405 406 OBJ_FILE->getline(Buffer, 10000); 406 407 if (verbose >=4) 407 printf ("Read input line: %s\n", Buffer);408 printf ("Read input line: %s\n", Buffer); 408 409 409 410 … … 411 412 if (!strncmp(Buffer, "v ", 2)) 412 413 { 413 readVertex(Buffer+2);414 this->readVertex(Buffer+2); 414 415 } 415 416 … … 417 418 else if (!strncmp(Buffer, "f ", 2)) 418 419 { 419 readFace (Buffer+2);420 this->readFace (Buffer+2); 420 421 } 421 422 422 423 else if (!strncmp(Buffer, "mtllib ", 7)) 423 424 { 424 readMtlLib (Buffer+7);425 this->readMtlLib (Buffer+7); 425 426 } 426 427 427 428 else if (!strncmp(Buffer, "usemtl ", 7)) 428 429 { 429 readUseMtl (Buffer+7);430 this->readUseMtl (Buffer+7); 430 431 } 431 432 432 433 // case VertexNormal 433 434 else if (!strncmp(Buffer, "vn ", 3)) 434 435 readVertexNormal(Buffer+3);436 437 435 { 436 this->readVertexNormal(Buffer+3); 437 } 438 438 439 // case VertexTextureCoordinate 439 440 else if (!strncmp(Buffer, "vt ", 3)) 440 441 readVertexTexture(Buffer+3);442 441 { 442 this->readVertexTexture(Buffer+3); 443 } 443 444 // case group 444 445 else if (!strncmp(Buffer, "g ", 2)) 445 446 { 446 readGroup (Buffer+2);447 } 448 else if (!strncmp(Buffer, "s ", 2)) 447 this->readGroup (Buffer+2); 448 } 449 else if (!strncmp(Buffer, "s ", 2)) //! \todo smoothing groups have to be implemented 449 450 { 450 451 if (verbose >= 2) … … 453 454 } 454 455 OBJ_FILE->close(); 456 delete OBJ_FILE; 455 457 delete []fileName; 456 458 return true; … … 469 471 if (verbose >=3) 470 472 printf ("Read Group: %s.\n", groupString); 471 if ( groupCount != 0 &¤tGroup->faceCount>0)473 if (this->groupCount != 0 && this->currentGroup->faceCount>0) 472 474 { 473 475 // finalizeGroup(currentGroup); 474 currentGroup =currentGroup->next = new Group;475 initGroup(currentGroup);476 this->currentGroup = this->currentGroup->next = new Group; 477 this->initGroup(this->currentGroup); 476 478 } 477 479 // setting the group name if not default. 478 480 if (strcmp(groupString, "default")) 479 481 { 480 currentGroup->name = new char [strlen(groupString)+1];481 strcpy( currentGroup->name, groupString);482 } 483 ++ groupCount;482 this->currentGroup->name = new char [strlen(groupString)+1]; 483 strcpy(this->currentGroup->name, groupString); 484 } 485 ++this->groupCount; 484 486 485 487 } … … 499 501 if (verbose >= 3) 500 502 printf ("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3); 501 vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);503 this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor); 502 504 return true; 503 505 } … … 512 514 bool Object::readFace (char* faceString) 513 515 { 514 if ( currentGroup->faceCount >0)515 currentGroup->currentFace =currentGroup->currentFace->next = new Face;516 initFace (currentGroup->currentFace);517 518 FaceElement* tmpElem = currentGroup->currentFace->firstElem = new FaceElement;516 if (this->currentGroup->faceCount >0) 517 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 518 this->initFace (this->currentGroup->currentFace); 519 520 FaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new FaceElement; 519 521 tmpElem->next = NULL; 520 522 while(strcmp (faceString, "\0")) 521 523 { 522 if ( currentGroup->currentFace->vertexCount>0)524 if (this->currentGroup->currentFace->vertexCount>0) 523 525 tmpElem = tmpElem->next = new FaceElement; 524 526 tmpElem->next = NULL; … … 561 563 if (strcmp (faceString, "\0")) 562 564 faceString++; 563 currentGroup->currentFace->vertexCount++;564 } 565 566 currentGroup->faceCount +=currentGroup->currentFace->vertexCount -2;565 this->currentGroup->currentFace->vertexCount++; 566 } 567 568 this->currentGroup->faceCount += this->currentGroup->currentFace->vertexCount -2; 567 569 } 568 570 … … 581 583 if (verbose >=3 ) 582 584 printf("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3); 583 normals->addEntry(subbuffer1, subbuffer2, subbuffer3);585 this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3); 584 586 return true; 585 587 } … … 599 601 if (verbose >=3 ) 600 602 printf("found vertex-Texture %f, %f\n", &subbuffer1, &subbuffer2); 601 vTexture->addEntry(subbuffer1);602 vTexture->addEntry(subbuffer2);603 this->vTexture->addEntry(subbuffer1); 604 this->vTexture->addEntry(subbuffer2); 603 605 return true; 604 606 } … … 615 617 bool Object::readMtlLib (char* mtlFile) 616 618 { 617 mtlFileName = new char [strlen(mtlFile)+1];618 strcpy( mtlFileName, mtlFile);619 char* fileName = new char [strlen(objPath) + strlen( mtlFileName)+1];620 strcpy(fileName, objPath);621 strcat(fileName, mtlFileName);619 this->mtlFileName = new char [strlen(mtlFile)+1]; 620 strcpy(this->mtlFileName, mtlFile); 621 char* fileName = new char [strlen(objPath) + strlen(this->mtlFileName)+1]; 622 strcpy(fileName, this->objPath); 623 strcat(fileName, this->mtlFileName); 622 624 623 625 … … 630 632 if (verbose >= 1) 631 633 printf ("unable to open file: %s\n", fileName); 634 MTL_FILE->close(); 632 635 delete []fileName; 633 MTL_FILE->close();636 delete MTL_FILE; 634 637 return false; 635 638 } … … 704 707 705 708 } 709 MTL_FILE->close(); 706 710 delete []fileName; 711 delete MTL_FILE; 707 712 return true; 708 713 } … … 714 719 bool Object::readUseMtl (char* matString) 715 720 { 716 if (! mtlFileName)721 if (!this->mtlFileName) 717 722 { 718 723 if (verbose >= 1) … … 721 726 } 722 727 723 if ( currentGroup->faceCount >0)724 currentGroup->currentFace =currentGroup->currentFace->next = new Face;725 initFace (currentGroup->currentFace);728 if (this->currentGroup->faceCount >0) 729 this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face; 730 this->initFace (this->currentGroup->currentFace); 726 731 727 currentGroup->currentFace->materialString = new char[strlen(matString)+1];728 strcpy ( currentGroup->currentFace->materialString, matString);732 this->currentGroup->currentFace->materialString = new char[strlen(matString)+1]; 733 strcpy (this->currentGroup->currentFace->materialString, matString); 729 734 730 if ( currentGroup->faceCount == 0)731 currentGroup->faceCount ++;735 if (this->currentGroup->faceCount == 0) 736 this->currentGroup->faceCount ++; 732 737 733 738 } … … 740 745 741 746 // finalize the Arrays 742 vertices->finalizeArray();743 vTexture->finalizeArray();747 this->vertices->finalizeArray(); 748 this->vTexture->finalizeArray(); 744 749 if (normals->getCount() == 0) // vertices-Array must be uilt for this 745 buildVertexNormals();746 normals->finalizeArray();747 748 currentGroup =firstGroup;749 750 while ( currentGroup != NULL)750 this->buildVertexNormals(); 751 this->normals->finalizeArray(); 752 753 this->currentGroup = this->firstGroup; 754 755 while (this->currentGroup != NULL) 751 756 { 752 757 753 758 // creating a glList for the Group 754 if (( currentGroup->listNumber = glGenLists(1)) == 0)759 if ((this->currentGroup->listNumber = glGenLists(1)) == 0) 755 760 { 756 761 printf ("list could not be created for this Object\n"); 757 762 return false; 758 763 } 759 glNewList ( currentGroup->listNumber, GL_COMPILE);764 glNewList (this->currentGroup->listNumber, GL_COMPILE); 760 765 761 766 // Putting Faces to GL 762 Face* tmpFace = currentGroup->firstFace;767 Face* tmpFace = this->currentGroup->firstFace; 763 768 while (tmpFace != NULL) 764 769 { 765 770 if (tmpFace->vertexCount == 0 && tmpFace->materialString != NULL) 766 771 { 767 if ( currentGroup->faceMode != -1)772 if (this->currentGroup->faceMode != -1) 768 773 glEnd(); 769 currentGroup->faceMode = 0;774 this->currentGroup->faceMode = 0; 770 775 if (verbose >= 2) 771 776 printf ("using material %s for coming Faces.\n", tmpFace->materialString); … … 778 783 else if (tmpFace->vertexCount == 3) 779 784 { 780 if ( currentGroup->faceMode != 3)785 if (this->currentGroup->faceMode != 3) 781 786 { 782 if ( currentGroup->faceMode != -1)787 if (this->currentGroup->faceMode != -1) 783 788 glEnd(); 784 789 glBegin(GL_TRIANGLES); 785 790 } 786 791 787 currentGroup->faceMode = 3;792 this->currentGroup->faceMode = 3; 788 793 if (verbose >=3) 789 794 printf ("found triag.\n"); … … 792 797 else if (tmpFace->vertexCount == 4) 793 798 { 794 if ( currentGroup->faceMode != 4)799 if (this->currentGroup->faceMode != 4) 795 800 { 796 if ( currentGroup->faceMode != -1)801 if (this->currentGroup->faceMode != -1) 797 802 glEnd(); 798 803 glBegin(GL_QUADS); 799 804 } 800 currentGroup->faceMode = 4;805 this->currentGroup->faceMode = 4; 801 806 if (verbose >=3 ) 802 807 printf ("found quad.\n"); … … 805 810 else if (tmpFace->vertexCount > 4) 806 811 { 807 if ( currentGroup->faceMode != -1)812 if (this->currentGroup->faceMode != -1) 808 813 glEnd(); 809 814 glBegin(GL_POLYGON); 810 815 if (verbose >=3) 811 816 printf ("Polygon with %i faces found.", tmpFace->vertexCount); 812 currentGroup->faceMode = tmpFace->vertexCount;817 this->currentGroup->faceMode = tmpFace->vertexCount; 813 818 } 814 819 … … 817 822 { 818 823 // printf ("%s\n", tmpElem->value); 819 addGLElement(tmpElem);824 this->addGLElement(tmpElem); 820 825 tmpElem = tmpElem->next; 821 826 } … … 824 829 glEnd(); 825 830 glEndList(); 826 currentGroup = currentGroup->next; 831 832 this->currentGroup = this->currentGroup->next; 827 833 } 828 834 } … … 844 850 845 851 if (elem->texCoordNumber != -1) 846 glTexCoord2fv( vTexture->getArray() + elem->texCoordNumber * 2);852 glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2); 847 853 if (elem->normalNumber != -1) 848 glNormal3fv( normals->getArray() + elem->normalNumber * 3);854 glNormal3fv(this->normals->getArray() + elem->normalNumber * 3); 849 855 if (elem->vertexNumber != -1) 850 glVertex3fv( vertices->getArray() + elem->vertexNumber * 3);856 glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3); 851 857 852 858 } … … 925 931 printf ("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z); 926 932 927 normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);933 this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z); 928 934 929 935 } … … 940 946 void Object::BoxObject(void) 941 947 { 942 readVertex ("-0.5 -0.5 0.5");943 readVertex ("0.5 -0.5 0.5");944 readVertex ("-0.5 0.5 0.5");945 readVertex ("0.5 0.5 0.5");946 readVertex ("-0.5 0.5 -0.5");947 readVertex ("0.5 0.5 -0.5");948 readVertex ("-0.5 -0.5 -0.5");949 readVertex ("0.5 -0.5 -0.5");950 951 readVertexTexture ("0.0 0.0");952 readVertexTexture ("1.0 0.0");953 readVertexTexture ("0.0 1.0");954 readVertexTexture ("1.0 1.0");955 readVertexTexture ("0.0 2.0");956 readVertexTexture ("1.0 2.0");957 readVertexTexture ("0.0 3.0");958 readVertexTexture ("1.0 3.0");959 readVertexTexture ("0.0 4.0");960 readVertexTexture ("1.0 4.0");961 readVertexTexture ("2.0 0.0");962 readVertexTexture ("2.0 1.0");963 readVertexTexture ("-1.0 0.0");964 readVertexTexture ("-1.0 1.0");965 966 readVertexNormal ("0.0 0.0 1.0");967 readVertexNormal ("0.0 0.0 1.0");968 readVertexNormal ("0.0 0.0 1.0");969 readVertexNormal ("0.0 0.0 1.0");970 readVertexNormal ("0.0 1.0 0.0");971 readVertexNormal ("0.0 1.0 0.0");972 readVertexNormal ("0.0 1.0 0.0");973 readVertexNormal ("0.0 1.0 0.0");974 readVertexNormal ("0.0 0.0 -1.0");975 readVertexNormal ("0.0 0.0 -1.0");976 readVertexNormal ("0.0 0.0 -1.0");977 readVertexNormal ("0.0 0.0 -1.0");978 readVertexNormal ("0.0 -1.0 0.0");979 readVertexNormal ("0.0 -1.0 0.0");980 readVertexNormal ("0.0 -1.0 0.0");981 readVertexNormal ("0.0 -1.0 0.0");982 readVertexNormal ("1.0 0.0 0.0");983 readVertexNormal ("1.0 0.0 0.0");984 readVertexNormal ("1.0 0.0 0.0");985 readVertexNormal ("1.0 0.0 0.0");986 readVertexNormal ("-1.0 0.0 0.0");987 readVertexNormal ("-1.0 0.0 0.0");988 readVertexNormal ("-1.0 0.0 0.0");989 readVertexNormal ("-1.0 0.0 0.0");948 this->readVertex ("-0.5 -0.5 0.5"); 949 this->readVertex ("0.5 -0.5 0.5"); 950 this->readVertex ("-0.5 0.5 0.5"); 951 this->readVertex ("0.5 0.5 0.5"); 952 this->readVertex ("-0.5 0.5 -0.5"); 953 this->readVertex ("0.5 0.5 -0.5"); 954 this->readVertex ("-0.5 -0.5 -0.5"); 955 this->readVertex ("0.5 -0.5 -0.5"); 956 957 this->readVertexTexture ("0.0 0.0"); 958 this->readVertexTexture ("1.0 0.0"); 959 this->readVertexTexture ("0.0 1.0"); 960 this->readVertexTexture ("1.0 1.0"); 961 this->readVertexTexture ("0.0 2.0"); 962 this->readVertexTexture ("1.0 2.0"); 963 this->readVertexTexture ("0.0 3.0"); 964 this->readVertexTexture ("1.0 3.0"); 965 this->readVertexTexture ("0.0 4.0"); 966 this->readVertexTexture ("1.0 4.0"); 967 this->readVertexTexture ("2.0 0.0"); 968 this->readVertexTexture ("2.0 1.0"); 969 this->readVertexTexture ("-1.0 0.0"); 970 this->readVertexTexture ("-1.0 1.0"); 971 972 this->readVertexNormal ("0.0 0.0 1.0"); 973 this->readVertexNormal ("0.0 0.0 1.0"); 974 this->readVertexNormal ("0.0 0.0 1.0"); 975 this->readVertexNormal ("0.0 0.0 1.0"); 976 this->readVertexNormal ("0.0 1.0 0.0"); 977 this->readVertexNormal ("0.0 1.0 0.0"); 978 this->readVertexNormal ("0.0 1.0 0.0"); 979 this->readVertexNormal ("0.0 1.0 0.0"); 980 this->readVertexNormal ("0.0 0.0 -1.0"); 981 this->readVertexNormal ("0.0 0.0 -1.0"); 982 this->readVertexNormal ("0.0 0.0 -1.0"); 983 this->readVertexNormal ("0.0 0.0 -1.0"); 984 this->readVertexNormal ("0.0 -1.0 0.0"); 985 this->readVertexNormal ("0.0 -1.0 0.0"); 986 this->readVertexNormal ("0.0 -1.0 0.0"); 987 this->readVertexNormal ("0.0 -1.0 0.0"); 988 this->readVertexNormal ("1.0 0.0 0.0"); 989 this->readVertexNormal ("1.0 0.0 0.0"); 990 this->readVertexNormal ("1.0 0.0 0.0"); 991 this->readVertexNormal ("1.0 0.0 0.0"); 992 this->readVertexNormal ("-1.0 0.0 0.0"); 993 this->readVertexNormal ("-1.0 0.0 0.0"); 994 this->readVertexNormal ("-1.0 0.0 0.0"); 995 this->readVertexNormal ("-1.0 0.0 0.0"); 990 996 991 997 /* normaleLess-testingMode 992 readFace ("1 2 4 3");993 readFace ("3 4 6 5");994 readFace ("5 6 8 7");995 readFace ("7 8 2 1");996 readFace ("2 8 6 4");997 readFace ("7 1 3 5");998 this->readFace ("1 2 4 3"); 999 this->readFace ("3 4 6 5"); 1000 this->readFace ("5 6 8 7"); 1001 this->readFace ("7 8 2 1"); 1002 this->readFace ("2 8 6 4"); 1003 this->readFace ("7 1 3 5"); 998 1004 */ 999 1005 1000 readFace ("1/1/1 2/2/2 4/4/3 3/3/4");1001 readFace ("3/3/5 4/4/6 6/6/7 5/5/8");1002 readFace ("5/5/9 6/6/10 8/8/11 7/7/12");1003 readFace ("7/7/13 8/8/14 2/10/15 1/9/16");1004 readFace ("2/2/17 8/11/18 6/12/19 4/4/20");1005 readFace ("7/13/21 1/1/22 3/3/23 5/14/24");1006 1007 } 1006 this->readFace ("1/1/1 2/2/2 4/4/3 3/3/4"); 1007 this->readFace ("3/3/5 4/4/6 6/6/7 5/5/8"); 1008 this->readFace ("5/5/9 6/6/10 8/8/11 7/7/12"); 1009 this->readFace ("7/7/13 8/8/14 2/10/15 1/9/16"); 1010 this->readFace ("2/2/17 8/11/18 6/12/19 4/4/20"); 1011 this->readFace ("7/13/21 1/1/22 3/3/23 5/14/24"); 1012 1013 }
Note: See TracChangeset
for help on using the changeset viewer.