Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 3195 in orxonox.OLD for orxonox/trunk/importer/object.cc


Ignore:
Timestamp:
Dec 17, 2004, 12:03:30 AM (19 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: this→pointers implemented in classes object, material, array, pathlist

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/object.cc

    r3190 r3195  
    2525{
    2626
    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();
    3434}
    3535
     
    4040Object::Object(char* fileName)
    4141{
    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();
    4949}
    5050
     
    5656Object::Object(char* fileName, float scaling)
    5757{
    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();
    6666}
    6767
     
    7575  if (verbose >= 2)
    7676    printf ("Deleting display Lists.\n");
    77   Group* walker = firstGroup;
     77  Group* walker = this->firstGroup;
    7878  while (walker != NULL)
    7979    {
     
    8484    }
    8585
    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;
    9292
    9393  if (verbose >=2)
    9494    printf("Deleting Materials.\n");
    95   if (material)
    96     delete material;
     95  if (this->material)
     96    delete this->material;
    9797}
    9898
     
    106106  if (verbose >=2)
    107107    printf("drawing the 3D-Objects\n");
    108   Group* walker = firstGroup;
     108  Group* walker = this->firstGroup;
    109109  while (walker != NULL)
    110110    {
     
    124124void Object::draw (int groupNumber) const
    125125{
    126   if (groupNumber >= groupCount)
     126  if (groupNumber >= this->groupCount)
    127127    {
    128128      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);
    130130      return;
    131131    }
    132132  if (verbose >=2)
    133133    printf("drawing the requested 3D-Objects if found.\n");
    134   Group* walker = firstGroup;
     134  Group* walker = this->firstGroup;
    135135  int counter = 0;
    136136  while (walker != NULL)
     
    147147    }
    148148  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);
    150150  return;
    151151
     
    162162  if (verbose >=2)
    163163    printf("drawing the requested 3D-Objects if found.\n");
    164   Group* walker = firstGroup;
     164  Group* walker = this->firstGroup;
    165165  while (walker != NULL)
    166166    {
     
    175175    }
    176176  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);
    178178  return;
    179179}
     
    184184int Object::getGroupCount (void) const
    185185{
    186   return groupCount;
     186  return this->groupCount;
    187187}
    188188
     
    199199
    200200  // 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;
    204204 
    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();
    215215
    216216  return true;
     
    233233
    234234  group->firstFace = new Face;
    235   initFace (group->firstFace);
     235  this->initFace (group->firstFace);
    236236  group->currentFace = group->firstFace;
    237237}
     
    263263    printf("cleaning up the 3D-Object to save Memory.\n");
    264264
    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);
    273273  return true;
    274274}
     
    306306  if (face->firstElem != NULL)
    307307    {
    308       cleanupFaceElement(face->firstElem);
     308      this->cleanupFaceElement(face->firstElem);
    309309      delete face->firstElem;
    310310    }
     
    312312  if (face->next != NULL)
    313313    {
    314       cleanupFace (face->next);
     314      this->cleanupFace (face->next);
    315315      delete face->next;
    316316    }
     
    327327  if (faceElem->next != NULL)
    328328    {
    329       cleanupFaceElement (faceElem->next);
     329      this->cleanupFaceElement (faceElem->next);
    330330      delete faceElem->next;
    331331    }
     
    357357      name = tmpName+1;
    358358    }
    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';
    362362  if (verbose >=2)
    363363    if (strlen(objPath)> 0)
     
    368368      printf("Resolved file %s.\n", name);
    369369 
    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);
    374374  this->readFromObjFile ();
    375375  return true;
     
    383383{
    384384  char* fileName = new char [strlen(objPath)+strlen(objFileName)+1];
    385   if (objFileName != NULL && !strcmp(objFileName, ""))
     385  if (this->objFileName != NULL && !strcmp(this->objFileName, ""))
    386386    return false;
    387   strcpy(fileName, objPath);
    388   strcat(fileName, objFileName);
     387  strcpy(fileName, this->objPath);
     388  strcat(fileName, this->objFileName);
    389389
    390390  ifstream* OBJ_FILE = new ifstream(fileName);
     
    394394        printf ("unable to open .OBJ file: %s\n Loading Box Object instead.\n", fileName);
    395395      BoxObject();
     396      OBJ_FILE->close();
    396397      delete []fileName;
    397       OBJ_FILE->close();
     398      delete OBJ_FILE;
    398399      return false;
    399400    }
     
    405406      OBJ_FILE->getline(Buffer, 10000);
    406407      if (verbose >=4)
    407         printf ("Read input line: %s\n",Buffer);
     408        printf ("Read input line: %s\n", Buffer);
    408409     
    409410
     
    411412      if (!strncmp(Buffer, "v ", 2))
    412413        {
    413           readVertex(Buffer+2);
     414          this->readVertex(Buffer+2);
    414415        }
    415416
     
    417418      else if (!strncmp(Buffer, "f ", 2))
    418419        {
    419           readFace (Buffer+2);
     420          this->readFace (Buffer+2);
    420421        }
    421422     
    422423      else if (!strncmp(Buffer, "mtllib ", 7))
    423424        {
    424           readMtlLib (Buffer+7);
     425          this->readMtlLib (Buffer+7);
    425426        }
    426427
    427428      else if (!strncmp(Buffer, "usemtl ", 7))
    428429        {
    429           readUseMtl (Buffer+7);
     430          this->readUseMtl (Buffer+7);
    430431        }
    431432
    432433      // case VertexNormal
    433434      else if (!strncmp(Buffer, "vn ", 3))
    434       {
    435         readVertexNormal(Buffer+3);
    436       }
    437 
     435        {
     436          this->readVertexNormal(Buffer+3);
     437        }
     438     
    438439      // case VertexTextureCoordinate
    439440      else if (!strncmp(Buffer, "vt ", 3))
    440       {
    441         readVertexTexture(Buffer+3);
    442       }
     441        {
     442          this->readVertexTexture(Buffer+3);
     443        }
    443444      // case group
    444445      else if (!strncmp(Buffer, "g ", 2))
    445446        {
    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
    449450        {
    450451          if (verbose >= 2)
     
    453454    }
    454455  OBJ_FILE->close();
     456  delete OBJ_FILE;
    455457  delete []fileName;
    456458  return true;
     
    469471  if (verbose >=3)
    470472    printf ("Read Group: %s.\n", groupString);
    471   if (groupCount != 0 && currentGroup->faceCount>0)
     473  if (this->groupCount != 0 && this->currentGroup->faceCount>0)
    472474    {
    473475      //      finalizeGroup(currentGroup);
    474       currentGroup = currentGroup->next = new Group;
    475       initGroup(currentGroup);
     476      this->currentGroup = this->currentGroup->next = new Group;
     477      this->initGroup(this->currentGroup);
    476478    }
    477479  // setting the group name if not default.
    478480  if (strcmp(groupString, "default"))
    479481    {
    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;
    484486
    485487}
     
    499501  if (verbose >= 3)
    500502    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);
    502504  return true;
    503505}
     
    512514bool Object::readFace (char* faceString)
    513515{
    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;
    519521  tmpElem->next = NULL;
    520522  while(strcmp (faceString, "\0"))
    521523    {
    522       if (currentGroup->currentFace->vertexCount>0)
     524      if (this->currentGroup->currentFace->vertexCount>0)
    523525          tmpElem = tmpElem->next = new FaceElement;
    524526      tmpElem->next = NULL;
     
    561563      if (strcmp (faceString, "\0"))
    562564        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;
    567569}
    568570
     
    581583  if (verbose >=3 )
    582584    printf("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    583   normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
     585  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
    584586  return true;
    585587}
     
    599601  if (verbose >=3 )
    600602    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);
    603605  return true;
    604606}
     
    615617bool Object::readMtlLib (char* mtlFile)
    616618{
    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);
    622624 
    623625
     
    630632      if (verbose >= 1)
    631633        printf ("unable to open file: %s\n", fileName);
     634      MTL_FILE->close();
    632635      delete []fileName;
    633       MTL_FILE->close();
     636      delete MTL_FILE;
    634637      return false;
    635638    }
     
    704707
    705708    }
     709  MTL_FILE->close();
    706710  delete []fileName;
     711  delete MTL_FILE;
    707712  return true;
    708713}
     
    714719bool Object::readUseMtl (char* matString)
    715720{
    716   if (!mtlFileName)
     721  if (!this->mtlFileName)
    717722    {
    718723      if (verbose >= 1)
     
    721726    }
    722727     
    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);
    726731 
    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);
    729734 
    730   if (currentGroup->faceCount == 0)
    731     currentGroup->faceCount ++;
     735  if (this->currentGroup->faceCount == 0)
     736    this->currentGroup->faceCount ++;
    732737
    733738}
     
    740745
    741746  // finalize the Arrays
    742   vertices->finalizeArray();
    743   vTexture->finalizeArray();
     747  this->vertices->finalizeArray();
     748  this->vTexture->finalizeArray();
    744749  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)
    751756    {
    752757
    753758      // creating a glList for the Group
    754       if ((currentGroup->listNumber = glGenLists(1)) == 0)
     759      if ((this->currentGroup->listNumber = glGenLists(1)) == 0)
    755760        {
    756761          printf ("list could not be created for this Object\n");
    757762          return false;
    758763        }
    759       glNewList (currentGroup->listNumber, GL_COMPILE);
     764      glNewList (this->currentGroup->listNumber, GL_COMPILE);
    760765
    761766      // Putting Faces to GL
    762       Face* tmpFace = currentGroup->firstFace;
     767      Face* tmpFace = this->currentGroup->firstFace;
    763768      while (tmpFace != NULL)
    764769        {
    765770          if (tmpFace->vertexCount == 0 && tmpFace->materialString != NULL)
    766771            {
    767               if (currentGroup->faceMode != -1)
     772              if (this->currentGroup->faceMode != -1)
    768773                glEnd();
    769               currentGroup->faceMode = 0;
     774              this->currentGroup->faceMode = 0;
    770775              if (verbose >= 2)
    771776                printf ("using material %s for coming Faces.\n", tmpFace->materialString);
     
    778783          else if (tmpFace->vertexCount == 3)
    779784            {
    780               if (currentGroup->faceMode != 3)
     785              if (this->currentGroup->faceMode != 3)
    781786                {
    782                   if (currentGroup->faceMode != -1)
     787                  if (this->currentGroup->faceMode != -1)
    783788                    glEnd();
    784789                  glBegin(GL_TRIANGLES);
    785790                }
    786791             
    787               currentGroup->faceMode = 3;
     792              this->currentGroup->faceMode = 3;
    788793              if (verbose >=3)
    789794                printf ("found triag.\n");
     
    792797          else if (tmpFace->vertexCount == 4)
    793798            {
    794               if (currentGroup->faceMode != 4)
     799              if (this->currentGroup->faceMode != 4)
    795800                {
    796                   if (currentGroup->faceMode != -1)
     801                  if (this->currentGroup->faceMode != -1)
    797802                    glEnd();
    798803                  glBegin(GL_QUADS);
    799804                }
    800               currentGroup->faceMode = 4;
     805              this->currentGroup->faceMode = 4;
    801806              if (verbose >=3 )
    802807                printf ("found quad.\n");
     
    805810          else if (tmpFace->vertexCount > 4)
    806811            {
    807               if (currentGroup->faceMode != -1)
     812              if (this->currentGroup->faceMode != -1)
    808813                glEnd();
    809814              glBegin(GL_POLYGON);
    810815              if (verbose >=3)
    811816                printf ("Polygon with %i faces found.", tmpFace->vertexCount);
    812               currentGroup->faceMode = tmpFace->vertexCount;
     817              this->currentGroup->faceMode = tmpFace->vertexCount;
    813818            }
    814819         
     
    817822            {
    818823              //      printf ("%s\n", tmpElem->value);
    819               addGLElement(tmpElem);
     824              this->addGLElement(tmpElem);
    820825              tmpElem = tmpElem->next;
    821826            }
     
    824829      glEnd();
    825830      glEndList();
    826       currentGroup = currentGroup->next;
     831
     832      this->currentGroup = this->currentGroup->next;
    827833    }
    828834}
     
    844850
    845851  if (elem->texCoordNumber != -1)
    846     glTexCoord2fv(vTexture->getArray() + elem->texCoordNumber * 2);
     852    glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2);
    847853  if (elem->normalNumber != -1)
    848     glNormal3fv(normals->getArray() + elem->normalNumber * 3);
     854    glNormal3fv(this->normals->getArray() + elem->normalNumber * 3);
    849855  if (elem->vertexNumber != -1)
    850     glVertex3fv(vertices->getArray() + elem->vertexNumber * 3);
     856    glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
    851857
    852858}
     
    925931        printf ("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    926932
    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);
    928934
    929935    }
     
    940946void Object::BoxObject(void)
    941947{
    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");
    990996
    991997  /* 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");
    9981004  */
    9991005
    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.