Changeset 3399 in orxonox.OLD for orxonox/branches/nico/src/importer/framework.cc
- Timestamp:
- Feb 6, 2005, 11:27:25 PM (20 years ago)
- Location:
- orxonox/branches/nico
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/nico
- Property svn:externals set to
-
orxonox/branches/nico/src/importer/framework.cc
r3238 r3399 15 15 16 16 #include "framework.h" 17 17 int verbose; 18 18 void DrawGLScene() 19 19 { … … 52 52 int main(int argc, char *argv[]) 53 53 { 54 int verbose = 3; 55 56 PRINTF(2)("This is The big verbose-Test %i, %s\n", 1, "cool"); 54 verbose = 2; 57 55 58 56 Uint8* keys; // This variable will be used in the keyboard routine … … 71 69 PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h); 72 70 if (argc>=3) 73 obj = new O bject(argv[1], atof(argv[2]));71 obj = new OBJModel (argv[1], atof(argv[2])); 74 72 else if (argc>=2) 75 obj = new O bject(argv[1]);73 obj = new OBJModel(argv[1]); 76 74 else 77 obj = new Object(); 78 75 { 76 // This is an example, of how it is possible, to create a new Model, and adding some vertex-information. 77 // This also packs everything into a DisplayList, and can be handled exactly as any other model. 78 // This is an example of a cube with Texture-Coordinates, but without explicite Vertex-Normals. (they are soft-created). 79 80 obj = (OBJModel*) new Model(); 81 obj->setName("CUBE"); 82 obj->addVertex ("-0.5 -0.5 0.5"); 83 obj->addVertex ("0.5 -0.5 0.5"); 84 obj->addVertex ("-0.5 0.5 0.5"); 85 obj->addVertex ("0.5 0.5 0.5"); 86 obj->addVertex ("-0.5 0.5 -0.5"); 87 obj->addVertex ("0.5 0.5 -0.5"); 88 obj->addVertex ("-0.5 -0.5 -0.5"); 89 obj->addVertex ("0.5 -0.5 -0.5"); 90 91 obj->addVertexTexture ("0.0 0.0"); 92 obj->addVertexTexture ("1.0 0.0"); 93 obj->addVertexTexture ("0.0 1.0"); 94 obj->addVertexTexture ("1.0 1.0"); 95 obj->addVertexTexture ("0.0 2.0"); 96 obj->addVertexTexture ("1.0 2.0"); 97 obj->addVertexTexture ("0.0 3.0"); 98 obj->addVertexTexture ("1.0 3.0"); 99 obj->addVertexTexture ("0.0 4.0"); 100 obj->addVertexTexture ("1.0 4.0"); 101 obj->addVertexTexture ("2.0 0.0"); 102 obj->addVertexTexture ("2.0 1.0"); 103 obj->addVertexTexture ("-1.0 0.0"); 104 obj->addVertexTexture ("-1.0 1.0"); 105 106 obj->addFace ("1 2 4 3"); 107 obj->addFace ("3 4 6 5"); 108 obj->addFace ("5 6 8 7"); 109 obj->addFace ("7 8 2 1"); 110 obj->addFace ("2 8 6 4"); 111 obj->addFace ("7 1 3 5"); 112 obj->finalize(); 113 } 79 114 M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0); 80 115 rotAxis = Vector (0.0,1.0,0.0); … … 215 250 case SDLK_c: 216 251 if (!obj) 217 obj = new O bject(argv[1]);252 obj = new OBJModel(argv[1]); 218 253 break; 219 254 }
Note: See TracChangeset
for help on using the changeset viewer.