Changeset 2768 in orxonox.OLD for orxonox/branches/importer
- Timestamp:
- Nov 9, 2004, 5:31:28 PM (20 years ago)
- Location:
- orxonox/branches/importer/importer
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/importer/importer/framework.cc
r2765 r2768 9 9 void DrawGLScene() 10 10 { 11 rotator +=.0 1;11 rotator +=.001; 12 12 13 13 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); … … 17 17 glLoadIdentity(); 18 18 gluPerspective(45.0f,500/375,0.1f,100.0f); 19 gluLookAt ( 10*sin(rotator),15,10*cos(rotator), 0,0,0, 0,1,0);19 gluLookAt (5*sin(rotator),7.5,5*cos(rotator), 0,0,0, 0,1,0); 20 20 21 21 obj->draw(); -
orxonox/branches/importer/importer/object.cc
r2767 r2768 5 5 initialize(); 6 6 7 importFile (" sphere.obj");7 importFile ("reaphigh.obj"); 8 8 9 9 … … 98 98 { 99 99 readVertices = true; 100 char subbuffer1[ 10];101 char subbuffer2[ 10];102 char subbuffer3[ 10];100 char subbuffer1[20]; 101 char subbuffer2[20]; 102 char subbuffer3[20]; 103 103 sscanf (vertexString, "%s %s %s", subbuffer1, subbuffer2, subbuffer3); 104 104 vertices->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3)); … … 115 115 116 116 readVertices = false; 117 char subbuffer1[ 10];118 char subbuffer2[ 10];119 char subbuffer3[ 10];120 char subbuffer4[ 10] ="";117 char subbuffer1[20]; 118 char subbuffer2[20]; 119 char subbuffer3[20]; 120 char subbuffer4[20] =""; 121 121 sscanf (faceString, "%s %s %s %s", subbuffer1, subbuffer2, subbuffer3, subbuffer4); 122 122 // vertices->addEntry(atof(subbuffer1), atof(subbuffer2), atof(subbuffer3)); … … 132 132 faceMode = 3; 133 133 //printf ("triag: %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3); 134 glArrayElement(atoi(subbuffer1)); 135 glArrayElement(atoi(subbuffer2)); 136 glArrayElement(atoi(subbuffer3)); 137 134 addGLElement(subbuffer1); 135 addGLElement(subbuffer2); 136 addGLElement(subbuffer3); 138 137 return true; 139 138 } … … 147 146 } 148 147 faceMode = 4; 149 //printf ("quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4);150 glArrayElement(atoi(subbuffer1));151 glArrayElement(atoi(subbuffer2));152 glArrayElement(atoi(subbuffer3));153 glArrayElement(atoi(subbuffer4));148 printf ("quad: %s, %s, %s, %s\n", subbuffer1, subbuffer2, subbuffer3, subbuffer4); 149 addGLElement(subbuffer1); 150 addGLElement(subbuffer2); 151 addGLElement(subbuffer3); 152 addGLElement(subbuffer4); 154 153 return true; 155 154 } 156 155 } 156 157 bool Object::addGLElement (char* elementString) 158 { 159 char* pointTo; 160 pointTo = strstr (elementString, "/"); 161 pointTo[0] = '\0'; 162 printf ("f: %s\n", elementString); 163 glArrayElement(atoi(elementString)-1); 164 165 } -
orxonox/branches/importer/importer/object.h
r2767 r2768 35 35 bool readVT (char* vtString); 36 36 37 bool addGLElement (char* elementString); 37 38 };
Note: See TracChangeset
for help on using the changeset viewer.