Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2769 in orxonox.OLD for orxonox/branches


Ignore:
Timestamp:
Nov 9, 2004, 5:43:09 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/importer: simple color-randomizer if new material asked

Location:
orxonox/branches/importer/importer
Files:
2 edited

Legend:

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

    r2768 r2769  
    7878        }
    7979
     80      else if (!strncmp(Buffer, "usemtl", 6))
     81        {
     82          readUseMtl (Buffer+7);
     83        }
    8084      // case vt
    8185      else if (!strncmp(Buffer, "vt ", 2))
     
    146150        }
    147151      faceMode = 4;
    148       printf ("quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
     152      //      printf ("quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);
    149153      addGLElement(subbuffer1);
    150154      addGLElement(subbuffer2);
     
    160164  pointTo = strstr (elementString, "/");
    161165  pointTo[0] = '\0';
    162   printf ("f: %s\n", elementString);
     166  //  printf ("f: %s\n", elementString);
    163167  glArrayElement(atoi(elementString)-1);
    164168
    165169}
     170
     171
     172bool Object::readUseMtl (char* matString)
     173{
     174  if (faceMode != -1)
     175    glEnd();
     176  faceMode = 1;
     177  printf ("%f\n", (float)rand()/2000000000.0);
     178  glColor3f((float)rand()/2000000000.0,(float)rand()/2000000000.0,(float)rand()/2000000000.0);
     179}
  • orxonox/branches/importer/importer/object.h

    r2768 r2769  
    3434  bool readFace (char* faceString);
    3535  bool readVT (char* vtString);
     36  bool readUseMtl (char* matString);
    3637
    3738  bool addGLElement (char* elementString);
Note: See TracChangeset for help on using the changeset viewer.