Changeset 2760 in orxonox.OLD
- Timestamp:
- Nov 9, 2004, 2:53:29 AM (20 years ago)
- Location:
- orxonox/branches/importer/importer
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/importer/importer/array.cc
r2758 r2760 63 63 } 64 64 65 int Array::getCount() 66 { 67 return entryCount; 68 } 69 65 70 66 71 -
orxonox/branches/importer/importer/array.h
r2758 r2760 14 14 15 15 GLfloat* getArray (); 16 16 int getCount(); 17 17 void debug(void); 18 18 private: -
orxonox/branches/importer/importer/object.cc
r2759 r2760 14 14 glBegin(GL_QUADS); 15 15 16 glArrayElement(0); 17 glArrayElement(1); 16 for (int i=0; i<=faces->getCount();++i) 17 { 18 printf ("%i, %i\n", i, (int) faces->getArray()[i]); 19 glArrayElement((int)faces->getArray()[i] -1); 20 } 21 /* glArrayElement(1); 18 22 glArrayElement(3); 19 23 glArrayElement(2); … … 43 47 glArrayElement(2); 44 48 glArrayElement(4); 45 49 */ 46 50 47 51 … … 70 74 char Buffer[10]; 71 75 vertices = new Array(); 72 76 faces = new Array(); 77 73 78 while (fscanf (OBJ_FILE, "%s", Buffer) != EOF) 74 79 { … … 85 90 } 86 91 } 92 // case we read a Face 93 if (!strcmp (Buffer, "f")) 94 { 95 for (int i=0; i<=3;i++) 96 { 97 char* pointTo; 98 fscanf (OBJ_FILE, "%s", Buffer); 99 pointTo = strstr (Buffer, "/"); 100 pointTo[0] = '\0'; 101 printf ("int: %s\n", Buffer); 102 faces->addEntry(atof(Buffer)); 103 } 104 } 87 105 } 88 106 vertices->finalizeArray(); -
orxonox/branches/importer/importer/object.h
r2757 r2760 18 18 int verticesCount; 19 19 Array* colors; 20 Array* faces; 21 20 22 FILE* OBJ_FILE; 21 23 FILE* MTL_FILE;
Note: See TracChangeset
for help on using the changeset viewer.