Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Apr 7, 2005, 3:54:49 PM (19 years ago)
Author:
chris
Message:

orxonox/branches/levelloader: Merged trunk into branch… still not working though…

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/branches/levelloader/src/lib/graphics/importer/framework.cc

    r3499 r3746  
    1717
    1818#include "vector.h"
     19
     20#include "primitive_model.h"
     21
    1922
    2023int verbose;
     
    7679    obj = new OBJModel(argv[1]);
    7780  else
    78     {
    79       // This is an example, of how it is possible, to create a new Model, and adding some vertex-information.
    80       // This also packs everything into a DisplayList, and can be handled exactly as any other model.
    81       // This is an example of a cube with Texture-Coordinates, but without explicite Vertex-Normals. (they are soft-created).
    82       /*
    83       obj = (OBJModel*) new Model();
    84       obj->setName("CUBE");
    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       obj->addVertex (0.5, 0.5, -0.5);
    91       obj->addVertex (-0.5, -0.5, -0.5);
    92       obj->addVertex (0.5, -0.5, -0.5);
    93      
    94       obj->addVertexTexture (0.0, 0.0);
    95       obj->addVertexTexture (1.0, 0.0);
    96       obj->addVertexTexture (0.0, 1.0);
    97       obj->addVertexTexture (1.0, 1.0);
    98       obj->addVertexTexture (0.0, 2.0);
    99       obj->addVertexTexture (1.0, 2.0);
    100       obj->addVertexTexture (0.0, 3.0);
    101       obj->addVertexTexture (1.0, 3.0);
    102       obj->addVertexTexture (0.0, 4.0);
    103       obj->addVertexTexture (1.0, 4.0);
    104       obj->addVertexTexture (2.0, 0.0);
    105       obj->addVertexTexture (2.0, 1.0);
    106       obj->addVertexTexture (-1.0, 0.0);
    107       obj->addVertexTexture (-1.0, 1.0);
    108 
    109       obj->addFace ("1 2 4 3");
    110       obj->addFace ("3 4 6 5");
    111       obj->addFace ("5 6 8 7");
    112       obj->addFace ("7 8 2 1");
    113       obj->addFace ("2 8 6 4");
    114       obj->addFace ("7 1 3 5");
    115       obj->finalize();
    116       */
    117       obj = (OBJModel*) new Model(CYLINDER);
    118     }
     81    obj = new PrimitiveModel(SPHERE);
     82
    11983  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
    12084  rotAxis = Vector (0.0,1.0,0.0);
     
    166130      switch (event.type) {
    167131      case SDL_MOUSEMOTION:
    168         PRINTF(3)("Mouse motion about %d,%d Pixels to (%d,%d).\n",
     132        PRINTF(4)("Mouse motion about %d,%d Pixels to (%d,%d).\n",
    169133                  event.motion.xrel, event.motion.yrel,
    170134                  event.motion.x, event.motion.y);
     
    205169        if (event.button.button == 4)
    206170          {
    207             PRINTF(0)("MouseWheel up\n");
     171            PRINTF(4)("MouseWheel up\n");
    208172            zoomTo *= .5;
    209173          }
    210174        else if (event.button.button == 5)
    211175          {
    212             PRINTF(2)("MouseWheel down\n");
     176            PRINTF(4)("MouseWheel down\n");
    213177            zoomTo *= 2.0;
    214178          }
     
    240204        else
    241205            {
    242               PRINTF(2)("MouseButton %d released at (%d,%d).\n",
     206              PRINTF(4)("MouseButton %d released at (%d,%d).\n",
    243207                        event.button.button, event.button.x, event.button.y);
    244208            }
Note: See TracChangeset for help on using the changeset viewer.