Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2932 in orxonox.OLD for orxonox/trunk


Ignore:
Timestamp:
Nov 20, 2004, 3:00:24 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk/importer: added vectors from src. better caseCheck-in object.cc::addGLElement

Location:
orxonox/trunk/importer
Files:
5 edited
2 copied

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/importer/Makefile.am

    r2931 r2932  
    66
    77bin_PROGRAMS=importer
    8 importer_SOURCES=framework.cc windowHandler.cc object.cc array.cc material.cc
     8importer_SOURCES=framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
    99
    10 noinst_HEADERS=framework.h windowHandler.h object.h array.h material.h
     10noinst_HEADERS=framework.h windowHandler.h  vector.h object.h array.h material.h
    1111
    1212
  • orxonox/trunk/importer/Makefile.in

    r2931 r2932  
    5353PROGRAMS = $(bin_PROGRAMS)
    5454am_importer_OBJECTS = framework.$(OBJEXT) windowHandler.$(OBJEXT) \
    55         object.$(OBJEXT) array.$(OBJEXT) material.$(OBJEXT)
     55        vector.$(OBJEXT) object.$(OBJEXT) array.$(OBJEXT) \
     56        material.$(OBJEXT)
    5657importer_OBJECTS = $(am_importer_OBJECTS)
    5758importer_LDADD = $(LDADD)
     
    6162@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/framework.Po \
    6263@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/object.Po \
    63 @AMDEP_TRUE@    ./$(DEPDIR)/windowHandler.Po
     64@AMDEP_TRUE@    ./$(DEPDIR)/vector.Po ./$(DEPDIR)/windowHandler.Po
    6465CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    6566        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    151152AM_CXXFLAGS = "-I/usr/X11R6/include"
    152153AM_LDFLAGS = "-L/usr/Mesa-6.0.1/lib  -L/usr/X11R6/lib -lXt -lX11" $(MWINDOWS)
    153 importer_SOURCES = framework.cc windowHandler.cc object.cc array.cc material.cc
    154 noinst_HEADERS = framework.h windowHandler.h object.h array.h material.h
     154importer_SOURCES = framework.cc windowHandler.cc vector.cc object.cc array.cc material.cc
     155noinst_HEADERS = framework.h windowHandler.h  vector.h object.h array.h material.h
    155156all: all-am
    156157
     
    223224@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
    224225@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/object.Po@am__quote@
     226@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    225227@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windowHandler.Po@am__quote@
    226228
  • orxonox/trunk/importer/framework.cc

    r2931 r2932  
    11#include "framework.h"
    22
    3 int verbose = 1;
     3int verbose = 4;
    44
    55void DrawGLScene()
     
    8282        break;
    8383      case SDL_MOUSEBUTTONDOWN:
    84         printf("MouseButton %d pressed at (%d,%d).\n",
    85                event.button.button, event.button.x, event.button.y);
    86         rotatorV = ( 250-event.button.x) / 500.0 /100;
    87        
     84        if (event.button.button == 4)
     85          printf("MouseWheel up\n");
     86        else if (event.button.button == 5)
     87          printf("MouseWheel down\n");
     88        else
     89          {
     90            printf("MouseButton %d pressed at (%d,%d).\n",
     91                   event.button.button, event.button.x, event.button.y);
     92            rotatorV = ( 250-event.button.x) / 500.0 /100;
     93          }
     94           
    8895        break;
    89       case SDL_MOUSEBUTTONUP:
     96            /*      case SDL_MOUSEBUTTONUP:
    9097        printf("MouseButton %d released at (%d,%d).\n",
    9198               event.button.button, event.button.x, event.button.y);
    92 
    93        
    9499        break;
    95 
     100            */
    96101        // If a quit event was recieved
    97102      case SDL_QUIT:
  • orxonox/trunk/importer/framework.h

    r2931 r2932  
    44#include "windowHandler.h" // Include the Whandler Basecode
    55#include "object.h"
    6 
     6#include "vector.h"
    77
    88float rotatorP;
  • orxonox/trunk/importer/object.cc

    r2931 r2932  
    442442
    443443  char* texture;
    444   texture = strstr (vertex, "/");
    445   texture[0] = '\0';
    446   texture ++;
    447   if (verbose>=3)
    448     printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
    449   glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
    450 
    451   char* normal;
    452   if ((normal = strstr (texture, "/")) !=NULL)
    453     {
    454       normal[0] = '\0';
    455       normal ++;
    456       //glArrayElement(atoi(vertex)-1);
    457       glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     444  if ((texture = strstr (vertex, "/")) != NULL)
     445    {
     446      texture[0] = '\0';
     447      texture ++;
     448      if (verbose>=3)
     449        printf ("includeing texture #%i, and mapping it to group texture #%i, textureArray has %i entries.\n", atoi(texture), (atoi(texture)-1 - currentGroup->firstVertexTexture)*3, currentGroup->vTexture->getCount());
     450      glTexCoord2fv(currentGroup->vTexture->getArray()+(atoi(texture)-1 - currentGroup->firstVertexTexture)*2);
     451
     452      char* normal;
     453      if ((normal = strstr (texture, "/")) !=NULL)
     454        {
     455          normal[0] = '\0';
     456          normal ++;
     457          //glArrayElement(atoi(vertex)-1);
     458          glNormal3fv(currentGroup->normals->getArray() +(atoi(normal)-1 - currentGroup->firstNormal)*3);
     459        }
    458460    }
    459461  if (verbose>=3)
Note: See TracChangeset for help on using the changeset viewer.