Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Feb 6, 2005, 11:27:25 PM (20 years ago)
Author:
bensch
Message:

orxonox/branches/nico: merged trunk into branches/nico
merged with command:
svn merge ../trunk/ nico/ -r 3238:HEAD
resolved conflict in favor of branches/nico.

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  
    1515
    1616#include "framework.h"
    17 
     17int verbose;
    1818void DrawGLScene()
    1919{
     
    5252int main(int argc, char *argv[])
    5353{
    54   int verbose = 3;
    55 
    56   PRINTF(2)("This is The big verbose-Test %i, %s\n", 1, "cool");
     54  verbose = 2;
    5755
    5856  Uint8* keys; // This variable will be used in the keyboard routine
     
    7169  PRINTF(2)("screensize: %i, %i\n", wHandler.screen->w, wHandler.screen->h);
    7270  if (argc>=3)
    73     obj = new Object (argv[1], atof(argv[2]));
     71    obj = new OBJModel (argv[1], atof(argv[2]));
    7472  else if (argc>=2)
    75     obj = new Object(argv[1]);
     73    obj = new OBJModel(argv[1]);
    7674  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    }
    79114  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
    80115  rotAxis = Vector (0.0,1.0,0.0);
     
    215250          case SDLK_c:
    216251            if (!obj)
    217               obj = new Object(argv[1]);
     252              obj = new OBJModel(argv[1]);
    218253            break;
    219254          }
Note: See TracChangeset for help on using the changeset viewer.