Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 4194 in orxonox.OLD for orxonox/branches/openAL/src/lib


Ignore:
Timestamp:
May 16, 2005, 1:33:19 PM (19 years ago)
Author:
bensch
Message:

orxonox/branches/openAL: merged trunk back to openAL
merged with command:

svn merge ../trunk/ openAL/ -r 3920:HEAD

no conflicts at all

Location:
orxonox/branches/openAL
Files:
20 deleted
30 edited
38 copied

Legend:

Unmodified
Added
Removed
  • orxonox/branches/openAL

    • Property svn:externals
      •  

        old new  
        1 data http://svn.orxonox.ethz.ch/data
         1
  • orxonox/branches/openAL/src/lib/Makefile.in

    r3789 r4194  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
     116RANLIB = @RANLIB@
    119117SET_MAKE = @SET_MAKE@
    120118SHELL = @SHELL@
     
    125123ac_ct_CC = @ac_ct_CC@
    126124ac_ct_CXX = @ac_ct_CXX@
     125ac_ct_RANLIB = @ac_ct_RANLIB@
    127126ac_ct_STRIP = @ac_ct_STRIP@
    128127am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/openAL/src/lib/coord/null_parent.cc

    r3809 r4194  
    5454  this->parent = this;
    5555  this->mode = PNODE_ALL;
    56   *this->absCoordinate = absCoordinate;
     56  this->absCoordinate = absCoordinate;
    5757  this->setName("NullParent");
    5858}
     
    8080{
    8181
    82   PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate->x, this->absCoordinate->y, this->absCoordinate->z);
    83   *this->absCoordinate = *this->relCoordinate;
    84   *this->absDirection = parent->getAbsDir () * *this->relDirection;
     82  PRINTF(4)("NullParent::update - (%f, %f, %f)\n", this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
     83  this->absCoordinate = this->relCoordinate;
     84  this->absDirection = parent->getAbsDir () * this->relDirection;
    8585
    8686  tIterator<PNode>* iterator = this->children->getIterator();
  • orxonox/branches/openAL/src/lib/coord/p_node.cc

    r3860 r4194  
    6060  this->init(parent);
    6161
    62   *this->absCoordinate = absCoordinate;
     62  this->absCoordinate = absCoordinate;
    6363
    6464  if (likely(parent != NULL))
    6565  {
    66     *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
     66    this->relCoordinate = this->absCoordinate - parent->getAbsCoor();
    6767    parent->addChild (this);
    6868  }
    69   else
    70     this->relCoordinate = new Vector();
    7169}
    7270
     
    8987  delete []this->objectName;
    9088
    91   delete this->relCoordinate;
    92   delete this->absCoordinate;
    93   delete this->relDirection;
    94   delete this->absDirection;
    95   delete this->lastAbsCoordinate;
    96   delete this->diffCoordinate;
    9789}
    9890
     
    10799  this->parent = parent;
    108100  this->objectName = NULL;
    109   this->time = 1.0; /* set time to 1 to make divisions by zero impossible */
    110 
    111   this->absCoordinate = new Vector();
    112   this->relCoordinate = new Vector();
    113   this->absDirection = new Quaternion();
    114   this->relDirection = new Quaternion();
    115   this->lastAbsCoordinate = new Vector();
    116   this->diffCoordinate = new Vector();
    117101}
    118102
     
    158142{
    159143  this->bRelCoorChanged = true;
    160   *this->relCoordinate = relCoord;
     144  this->relCoordinate = relCoord;
    161145}
    162146
     
    182166{
    183167  this->bAbsCoorChanged = true;
    184   *this->absCoordinate = absCoord;
     168  this->absCoordinate = absCoord;
    185169}
    186170
     
    211195  if( unlikely(this->bAbsCoorChanged))
    212196    {
    213       *this->absCoordinate = *this->absCoordinate + shift;
     197      this->absCoordinate += shift;
    214198    }
    215199  else
    216200    {
    217       *this->relCoordinate = *this->relCoordinate + shift;
     201      this->relCoordinate += shift;
    218202      this->bRelCoorChanged = true;
    219203    }
     
    241225{
    242226  this->bRelCoorChanged = true;
    243   *this->relDirection = relDir;
     227  this->relDirection = relDir;
    244228}
    245229
     
    264248{
    265249  this->bAbsDirChanged = true;
    266   *this->absDirection = absDir;
     250  this->absDirection = absDir;
    267251}
    268252
     
    293277{
    294278  this->bRelDirChanged = true;
    295   *this->relDirection = *this->relDirection * shift;
    296 }
    297 
    298 
    299 
    300 /**
    301    \brief this calculates the current movement speed of the node
    302 */
    303 float PNode::getSpeed() const
    304 {
    305   *this->diffCoordinate = *this->absCoordinate - *this->lastAbsCoordinate;
    306   return this->diffCoordinate->len() / this->time;
    307 }
    308 
     279  this->relDirection = this->relDirection * shift;
     280}
    309281
    310282/**
     
    432404void PNode::update (float dt)
    433405{
    434   *this->lastAbsCoordinate = *this->absCoordinate;
    435   this->time = dt;
    436   PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate->x, this->absCoordinate->y, this->absCoordinate->z);
     406  this->lastAbsCoordinate = this->absCoordinate;
     407
     408  PRINTF(4)("PNode::update - %s - (%f, %f, %f)\n", this->objectName, this->absCoordinate.x, this->absCoordinate.y, this->absCoordinate.z);
    437409
    438410
     
    442414        {
    443415          /* if you have set the absolute coordinates this overrides all other changes */
    444           *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
     416          this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
    445417        }
    446418      if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
     
    455427            }
    456428            else */
    457           *this->absCoordinate = parent->getAbsCoor() + *this->relCoordinate;         /* update the current absCoordinate */
     429          this->absCoordinate = parent->getAbsCoor() + this->relCoordinate;           /* update the current absCoordinate */
    458430        }
    459431    }
     
    464436        {
    465437          /* if you have set the absolute coordinates this overrides all other changes */
    466           *this->relDirection = *this->absDirection - parent->getAbsDir();
     438          this->relDirection = this->absDirection - parent->getAbsDir();
    467439        }
    468440      else if( likely(this->bRelDirChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
    469441        {
    470442          /* update the current absDirection - remember * means rotation around sth.*/
    471           *this->absDirection = parent->getAbsDir() * *this->relDirection;
     443          this->absDirection = parent->getAbsDir() * this->relDirection;
    472444        }
    473445    }
     
    478450        {
    479451          /* if you have set the absolute coordinates this overrides all other changes */
    480           *this->relCoordinate = *this->absCoordinate - parent->getAbsCoor ();
     452          this->relCoordinate = this->absCoordinate - parent->getAbsCoor ();
    481453        }
    482454      else if( likely(this->bRelCoorChanged) /*&& this->timeStamp != DataTank::timeStamp*/)
     
    486458            *this->absCoordinate = *this->relCoordinate;
    487459            else*/
    488           *this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(*this->relCoordinate);              /* update the current absCoordinate */
     460          this->absCoordinate = parent->getAbsCoor() + parent->getAbsDir().apply(this->relCoordinate);        /* update the current absCoordinate */
    489461        }
    490462    }
     
    508480  delete iterator;
    509481
     482  this->velocity = (this->absCoordinate - this->lastAbsCoordinate) / dt;
    510483  this->timeStamp = timeStamp;
    511484  this->bRelCoorChanged = false;
     
    540513{
    541514  PRINTF(2)("PNode::debug() - absCoord: (%f, %f, %f)\n",
    542          this->absCoordinate->x,
    543          this->absCoordinate->y,
    544          this->absCoordinate->z);
     515         this->absCoordinate.x,
     516         this->absCoordinate.y,
     517         this->absCoordinate.z);
    545518}
    546519
     
    551524  for debug purposes realy usefull, not used to work properly
    552525*/
    553 void PNode::setName (char* newName)
     526void PNode::setName (const char* newName)
    554527{
    555528  this->objectName = new char[strlen(newName)+1];
     
    561534  \brief gets the name of the node
    562535*/
    563 char* PNode::getName ()
     536const char* PNode::getName ()
    564537{
    565538  return this->objectName;
  • orxonox/branches/openAL/src/lib/coord/p_node.h

    r3813 r4194  
    5757
    5858
    59   inline Vector* getRelCoor () const { return this->relCoordinate; }
     59  inline const Vector& getRelCoor () const { return this->relCoordinate; }
    6060  void setRelCoor (const Vector& relCoord);
    61   inline Vector getAbsCoor () const { return *this->absCoordinate; }
     61  inline const Vector& getAbsCoor () const { return this->absCoordinate; }
    6262  void setAbsCoor (const Vector& absCoord);
    6363  void shiftCoor (const Vector& shift);
    6464
    65   inline Quaternion getRelDir () const { return *this->relDirection; }
     65  inline const Quaternion& getRelDir () const { return this->relDirection; }
    6666  void setRelDir (const Quaternion& relDir);
    67   inline Quaternion getAbsDir () const { return *this->absDirection; }
     67  inline const Quaternion& getAbsDir () const { return this->absDirection; }
    6868  void setAbsDir (const Quaternion& absDir);
    6969  void shiftDir (const Quaternion& shift);
    7070
    71   float getSpeed() const;
     71  /** \returns the Speed of the Node */
     72  inline float getSpeed() const {return this->velocity.len()/1000;} //! \FIX THIS SHOULD NOT BE /1000
     73  /** \returns the Velocity of the Node */
     74  inline const Vector& getVelocity() const {return this->velocity;}
    7275
    7376  void addChild (PNode* pNode, int parentingMode = DEFAULT_MODE);
     
    8588  void processTick (float dt);
    8689
    87   void setName (char* newName);
    88   char* getName ();
     90  void setName (const char* newName);
     91  const char* getName ();
    8992
    9093
     
    99102  bool bRelDirChanged;     //!< If Relative Direction has changed since last time we checked
    100103
    101   Vector* relCoordinate;    //!< coordinates relative to the parent
    102   Vector* absCoordinate;    //!< absolute coordinates in the world ( from (0,0,0) )
    103   Quaternion* relDirection; //!< direction relative to the parent
    104   Quaternion* absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
     104  Vector relCoordinate;    //!< coordinates relative to the parent
     105  Vector absCoordinate;    //!< absolute coordinates in the world ( from (0,0,0) )
     106  Quaternion relDirection; //!< direction relative to the parent
     107  Quaternion absDirection; //!< absolute direvtion in the world ( from (0,0,1) )
    105108
    106109  int mode;                //!< the mode of the binding
     
    109112  void init(PNode* parent);
    110113
    111   Vector* lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    112   Vector* diffCoordinate;    //!< this is stored here for performance reasons, difference to the last vector
    113   float time;                //!< time since last update
     114  Vector velocity;          //!< Saves the velocity.
     115  Vector lastAbsCoordinate; //!< this is used for speedcalculation, it stores the last coordinate
    114116};
    115117
  • orxonox/branches/openAL/src/lib/graphics/Makefile.in

    r3789 r4194  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
     116RANLIB = @RANLIB@
    119117SET_MAKE = @SET_MAKE@
    120118SHELL = @SHELL@
     
    125123ac_ct_CC = @ac_ct_CC@
    126124ac_ct_CXX = @ac_ct_CXX@
     125ac_ct_RANLIB = @ac_ct_RANLIB@
    127126ac_ct_STRIP = @ac_ct_STRIP@
    128127am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/openAL/src/lib/graphics/graphics_engine.cc

    r3844 r4194  
    1717
    1818#include "graphics_engine.h"
     19#include "resource_manager.h"
    1920
    2021#include "debug.h"
     
    3031{
    3132  this->setClassName ("GraphicsEngine");
     33
     34  this->fullscreen = false;
     35
    3236  this->initVideo();
    3337
     
    101105 
    102106  // TO DO: Create a cool icon and use it here
    103   SDL_WM_SetIcon(SDL_LoadBMP("../data/pictures/orxonox-icon32x32.bmp"), NULL); 
    104 
     107  char* loadPic = new char[strlen(ResourceManager::getInstance()->getDataDir())+ 100];
     108  sprintf(loadPic, "%s%s", ResourceManager::getInstance()->getDataDir(),  "pictures/orxonox-icon32x32.bmp");
     109  SDL_WM_SetIcon(SDL_LoadBMP(loadPic), NULL); 
     110  delete loadPic;
    105111  // Enable default GL stuff
    106112  glEnable(GL_DEPTH_TEST);
     
    137143int GraphicsEngine::setResolution(int width, int height, int bpp)
    138144{
     145  Uint32 fullscreenFlag;
    139146  this->resolutionX = width;
    140147  this->resolutionY = height;
    141148  this->bitsPerPixel = bpp;
     149  if (this->fullscreen)
     150    fullscreenFlag = SDL_FULLSCREEN;
     151  else
     152    fullscreenFlag = 0;
    142153 
    143154  printf ("ok\n");
    144   if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags)) == NULL)
     155  if((this->screen = SDL_SetVideoMode(this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags | fullscreenFlag)) == NULL)
    145156    {
    146157      PRINTF(1)("Could not SDL_SetVideoMode(%d, %d, %d, %d): %s\n", this->resolutionX, this->resolutionY, this->bitsPerPixel, this->videoFlags, SDL_GetError());
     
    148159      //    return -1;
    149160    }
    150 
     161}
     162
     163void GraphicsEngine::setFullscreen(bool fullscreen)
     164{
     165  this->fullscreen = fullscreen;
     166  this->setResolution(this->resolutionX, this->resolutionY, this->bitsPerPixel);
    151167}
    152168
     
    254270  /* Check if our resolution is restricted */
    255271  if(this->videoModes == (SDL_Rect **)-1){
    256     PRINTF(1)("All resolutions available.\n");
     272    PRINTF(2)("All resolutions available.\n");
    257273  }
    258274  else{
     
    260276    PRINT(0)("Available Resoulution Modes are\n");
    261277    for(int i = 0; this->videoModes[i]; ++i)
    262       PRINT(0)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
     278      PRINT(4)(" |  %d x %d\n", this->videoModes[i]->w, this->videoModes[i]->h);
    263279  }
    264280 
  • orxonox/branches/openAL/src/lib/graphics/graphics_engine.h

    r3844 r4194  
    2626  int setGLattribs(void);
    2727  int setResolution(int width, int height, int bpp);
     28  void setFullscreen(bool fullscreen = false);
    2829  /** \returns the x resolution */
    2930  inline int getResolutionX(void) {return this->resolutionX;}
  • orxonox/branches/openAL/src/lib/graphics/importer/Makefile.in

    r3907 r4194  
    119119EXEEXT = @EXEEXT@
    120120GPROF = @GPROF@
    121 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    122 GTHREAD_LIBS = @GTHREAD_LIBS@
    123121GTK2_CFLAGS = @GTK2_CFLAGS@
    124122GTK2_LIBS = @GTK2_LIBS@
    125123HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    126124HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    127 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    128 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    129125HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    130126HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    147143PACKAGE_VERSION = @PACKAGE_VERSION@
    148144PATH_SEPARATOR = @PATH_SEPARATOR@
     145PKG_CONFIG = @PKG_CONFIG@
     146RANLIB = @RANLIB@
    149147SET_MAKE = @SET_MAKE@
    150148SHELL = @SHELL@
     
    155153ac_ct_CC = @ac_ct_CC@
    156154ac_ct_CXX = @ac_ct_CXX@
     155ac_ct_RANLIB = @ac_ct_RANLIB@
    157156ac_ct_STRIP = @ac_ct_STRIP@
    158157am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/openAL/src/lib/graphics/importer/array.cc

    r3590 r4194  
    112112 
    113113/**
    114    \brief Gives back the array !! MUST be executed AFTER finalize.
    115    \returns The created array.
    116 */
    117 GLfloat* Array::getArray ()
    118 {
    119   return this->array;
    120 }
    121 
    122 /**
    123    \returns The Count of entries in the Array
    124 */
    125 int Array::getCount()
    126 {
    127   return this->entryCount;
    128 }
    129 
    130 /**
    131114   \brief Simple debug info about the Array
    132115*/
    133 void Array::debug ()
     116void Array::debug (void) const
    134117{
    135118  PRINT(0)("entryCount=%i, address=%p\n", this->entryCount, this->array);
  • orxonox/branches/openAL/src/lib/graphics/importer/array.h

    r3590 r4194  
    2323  void addEntry(GLfloat entry0, GLfloat entry1, GLfloat entry2);
    2424 
    25   GLfloat* getArray ();
    26   int getCount();
    27   void debug(void);
     25  /** \returns The array */
     26  inline const GLfloat* getArray () const {return this->array;}
     27  /**   \returns The Count of entries in the Array*/
     28  inline int getCount(void)const {return this->entryCount;}
     29  void debug(void) const ;
    2830 private:
    2931  //! One entry of the Array
  • orxonox/branches/openAL/src/lib/graphics/importer/framework.cc

    r3910 r4194  
    7979    obj = new OBJModel(argv[1]);
    8080  else
    81     obj = new PrimitiveModel(SPHERE);
     81    obj = new PrimitiveModel(CYLINDER);
    8282
    8383  M = Vector(wHandler.screen->w/2, wHandler.screen->h/2, 0);
  • orxonox/branches/openAL/src/lib/graphics/importer/material.cc

    r3914 r4194  
    4545  this->setTransparency(1.0);
    4646
    47 
    4847  this->diffuseTexture = NULL;
    4948  this->ambientTexture = NULL;
    5049  this->specularTexture = NULL;
    51 
    52   this->diffuseTextureSet = false;
    53   this->ambientTextureSet = false;
    54   this->specularTextureSet = false;
    5550
    5651  this->setName(mtlName);
     
    8883 
    8984  // setting the transparency
    90   if (this->transparency == 1.0)
    91     {
    92       glDisable(GL_BLEND);
    93     }
    94   else
     85  if (this->transparency < 1.0)
    9586    {
    9687      glEnable(GL_BLEND);
     
    9889      glBlendFunc(GL_SRC_ALPHA, GL_ONE);
    9990    }
     91  else
     92    {
     93      glDisable(GL_BLEND);
     94      glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
     95    }
     96
    10097
    10198  // setting illumination Model
     
    105102    glShadeModel(GL_SMOOTH);
    106103
    107   if (this->diffuseTextureSet)
     104  if (this->diffuseTexture)
    108105    {
    109106      glEnable(GL_TEXTURE_2D);
    110107      glBindTexture(GL_TEXTURE_2D, this->diffuseTexture->getTexture());
     108
     109      /* This allows alpha blending of 2D textures with the scene */
     110      if (this->diffuseTexture->hasAlpha())
     111        {
     112          glEnable(GL_BLEND);
     113          glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
     114        }
    111115    }
    112116  else
     
    291295{
    292296  PRINTF(4)("setting Diffuse Map %s\n", dMap);
    293   //    diffuseTexture = new Texture();
    294   //    this->diffuseTextureSet = diffuseTexture->loadImage(dMap);
    295297
    296298  //! \todo check if RESOURCE MANAGER is availiable
    297299  //! \todo Textures from .mtl-file need special care.
    298   this->diffuseTextureSet = this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
     300  this->diffuseTexture = (Texture*)ResourceManager::getInstance()->load(dMap, IMAGE);
    299301}
    300302
  • orxonox/branches/openAL/src/lib/graphics/importer/material.h

    r3914 r4194  
    6767  Texture* ambientTexture; //!< The ambient texture of the Material.
    6868  Texture* specularTexture;//!< The specular texture of the Material.
    69  
    70   bool diffuseTextureSet; //!< Chekcs if the diffuse texture is Set.
    71   bool ambientTextureSet; //!< Chekcs if the ambient texture is Set.
    72   bool specularTextureSet;//!< Chekcs if the specular texture is Set.
    73 
    7469};
    7570#endif
  • orxonox/branches/openAL/src/lib/graphics/importer/model.cc

    r3917 r4194  
    2727using namespace std;
    2828
    29 //////////////////
    30 // DE-CONSTRUCT //
    31 //////////////////
    32 /**
    33    \brief Creates a 3D-Model. and assigns it a Name.
     29
     30////////////////////
     31/// SUB-Elements ///
     32////////////////////
     33/**
     34   \brief creates a new ModelFaceElement
     35*/
     36ModelFaceElement::ModelFaceElement()
     37{
     38  this->vertexNumber = -1;
     39  this->normalNumber = -1;
     40  this->texCoordNumber = -1;   
     41
     42  this->next = NULL;
     43}
     44
     45/**
     46   \brief destroys a ModelFaceElement
     47*/
     48ModelFaceElement::~ModelFaceElement()
     49{
     50  if (this->next)
     51    delete this->next;
     52}
     53
     54/**
     55   \brief creates a new ModelFace
     56*/
     57ModelFace::ModelFace()
     58{
     59  this->vertexCount = 0;
     60
     61  this->firstElem = NULL;
     62 
     63  this->material = NULL;
     64 
     65  this->next = NULL;
     66
     67}
     68
     69/**
     70   \brief deletes a ModelFace
     71*/
     72ModelFace::~ModelFace()
     73{
     74  PRINTF(5)("Cleaning up Face\n");
     75
     76  if (this->firstElem != NULL)
     77    delete this->firstElem;
     78 
     79  if (this->next != NULL)
     80    delete this->next;
     81}
     82
     83/**
     84   \brief Creates a new ModelGroup
     85*/
     86ModelGroup::ModelGroup()
     87{
     88  PRINTF(4)("Adding new Group\n");
     89  this->name = "";
     90  this->faceMode = -1;
     91  this->faceCount = 0; 
     92  this->next = NULL;
     93 
     94  this->firstFace = new ModelFace;
     95  this->currentFace = this->firstFace;
     96}
     97
     98/**
     99   \brief deletes a ModelGroup
     100*/
     101ModelGroup::~ModelGroup()
     102{
     103  PRINTF(5)("Cleaning up group\n");
     104  if (this->firstFace != NULL)
     105    delete this->firstFace;
     106
     107  if (this->next !=NULL)
     108    delete this->next;
     109}
     110
     111/**
     112   \brief cleans up a ModelGroup
     113
     114   actually does the same as the delete Operator, but does not delete the predecessing group
     115*/
     116void ModelGroup::cleanup(void)
     117{
     118  PRINTF(5)("Cleaning up group\n");
     119  if (this->firstFace)
     120    delete this->firstFace;
     121  this->firstFace = NULL;
     122  if (this->next)
     123    this->next->cleanup();
     124}
     125
     126
     127/////////////
     128/// MODEL ///
     129/////////////
     130/**
     131   \brief Creates a 3D-Model.
     132
     133   assigns it a Name and a Type
    34134*/
    35135Model::Model(const char* modelName, MODEL_TYPE type)
     
    42142  this->finalized = false;
    43143  // setting the start group;
    44   this->firstGroup = new Group;
    45   this->currentGroup = this->firstGroup;
     144  this->currentGroup = this->firstGroup = new ModelGroup;
    46145  this->groupCount = 0;
    47  
    48   this->initGroup (this->currentGroup);
     146  this->vertexCount = 0;
     147  this->normalCount = 0;
     148  this->texCoordCount = 0;
     149 
    49150  this->scaleFactor = 1;
    50151
     
    76177
    77178  PRINTF(5)("Deleting display Lists.\n");
    78   Group* walker = this->firstGroup;
    79   while (walker != NULL)
    80     {
    81       glDeleteLists (walker->listNumber, 1);
    82       Group* delWalker = walker;
    83       walker = walker->next;
    84       delete delWalker;
    85     }
     179  delete this->firstGroup;
    86180
    87181  // deleting Arrays
     
    92186  tIterator<Material>* tmpIt = this->materialList->getIterator();
    93187  Material* material = tmpIt->nextElement();
     188
     189  //! \todo do we really have to delete this material??
    94190  while(material)
    95191    {
     
    128224{
    129225  PRINTF(4)("drawing the 3D-Models\n");
    130   Group* walker = this->firstGroup;
    131   while (walker != NULL)
    132     {
    133       PRINTF(5)("Drawing model %s\n", walker->name);
    134       glCallList (walker->listNumber);
    135       walker = walker->next;
     226  ModelGroup* tmpGroup = this->firstGroup;
     227  while (tmpGroup != NULL)
     228    {
     229      PRINTF(5)("Drawing model %s\n", tmpGroup->name);
     230      glCallList (tmpGroup->listNumber);
     231      tmpGroup = tmpGroup->next;
    136232    }
    137233}
     
    151247    }
    152248  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    153   Group* walker = this->firstGroup;
     249  ModelGroup* tmpGroup = this->firstGroup;
    154250  int counter = 0;
    155   while (walker != NULL)
     251  while (tmpGroup != NULL)
    156252    {
    157253      if (counter == groupNumber)
    158254        {
    159           PRINTF(4)("Drawing model number %i named %s\n", counter, walker->name);
    160           glCallList (walker->listNumber);
     255          PRINTF(4)("Drawing model number %i named %s\n", counter, tmpGroup->name);
     256          glCallList (tmpGroup->listNumber);
    161257          return;
    162258        }
    163259      ++counter;
    164       walker = walker->next;
     260      tmpGroup = tmpGroup->next;
    165261    }
    166262  PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->name);
     
    178274{
    179275  PRINTF(4)("drawing the requested 3D-Models if found.\n");
    180   Group* walker = this->firstGroup;
    181   while (walker != NULL)
    182     {
    183       if (!strcmp(walker->name, groupName))
     276  ModelGroup* tmpGroup = this->firstGroup;
     277  while (tmpGroup != NULL)
     278    {
     279      if (!strcmp(tmpGroup->name, groupName))
    184280        {
    185           PRINTF(4)("Drawing model %s\n", walker->name);
    186           glCallList (walker->listNumber);
     281          PRINTF(4)("Drawing model %s\n", tmpGroup->name);
     282          glCallList (tmpGroup->listNumber);
    187283          return;
    188284        }
    189       walker = walker->next;
     285      tmpGroup = tmpGroup->next;
    190286    }
    191287  PRINTF(2)("Model Named %s in %s not Found.\n", groupName, this->name);
    192288  return;
    193 }
    194 
    195 /**
    196    \returns Count of the Models in this File
    197 */
    198 int Model::getGroupCount (void) const
    199 {
    200   return this->groupCount;
    201289}
    202290
     
    210298void Model::setName(const char* name)
    211299{
    212   if (this->name) 
    213     delete this->name;
     300  if (this->name)
     301    delete []this->name;
    214302  if (name)
    215303    {
     
    219307  else
    220308    this->name = NULL;
    221 }
    222 
    223 /**
    224    \brief initializes a new Group model
    225    \param group the group that should be initialized.
    226    \todo Maybe Group should be a Class, because it does a lot of stuff
    227    
    228 */
    229 bool Model::initGroup(Group* group)
    230 {
    231   PRINTF(4)("Adding new Group\n");
    232   group->name = "";
    233   group->faceMode = -1;
    234   group->faceCount = 0; 
    235   group->next = NULL;
    236 
    237   group->firstFace = new Face;
    238   this->initFace (group->firstFace);
    239   group->currentFace = group->firstFace;
    240 }
    241 
    242 /**
    243    \brief initializes a new Face. (sets default Values)
    244    \param face The face to initialize
    245 */
    246 bool Model::initFace (Face* face)
    247 {
    248   face->vertexCount = 0;
    249 
    250   face->firstElem = NULL;
    251  
    252   face->material = NULL;
    253  
    254   face->next = NULL;
    255 
    256   return true;
    257309}
    258310
     
    268320  if (this->normals)
    269321    delete this->normals;
     322
    270323  this->vertices = NULL;
    271324  this->vTexture = NULL;
     
    280333{
    281334  PRINTF(4)("cleaning up the 3D-Model to save Memory.\n");
    282   this->cleanupGroup(this->firstGroup);
     335  this->firstGroup->cleanup();
    283336  return true;
    284337}
    285338
    286 /**
    287    \brief Cleans up all groups starting from group.
    288    \param group the first Group to clean
    289 */
    290 bool Model::cleanupGroup (Group* group)
    291 {
    292   PRINTF(5)("Cleaning up group\n");
    293   if (group->firstFace != NULL)
    294     {
    295       cleanupFace (group->firstFace);
    296       delete group->firstFace;
    297     }
    298 
    299   if (group->next !=NULL)
    300     cleanupGroup (group->next);
    301   return true;
    302 }
    303 
    304 /**
    305    \brief Cleans up all Faces starting from face until NULL is reached.
    306    \param face the first face to clean.
    307 */
    308 bool Model::cleanupFace (Face* face)
    309 {
    310   PRINTF(5)("Cleaning up Face\n");
    311 
    312   if (face->firstElem != NULL)
    313     {
    314       this->cleanupFaceElement(face->firstElem);
    315       delete face->firstElem;
    316     }
    317      
    318   if (face->next != NULL)
    319     {
    320       this->cleanupFace (face->next);
    321       delete face->next;
    322     }
    323 }
    324 
    325 /**
    326    \brief Cleans up all FaceElements starting from faceElem.
    327    \param faceElem the first FaceElement to clean.
    328 */
    329 bool Model::cleanupFaceElement(FaceElement* faceElem)
    330 {
    331   if (faceElem->next != NULL)
    332     {
    333       this->cleanupFaceElement (faceElem->next);
    334       delete faceElem->next;
    335     }
    336 }
     339
    337340
    338341//////////
     
    354357/**
    355358   \brief adds a new Material to the Material List
    356    \param material the name of the Material to add
     359   \param materialName the name of the Material to add
    357360   \returns the added material
    358361*/
    359362Material* Model::addMaterial(const char* materialName)
    360363{
    361  
    362364  Material* newMat = new Material();
    363365  newMat->setName(materialName);
     
    395397
    396398   This function initializes a new Group.
    397    With it you should be able to import .obj-files with more than one Models inside.
    398 */
    399 bool Model::addGroup (const char* groupString)
     399   With it you should be able to create Models with more than one SubModel inside
     400*/
     401bool Model::addGroup(const char* groupString)
    400402{
    401403  PRINTF(5)("Read Group: %s.\n", groupString);
    402   if (this->groupCount != 0 && this->currentGroup->faceCount>0)
     404  if (this->groupCount != 0 && this->currentGroup->faceCount > 0)
    403405    {
    404406      //      finalizeGroup(currentGroup);
    405       this->currentGroup = this->currentGroup->next = new Group;
    406       this->initGroup(this->currentGroup);
     407      this->currentGroup = this->currentGroup->next = new ModelGroup;
    407408    }
    408409  // setting the group name if not default.
     
    429430  PRINTF(5)("reading in a vertex: %f %f %f\n", &subbuffer1, &subbuffer2, &subbuffer3);
    430431  this->vertices->addEntry(subbuffer1*scaleFactor, subbuffer2*scaleFactor, subbuffer3*scaleFactor);
     432  this->vertexCount++;
    431433  return true;
    432434}
     
    443445  PRINTF(5)("reading in a vertex: %f %f %f\n", x, y, z);
    444446  this->vertices->addEntry(x*scaleFactor, y*scaleFactor, z*scaleFactor);
     447  this->vertexCount++;
    445448  return true;
    446449}
     
    460463  PRINTF(5)("found vertex-Normal %f, %f, %f\n", &subbuffer1,&subbuffer2,&subbuffer3);
    461464  this->normals->addEntry(subbuffer1, subbuffer2, subbuffer3);
     465  this->normalCount++;
    462466  return true;
    463467}
     
    475479  PRINTF(5)("found vertex-Normal %f, %f, %f\n", x, y, z);
    476480  this->normals->addEntry(x, y, z);
     481  this->normalCount++;
     482  return true;
    477483}
    478484
     
    492498  this->vTexture->addEntry(subbuffer1);
    493499  this->vTexture->addEntry(subbuffer2);
     500  this->texCoordCount++;
    494501  return true;
    495502}
     
    507514  this->vTexture->addEntry(u);
    508515  this->vTexture->addEntry(v);
     516  this->texCoordCount++;
     517  return true;
    509518}
    510519
     
    514523
    515524   If a face line is found this function will add it to the glList.
     525
     526   String is different from the argument addFace, in this that the first Vertex/Normal/Texcoord is 1 instead of 0
    516527*/
    517528bool Model::addFace (const char* faceString)
    518529{
    519530  if (this->currentGroup->faceCount >0)
    520     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
    521   this->initFace (this->currentGroup->currentFace);
    522 
    523   FaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new FaceElement;
     531    this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace;
     532
     533  ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement;
    524534  tmpElem->next = NULL;
    525535  while(strcmp (faceString, "\0"))
    526536    {
    527537      if (this->currentGroup->currentFace->vertexCount>0)
    528           tmpElem = tmpElem->next = new FaceElement;
     538          tmpElem = tmpElem->next = new ModelFaceElement;
    529539      tmpElem->next = NULL;
    530540
     
    552562      if (vertex)
    553563        tmpElem->vertexNumber = atoi(vertex)-1;
    554       else
    555         tmpElem->vertexNumber = -1;
    556564      if (texture)
    557565        tmpElem->texCoordNumber = atoi(texture)-1;
    558       else
    559         tmpElem->texCoordNumber = -1;
    560566      if (normal)
    561567        tmpElem->normalNumber = atoi(normal)-1;
    562       else
    563         tmpElem->normalNumber = -1;
    564568
    565569      faceString += tmpLen;
     
    575579   \brief adds a new Face
    576580   \param faceElemCount the number of Vertices to add to the Face.
    577    \param type 0: vertex only, 1: vertex and normal, 2: vertex and Texture, 3 vertex, normal and texture
     581   \param type The information Passed with each Vertex
    578582*/
    579583bool Model::addFace(int faceElemCount, VERTEX_FORMAT type, ...)
    580584{
    581    if (this->currentGroup->faceCount > 0)
    582     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
    583   this->initFace (this->currentGroup->currentFace);
    584 
    585   FaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new FaceElement;
    586   tmpElem->next = NULL;
     585  if (this->currentGroup->faceCount > 0)
     586    this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace;
     587 
     588  ModelFaceElement* tmpElem = this->currentGroup->currentFace->firstElem = new ModelFaceElement;
    587589 
    588590  va_list itemlist;
     
    591593  for (int i = 0; i < faceElemCount; i++)
    592594    {
    593       if (this->currentGroup->currentFace->vertexCount>0)
    594           tmpElem = tmpElem->next = new FaceElement;
    595       tmpElem->next = NULL;
    596 
    597       tmpElem->vertexNumber = va_arg (itemlist, int) -1;
     595      if (this->currentGroup->currentFace->vertexCount > 0)
     596        tmpElem = tmpElem->next = new ModelFaceElement;
     597
     598      tmpElem->vertexNumber = va_arg (itemlist, int);
    598599      if (type & TEXCOORD)
    599         tmpElem->texCoordNumber = va_arg (itemlist, int) -1;
     600        tmpElem->texCoordNumber = va_arg (itemlist, int);
    600601      if (type & NORMAL)
    601         tmpElem->normalNumber = va_arg(itemlist, int) -1;
     602        tmpElem->normalNumber = va_arg(itemlist, int);
    602603      this->currentGroup->currentFace->vertexCount++;
    603604    }
     
    614615{
    615616  if (this->currentGroup->faceCount > 0)
    616     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
    617   this->initFace (this->currentGroup->currentFace);
     617    this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace;
    618618 
    619619  this->currentGroup->currentFace->material = this->findMaterialByName(matString);
     
    630630{
    631631  if (this->currentGroup->faceCount > 0)
    632     this->currentGroup->currentFace = this->currentGroup->currentFace->next = new Face;
    633   this->initFace (this->currentGroup->currentFace);
     632    this->currentGroup->currentFace = this->currentGroup->currentFace->next = new ModelFace;
    634633 
    635634  this->currentGroup->currentFace->material = mtl;
     
    662661  Vector curV;
    663662
    664   Group* tmpGroup = firstGroup;
     663  ModelGroup* tmpGroup = firstGroup;
    665664  while (tmpGroup)
    666665    {
    667       Face* tmpFace = tmpGroup->firstFace;
     666      ModelFace* tmpFace = tmpGroup->firstFace;
    668667      while (tmpFace)
    669668        {
    670669          if (tmpFace->firstElem)
    671670            {
    672               FaceElement* firstElem = tmpFace->firstElem;
    673               FaceElement* prevElem;
    674               FaceElement* curElem = firstElem;
    675               FaceElement* nextElem;
    676               FaceElement* lastElem;
     671              ModelFaceElement* firstElem = tmpFace->firstElem;
     672              ModelFaceElement* prevElem;
     673              ModelFaceElement* curElem = firstElem;
     674              ModelFaceElement* nextElem;
     675              ModelFaceElement* lastElem;
    677676              // find last Element of the Chain. !! IMPORTANT:the last Element of the Chain must point to NULL, or it will resolv into an infinity-loop.
    678677              while (curElem)
     
    704703    }
    705704
    706   for (int i=0; i<vertices->getCount()/3;i++)
     705  for (int i=0; i < vertices->getCount()/3;i++)
    707706    {
    708707      normArray[i].normalize();
    709708      PRINTF(5)("Found Normale number %d: (%f; %f, %f).\n", i, normArray[i].x, normArray[i].y, normArray[i].z);
    710709     
    711       this->normals->addEntry(normArray[i].x, normArray[i].y, normArray[i].z);
     710      this->addVertexNormal(normArray[i].x, normArray[i].y, normArray[i].z);
    712711
    713712    }
     
    744743
    745744      // Putting Faces to GL
    746       Face* tmpFace = this->currentGroup->firstFace;
     745      ModelFace* tmpFace = this->currentGroup->firstFace;
    747746      while (tmpFace != NULL)
    748747        {
     
    794793            }
    795794         
    796           FaceElement* tmpElem = tmpFace->firstElem;
     795          ModelFaceElement* tmpElem = tmpFace->firstElem;
    797796          while (tmpElem != NULL)
    798797            {
     
    826825  glNormalPointer(3, 0, this->normals->getArray());
    827826  glTexCoordPointer(2, GL_FLOAT, 0, this->vTexture->getArray());
    828 
    829827}
    830828
     
    841839   merging this information, the face will be drawn.
    842840*/
    843 bool Model::addGLElement (FaceElement* elem)
     841bool Model::addGLElement (ModelFaceElement* elem)
    844842{
    845843  PRINTF(5)("importing grafical Element to openGL.\n");
    846844
    847845  if (elem->texCoordNumber != -1)
    848     glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2);
     846    {
     847      if (likely(elem->texCoordNumber < this->texCoordCount))
     848        glTexCoord2fv(this->vTexture->getArray() + elem->texCoordNumber * 2);
     849      else
     850        PRINTF(2)("TextureCoordinate %d is not in the List (max: %d)\nThe Model might be incomplete\n",
     851                  elem->texCoordNumber, this->texCoordCount);
     852    }
    849853  if (elem->normalNumber != -1)
    850     glNormal3fv(this->normals->getArray() + elem->normalNumber * 3);
     854    {
     855    if (likely(elem->normalNumber < this->normalCount))
     856      glNormal3fv(this->normals->getArray() + elem->normalNumber * 3);
     857    else
     858        PRINTF(2)("Normal %d is not in the List (max: %d)\nThe Model might be incomplete",
     859                  elem->normalNumber, this->normalCount);     
     860    }
    851861  if (elem->vertexNumber != -1)
    852     glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
     862    {
     863      if (likely(elem->vertexNumber < this->vertexCount))
     864          glVertex3fv(this->vertices->getArray() + elem->vertexNumber * 3);
     865      else
     866        PRINTF(2)("Vertex %d is not in the List (max: %d)\nThe Model might be incomplete",
     867                  elem->vertexNumber, this->vertexCount);     
     868    }   
    853869
    854870}
     
    910926  this->addVertexNormal (-1.0, 0.0, 0.0);
    911927
    912   /* normaleLess-testingMode
    913   this->addFace ("1 2 4 3");
    914   this->addFace ("3 4 6 5");
    915   this->addFace ("5 6 8 7");
    916   this->addFace ("7 8 2 1");
    917   this->addFace ("2 8 6 4");
    918   this->addFace ("7 1 3 5");
    919   */
    920 
    921   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,1, 2,2,2, 4,4,3, 3,3,4);
    922   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 3,3,5, 4,4,6, 6,6,7, 5,5,8);
    923   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 5,5,9, 6,6,10, 8,8,11, 7,7,12);
    924   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,7,13, 8,8,14, 2,10,15, 1,9,16);
    925   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,17, 8,11,18, 6,12,19, 4,4,20);
    926   this->addFace (4, VERTEX_TEXCOORD_NORMAL, 7,13,21, 1,1,22, 3,3,23, 5,14,24);
    927 
    928 }
     928  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 0,0,0, 1,1,1, 3,3,2, 2,2,3);
     929  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 2,2,4, 3,3,5, 5,5,6, 4,4,7);
     930  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 4,4,8, 5,5,9, 7,7,10, 6,6,11);
     931  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,6,12, 7,7,13, 1,9,14, 0,8,15);
     932  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 1,1,16, 7,10,17, 5,11,18, 3,3,19);
     933  this->addFace (4, VERTEX_TEXCOORD_NORMAL, 6,12,20, 0,0,21, 2,2,22, 4,13,23);
     934
     935}
  • orxonox/branches/openAL/src/lib/graphics/importer/model.h

    r3917 r4194  
    3434                    VERTEX_TEXCOORD_NORMAL = NORMAL | TEXCOORD};
    3535
     36////////////////////
     37/// SUB-ELEMENTS ///
     38////////////////////
     39//! This is the placeholder of one Vertex beloning to a Face.
     40class ModelFaceElement
     41{
     42 public:
     43  ModelFaceElement();
     44  ~ModelFaceElement();
     45
     46  int vertexNumber;         //!< The number of the Vertex out of the Array* vertices, this vertex points to.
     47  int normalNumber;         //!< The number of the Normal out of the Array* normals, this vertex points to.
     48  int texCoordNumber;       //!< The number of the textureCoordinate out of the Array* vTexture, this vertex points to.
     49  ModelFaceElement* next;   //!< Point to the next FaceElement in this List.
     50};
     51
     52//! This is the placeholder of a Face belonging to a Group of Faces.
     53class ModelFace
     54{
     55 public:
     56  ModelFace();
     57  ~ModelFace();
     58
     59  int vertexCount;                //!< The Count of vertices this Face has.
     60  ModelFaceElement* firstElem;    //!< Points to the first Vertex (FaceElement) of this Face.
     61 
     62  Material* material;             //!< The Material to use.
     63 
     64  ModelFace* next;                //!< Pointer to the next Face.
     65};
     66
     67//! Group to handle multiple Models per obj-file.
     68class ModelGroup
     69{
     70 public:
     71  ModelGroup();
     72  ~ModelGroup();
     73
     74  void cleanup();
     75
     76  char* name;                 //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function.
     77 
     78  GLubyte* indices;           //!< The indices of the Groups. Needed for vertex-arrays
     79  GLuint listNumber;          //!< The number of the GL-List this Group gets.
     80  ModelFace* firstFace;       //!< The first Face in this group.
     81  ModelFace* currentFace;     //!< The current Face in this Group (the one we are currently working with.)
     82  int faceMode;               //!< The Mode the Face is in: initially -1, 0 for FaceList opened, 1 for Material,  3 for triangle, 4 for Quad, 5+ for Poly \todo ENUM...
     83  int faceCount;              //!< The Number of Faces this Group holds.
     84 
     85  ModelGroup* next;           //!< Pointer to the next Group.
     86};
     87
     88/////////////
     89/// MODEL ///
     90/////////////
     91
    3692//! Class that handles 3D-Models. it can also read them in and display them.
    3793class Model
    3894{
    3995 private:
    40   /////////////
    41   // structs //
    42   /////////////
    43   //! This is the placeholder of one Vertex beloning to a Face.
    44   struct FaceElement
    45   {
    46     int vertexNumber;    //!< The number of the Vertex out of the Array* vertices, this vertex points to.
    47     int normalNumber;    //!< The number of the Normal out of the Array* normals, this vertex points to.
    48     int texCoordNumber;  //!< The number of the textureCoordinate out of the Array* vTexture, this vertex points to.
    49     FaceElement* next;   //!< Point to the next FaceElement in this List.
    50   };
    5196
    52   //! This is the placeholder of a Face belonging to a Group of Faces.
    53   struct Face
    54   {
    55     int vertexCount;        //!< The Count of vertices this Face has.
    56     FaceElement* firstElem; //!< Points to the first Vertex (FaceElement) of this Face.
     97  char* name;                 //!< This is the name of the Model.
     98  MODEL_TYPE type;            //!< A type for the Model
     99  bool finalized;             //!< Sets the Object to be finalized.
    57100
    58     Material* material;     //!< The Material to use.
     101  int vertexCount;            //!< A modelwide Counter for vertices.
     102  int normalCount;            //!< A modelwide Counter for the normals.
     103  int texCoordCount;          //!< A modelwide Counter for the texCoord.
     104  Array* vertices;            //!< The Array that handles the Vertices.
     105  Array* normals;             //!< The Array that handles the Normals.
     106  Array* vTexture;            //!< The Array that handles the VertexTextureCoordinates.
    59107
    60     Face* next;             //!< Pointer to the next Face.
    61   };
     108  ModelGroup* firstGroup;     //!< The first of all groups.
     109  ModelGroup* currentGroup;   //!< The currentGroup. this is the one we will work with.
     110  int groupCount;             //!< The Count of Groups.
    62111
    63   //! Group to handle multiple Models per obj-file.
    64   struct Group
    65   {
    66     char* name;         //!< the Name of the Group. this is an identifier, that can be accessed via the draw (char* name) function.
    67 
    68     GLubyte* indices;   //!< The indices of the Groups. Needed for vertex-arrays
    69     GLuint listNumber;  //!< The number of the GL-List this Group gets.
    70     Face* firstFace;    //!< The first Face in this group.
    71     Face* currentFace;  //!< The current Face in this Group (the one we are currently working with.)
    72     int faceMode;       //!< The Mode the Face is in: initially -1, 0 for FaceList opened, 1 for Material,  3 for triangle, 4 for Quad, 5+ for Poly \todo ENUM...
    73     int faceCount;      //!< The Number of Faces this Group holds.
    74 
    75     Group* next;        //!< Pointer to the next Group.
    76   };
    77 
    78   char* name;            //!< This is the name of the Model.
    79   MODEL_TYPE type;
    80   bool finalized;        //!< Sets the Object to be finalized.
    81 
    82   Array* vertices;      //!< The Array that handles the Vertices.
    83   int verticesCount;    //!< A global Counter for vertices.
    84   Array* normals;       //!< The Array that handles the Normals.
    85   Array* vTexture;      //!< The Array that handles the VertexTextureCoordinates.
    86 
    87   Group* firstGroup;    //!< The first of all groups.
    88   Group* currentGroup;  //!< The currentGroup. this is the one we will work with.
    89   int groupCount;       //!< The Count of Groups.
    90 
    91   tList<Material>* materialList;
     112  tList<Material>* materialList;//!< A list for all the Materials in this Model
    92113 
    93 
    94   bool initGroup(Group* group);
    95   bool initFace (Face* face);
    96 
    97114  bool buildVertexNormals(void);
    98115
    99116  bool importToDisplayList(void);
    100   bool addGLElement(FaceElement* elem);
     117  bool addGLElement(ModelFaceElement* elem);
    101118
    102119  bool importToVertexArray(void);
     
    104121  bool deleteArrays(void);
    105122  bool cleanup(void);
    106   bool cleanupGroup(Group* group);
    107   bool cleanupFace(Face* face);
    108   bool cleanupFaceElement(FaceElement* faceElem);
    109123
    110124
     
    121135
    122136  void setName(const char* name);
     137  /** \returns the Name of the Model */
    123138  inline const char* getName() {return this->name;}
    124139 
     
    126141  void draw(int groupNumber) const;
    127142  void draw(char* groupName) const;
    128   int getGroupCount() const;
     143
     144  /** \returns Count of the Models (Groups) in this File */
     145  inline int getGroupCount(void) const {return this->groupCount;}
    129146
    130147  Material* addMaterial(Material* material);
     
    143160  bool setMaterial(Material* mtl);
    144161  void finalize(void);
     162
     163  /** \returns The number of Vertices of the Model */
     164  inline int getVertexCount(void) const {return this->vertexCount;}
     165  /** \returns The number of Normals of the Model */
     166  inline int getNormalCount(void) const {return this->normalCount;}
     167  /** \returns The number of Texture Coordinates of the Model*/
     168  inline int getTexCoordCount(void) const {return this->texCoordCount;}
    145169};
    146170
  • orxonox/branches/openAL/src/lib/graphics/importer/objModel.cc

    r3916 r4194  
    3434OBJModel::OBJModel(const char* fileName, float scaling) : Model(fileName)
    3535{
    36   this->initializeOBJ();
     36  this->objPath = "./";
     37
    3738  this->scaleFactor = scaling;
    3839
     
    5253  if (this->objPath)
    5354    delete []this->objPath;
    54   if (this->objFileName)
    55     delete []this->objFileName;
    56   if (this->mtlFileName)
    57     delete []this->mtlFileName;
    58 }
    59 
    60 /**
    61    \brief Initializes an obj-model
    62 */
    63 void OBJModel::initializeOBJ(void)
    64 {
    65   this->objPath = NULL;
    66   this->objFileName = NULL;
    67   this->mtlFileName = NULL;
    6855}
    6956
     
    7158   \brief Imports a obj file and handles the the relative location
    7259   \param fileName The file to import
     60
     61   Splits the FileName from the DirectoryName
    7362*/
    7463bool OBJModel::importFile (const char* fileName)
    7564{
    7665  PRINTF(4)("preparing to read in file: %s\n", fileName);
    77 
    78 
    79 #ifdef __WIN32__
    80   // win32 path reading
    81   char pathSplitter= '\\';
    82 #else /* __WIN32__ */
    83   // unix path reading
    84   char pathSplitter='/';
    85 #endif /* __WIN32__ */
    86   char* tmpName;
    87   strcpy(tmpName, fileName);
    88   if (tmpName[0] == pathSplitter)
    89     tmpName++;
    90   char* name = tmpName;
    91   while (( tmpName = strchr (tmpName+1, pathSplitter)))
    92     {
    93       name = tmpName+1;
    94     }
    95   this->objPath = new char[name-fileName+1];
    96   strncpy(this->objPath, fileName, name-fileName);
    97   this->objPath[name-fileName] = '\0';
    98   if (strlen(objPath)> 0)
    99     PRINTF(5)("Resolved file %s to folder: %s.\n", name, objPath);
    100   else
    101     PRINTF(5)("Resolved file %s.\n", name);
    102  
    103   this->setName(name);
    104 
    105   this->objFileName = new char[strlen(name)+1];
    106   strcpy (this->objFileName, name);
    107   this->readFromObjFile ();
     66  // splitting the
     67  char* split = NULL;
     68
     69  if (!(split = strrchr(fileName, '/')))
     70    split = strrchr(fileName, '\\'); // windows Case
     71  if (split)
     72    {
     73      int len = split - fileName+1;
     74      this->objPath = new char[len +2];
     75      strncpy(this->objPath, fileName, len);
     76      this->objPath[len] = '\0';
     77      PRINTF(1)("Resolved file %s to Path %s.\n", fileName, this->objPath);
     78    }
     79  this->readFromObjFile (fileName);
    10880  return true;
    10981}
     
    11385   This function does read the file, parses it for the occurence of things like vertices, faces and so on, and executes the specific tasks
    11486*/
    115 bool OBJModel::readFromObjFile (void)
    116 {
    117   char* fileName = new char [strlen(objPath)+strlen(objFileName)+1];
    118   if (this->objFileName != NULL && !strcmp(this->objFileName, ""))
    119     return false;
    120   strcpy(fileName, this->objPath);
    121   strcat(fileName, this->objFileName);
    122 
     87bool OBJModel::readFromObjFile(const char* fileName)
     88{
    12389  FILE* stream;
    12490  if( (stream = fopen (fileName, "r")) == NULL)
    12591    {
    126       printf("IniParser could not open %s\n", fileName);
     92      printf("Object File Could not be Opened %s\n", fileName);
    12793      return false;
    12894    }
     
    179145    }
    180146  fclose (stream);
    181   delete []fileName;
    182147  return true;
    183148}
     
    194159bool OBJModel::readMtlLib (const char* mtlFile)
    195160{
    196   this->mtlFileName = new char [strlen(mtlFile)+1];
    197   strcpy(this->mtlFileName, mtlFile);
    198   char* fileName = new char [strlen(objPath) + strlen(this->mtlFileName)+1];
    199   strcpy(fileName, this->objPath);
    200   strcat(fileName, this->mtlFileName);
    201  
     161  char* fileName = new char [strlen(this->objPath) + strlen(mtlFile)+1];
     162  sprintf(fileName, "%s%s", this->objPath, mtlFile);
    202163
    203164  FILE* stream;
    204165  if( (stream = fopen (fileName, "r")) == NULL)
    205166    {
    206       printf("IniParser could not open %s\n", fileName);
     167      PRINTF(2)("MaterialLibrary could not be opened %s\n", fileName);
     168      delete []fileName;
    207169      return false;
    208170    }
  • orxonox/branches/openAL/src/lib/graphics/importer/objModel.h

    r3916 r4194  
    1515  OBJModel(const char* fileName, float scaling = 1.0);
    1616  virtual ~OBJModel();
    17   void initializeOBJ(void);
    1817
    1918 private:
    2019  // Variables
    2120  char* objPath;        //!< The Path where the obj and mtl-file are located.
    22   char* objFileName;    //!< The Name of the obj-file.
    23   char* mtlFileName;    //!< The Name of the mtl-file (parsed out of the obj-file)
    2421
    2522  ///// readin /////
    2623  bool importFile (const char* fileName);
    27   bool readFromObjFile (void);
     24  bool readFromObjFile (const char* fileName);
    2825  bool readMtlLib (const char* matFile);
    2926};
  • orxonox/branches/openAL/src/lib/graphics/importer/primitive_model.cc

    r3911 r4194  
    7171void PrimitiveModel::sphereModel(float size, unsigned int detail)
    7272{
    73   int vertexCount = 0;
    7473  if (detail <= 0)
    7574    detail = 1;
     
    8988                          size * sin(vi) * cos(vj));
    9089          this->addVertexTexture(i / (df *2.0), (j-1.0)/(df)+.5);
    91           vertexCount++;
    9290        }
    9391    }
    9492  this->addVertex(0, -size, 0);
     93  this->addVertexTexture(0,0);
    9594  this->addVertex(0, size, 0);
     95  this->addVertexTexture(0 ,1);
    9696
    9797  // defining the binding Faces.
     
    102102        {
    103103         
    104           v1 = i*detail + j;
    105           v4 = i*detail + (j+1);
     104          v1 = i*detail + j-1;
     105          v4 = i*detail + j;
    106106         
    107107          if (i == detail*2 -1)
    108108            {
    109               v2 = j;
    110               v3 = j+1;
     109              v2 = j-1;
     110              v3 = j;
    111111            }
    112112          else
    113113            {
    114               v2 = (i+1)*detail + j;
    115               v3 = (i+1)*detail + (j+1);
    116             }
    117          
     114              v2 = (i+1)*detail + j-1;
     115              v3 = (i+1)*detail + j;
     116            }
     117
    118118          if (j == 0)
    119119            {
    120               v1 = vertexCount+1;
     120              v1 = this->getVertexCount()-2;
    121121              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v3, v3, v4, v4);
    122122            }
    123123          else if (j == detail)
    124124            {
    125               v3 = vertexCount+2;
     125              v3 = this->getVertexCount()-1;
    126126              this->addFace(3, VERTEX_TEXCOORD, v1, v1, v2, v2, v3, v3);
    127127            }
     
    157157    {
    158158      int p1, p2, p3, p4;
    159       p1 = 2*i+1;
    160       p2 = 2*i+2;
    161       p3 = 2*i+4;
    162       p4 = 2*i+3;
     159      p1 = 2*i;
     160      p2 = 2*i+1;
     161      p3 = 2*i+3;
     162      p4 = 2*i+2;
    163163      // something is wrong here
    164164      this->addFace(4, VERTEX_ONLY, p1, p2, p3, p4);
    165       this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail+1);
    166       this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+2);
     165      this->addFace(3, VERTEX_ONLY, p4, p1, 2*detail);
     166      this->addFace(3, VERTEX_ONLY, p2, p3, 2*detail+1);
    167167    }
    168168  // caps
    169   this->addFace(4, VERTEX_ONLY, 2*detail-1, 2*detail, 2, 1);
    170   this->addFace(3, VERTEX_ONLY, 1, 2*detail-1, 2*detail+1);
    171   this->addFace(3, VERTEX_ONLY, 2*detail, 2, 2*detail+2);
     169  this->addFace(4, VERTEX_ONLY, 2*detail-2, 2*detail-1, 1, 0);
     170  this->addFace(3, VERTEX_ONLY, 0, 2*detail-2, 2*detail);
     171  this->addFace(3, VERTEX_ONLY, 2*detail-1, 1, 2*detail+1);
    172172}
    173173
     
    198198    {
    199199      unsigned int v1, v2;
    200       v1 = i+3;
     200      v1 = i+2;
    201201      if (i == detail -1)
    202         v2 = 3;
     202        v2 = 2;
    203203      else
    204         v2 = i+4;
    205       this->addFace(3, VERTEX_ONLY, 1, v1, v2);
    206       this->addFace(3, VERTEX_ONLY, 2, v1, v2);
     204        v2 = i+3;
     205      this->addFace(3, VERTEX_ONLY, 0, v1, v2);
     206      this->addFace(3, VERTEX_ONLY, 1, v1, v2);
    207207    }
    208208}
     
    228228  unsigned int v1, v2, v3, v4;
    229229  for (int i = 0; i < detail-1; i++)
    230     for (int j = 1; j < detail; j++)
     230    for (int j = 0; j < detail-1; j++)
    231231      {
    232232        v1 = i*detail + j;
  • orxonox/branches/openAL/src/lib/graphics/importer/texture.cc

    r3905 r4194  
    2525Texture::Texture(const char* imageName)
    2626{
     27  bAlpha = false;
    2728  this->texture = 0;
    2829  if (imageName)
     
    112113      if ( (saved_flags & SDL_SRCALPHA) == SDL_SRCALPHA ) {
    113114        SDL_SetAlpha(surface, saved_flags | SDL_OPENGL, saved_alpha);
     115        this->bAlpha = true;
    114116      }
    115117     
     
    119121      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
    120122      glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
    121       /*      glTexImage2D(GL_TEXTURE_2D,
     123      // build the Texture
     124      glTexImage2D(GL_TEXTURE_2D,
    122125                   0,
    123126                   GL_RGBA,
     
    127130                   GL_UNSIGNED_BYTE,
    128131                   image->pixels);
    129       */
     132      // build the MipMaps
    130133      gluBuild2DMipmaps(GL_TEXTURE_2D,
    131                         3,
     134                        GL_RGBA,
    132135                        w,
    133136                        h,
     
    135138                        GL_UNSIGNED_BYTE,
    136139                        image->pixels);
    137 
     140     
    138141      SDL_FreeSurface(image); /* No longer needed */
    139142     
  • orxonox/branches/openAL/src/lib/graphics/importer/texture.h

    r3905 r4194  
    2323  char* searchTextureInPaths(const char* texName) const;
    2424  void swap(unsigned char &a, unsigned char &b);
     25
     26  bool bAlpha;           //!< if the texture has an alpha channel.
    2527 public:
    2628  Texture(const char* imageName = NULL);
     
    3032  inline GLuint getTexture(void) {return this->texture;}
    3133  GLuint loadTexToGL (SDL_Surface* surface);
     34  inline bool hasAlpha(void) {return bAlpha;}
    3235
    3336  bool loadImage(const char* imageName);
  • orxonox/branches/openAL/src/lib/gui/Makefile.in

    r3789 r4194  
    8989EXEEXT = @EXEEXT@
    9090GPROF = @GPROF@
    91 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    92 GTHREAD_LIBS = @GTHREAD_LIBS@
    9391GTK2_CFLAGS = @GTK2_CFLAGS@
    9492GTK2_LIBS = @GTK2_LIBS@
    9593HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    9694HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    97 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    98 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    9995HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    10096HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    117113PACKAGE_VERSION = @PACKAGE_VERSION@
    118114PATH_SEPARATOR = @PATH_SEPARATOR@
     115PKG_CONFIG = @PKG_CONFIG@
     116RANLIB = @RANLIB@
    119117SET_MAKE = @SET_MAKE@
    120118SHELL = @SHELL@
     
    125123ac_ct_CC = @ac_ct_CC@
    126124ac_ct_CXX = @ac_ct_CXX@
     125ac_ct_RANLIB = @ac_ct_RANLIB@
    127126ac_ct_STRIP = @ac_ct_STRIP@
    128127am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/openAL/src/lib/gui/console/Makefile.in

    r3789 r4194  
    107107EXEEXT = @EXEEXT@
    108108GPROF = @GPROF@
    109 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    110 GTHREAD_LIBS = @GTHREAD_LIBS@
    111109GTK2_CFLAGS = @GTK2_CFLAGS@
    112110GTK2_LIBS = @GTK2_LIBS@
    113111HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    114112HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    115 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    116 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    117113HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    118114HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    136132PACKAGE_VERSION = @PACKAGE_VERSION@
    137133PATH_SEPARATOR = @PATH_SEPARATOR@
     134PKG_CONFIG = @PKG_CONFIG@
     135RANLIB = @RANLIB@
    138136SET_MAKE = @SET_MAKE@
    139137SHELL = @SHELL@
     
    144142ac_ct_CC = @ac_ct_CC@
    145143ac_ct_CXX = @ac_ct_CXX@
     144ac_ct_RANLIB = @ac_ct_RANLIB@
    146145ac_ct_STRIP = @ac_ct_STRIP@
    147146am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
  • orxonox/branches/openAL/src/lib/gui/gui/Makefile.am

    r3624 r4194  
    77AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/coord
    88AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/data
    9 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gaphics
    10 AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/font
     9AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics
    1110AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/graphics/importer
    1211AM_CXXFLAGS+=-I$(MAINSRCDIR)/lib/gui
     
    1918AM_CXXFLAGS+=-I$(MAINSRCDIR)/glmenu
    2019AM_CXXFLAGS+=-I$(MAINSRCDIR)/ai
     20AM_CXXFLAGS+=-I$(MAINSRCDIR)/util
     21AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/animation
     22AM_CXXFLAGS+=-I$(MAINSRCDIR)/util/common
    2123
    2224#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
     
    2426
    2527bin_PROGRAMS=gui
    26 gui_SOURCES=orxonox_gui.cc \
    27             orxonox_gui_gtk.cc \
    28             orxonox_gui_video.cc \
    29             orxonox_gui_audio.cc \
    30             orxonox_gui_exec.cc \
    31             orxonox_gui_flags.cc \
    32             orxonox_gui_banner.cc \
    33             orxonox_gui_keys.cc \
    34             orxonox_gui_update.cc
     28gui_SOURCES=gui_main.cc \
     29            gui.cc \
     30            gui_gtk.cc \
     31            gui_element.cc \
     32            gui_video.cc \
     33            gui_audio.cc \
     34            gui_exec.cc \
     35            gui_flags.cc \
     36            gui_banner.cc \
     37            gui_keys.cc \
     38            gui_update.cc \
     39                  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     40                  $(MAINSRCDIR)/lib/lang/base_object.cc \
     41                  $(MAINSRCDIR)/lib/math/vector.cc \
     42                  $(MAINSRCDIR)/util/resource_manager.cc \
     43                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     44                  $(MAINSRCDIR)/lib/coord/p_node.cc \
     45                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
     46                  $(MAINSRCDIR)/lib/graphics/importer/array.cc \
     47                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
     48                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     49                  $(MAINSRCDIR)/lib/graphics/importer/material.cc \
     50                  $(MAINSRCDIR)/lib/graphics/importer/texture.cc \
     51                  $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
    3552
    36 noinst_HEADERS=orxonox_gui.h \
    37             orxonox_gui_gtk.h \
    38             orxonox_gui_video.h \
    39             orxonox_gui_audio.h \
    40             orxonox_gui_exec.h \
    41             orxonox_gui_flags.h \
    42             orxonox_gui_banner.h \
    43             orxonox_gui_keys.h \
    44             orxonox_gui_update.h
     53noinst_HEADERS=gui.h \
     54            gui_gtk.h \
     55            gui_element.h \
     56            gui_video.h \
     57            gui_audio.h \
     58            gui_exec.h \
     59            gui_flags.h \
     60            gui_banner.h \
     61            gui_keys.h \
     62            gui_update.h
    4563
    4664#  uncomment the following if orxonox requires the mathlibrary
  • orxonox/branches/openAL/src/lib/gui/gui/Makefile.in

    r3789 r4194  
    5353binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
    5454PROGRAMS = $(bin_PROGRAMS)
    55 am_gui_OBJECTS = orxonox_gui.$(OBJEXT) orxonox_gui_gtk.$(OBJEXT) \
    56         orxonox_gui_video.$(OBJEXT) orxonox_gui_audio.$(OBJEXT) \
    57         orxonox_gui_exec.$(OBJEXT) orxonox_gui_flags.$(OBJEXT) \
    58         orxonox_gui_banner.$(OBJEXT) orxonox_gui_keys.$(OBJEXT) \
    59         orxonox_gui_update.$(OBJEXT)
     55am_gui_OBJECTS = gui_main.$(OBJEXT) gui.$(OBJEXT) gui_gtk.$(OBJEXT) \
     56        gui_element.$(OBJEXT) gui_video.$(OBJEXT) gui_audio.$(OBJEXT) \
     57        gui_exec.$(OBJEXT) gui_flags.$(OBJEXT) gui_banner.$(OBJEXT) \
     58        gui_keys.$(OBJEXT) gui_update.$(OBJEXT) \
     59        graphics_engine.$(OBJEXT) base_object.$(OBJEXT) \
     60        vector.$(OBJEXT) resource_manager.$(OBJEXT) \
     61        text_engine.$(OBJEXT) p_node.$(OBJEXT) null_parent.$(OBJEXT) \
     62        array.$(OBJEXT) model.$(OBJEXT) objModel.$(OBJEXT) \
     63        material.$(OBJEXT) texture.$(OBJEXT) primitive_model.$(OBJEXT)
    6064gui_OBJECTS = $(am_gui_OBJECTS)
    6165gui_LDADD = $(LDADD)
     
    6367depcomp = $(SHELL) $(top_srcdir)/depcomp
    6468am__depfiles_maybe = depfiles
    65 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/orxonox_gui.Po \
    66 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_audio.Po \
    67 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_banner.Po \
    68 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_exec.Po \
    69 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_flags.Po \
    70 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_gtk.Po \
    71 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_keys.Po \
    72 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_update.Po \
    73 @AMDEP_TRUE@    ./$(DEPDIR)/orxonox_gui_video.Po
     69@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po \
     70@AMDEP_TRUE@    ./$(DEPDIR)/base_object.Po \
     71@AMDEP_TRUE@    ./$(DEPDIR)/graphics_engine.Po ./$(DEPDIR)/gui.Po \
     72@AMDEP_TRUE@    ./$(DEPDIR)/gui_audio.Po ./$(DEPDIR)/gui_banner.Po \
     73@AMDEP_TRUE@    ./$(DEPDIR)/gui_element.Po ./$(DEPDIR)/gui_exec.Po \
     74@AMDEP_TRUE@    ./$(DEPDIR)/gui_flags.Po ./$(DEPDIR)/gui_gtk.Po \
     75@AMDEP_TRUE@    ./$(DEPDIR)/gui_keys.Po ./$(DEPDIR)/gui_main.Po \
     76@AMDEP_TRUE@    ./$(DEPDIR)/gui_update.Po ./$(DEPDIR)/gui_video.Po \
     77@AMDEP_TRUE@    ./$(DEPDIR)/material.Po ./$(DEPDIR)/model.Po \
     78@AMDEP_TRUE@    ./$(DEPDIR)/null_parent.Po ./$(DEPDIR)/objModel.Po \
     79@AMDEP_TRUE@    ./$(DEPDIR)/p_node.Po \
     80@AMDEP_TRUE@    ./$(DEPDIR)/primitive_model.Po \
     81@AMDEP_TRUE@    ./$(DEPDIR)/resource_manager.Po \
     82@AMDEP_TRUE@    ./$(DEPDIR)/text_engine.Po ./$(DEPDIR)/texture.Po \
     83@AMDEP_TRUE@    ./$(DEPDIR)/vector.Po
    7484CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    7585        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     
    116126EXEEXT = @EXEEXT@
    117127GPROF = @GPROF@
    118 GTHREAD_CFLAGS = @GTHREAD_CFLAGS@
    119 GTHREAD_LIBS = @GTHREAD_LIBS@
    120128GTK2_CFLAGS = @GTK2_CFLAGS@
    121129GTK2_LIBS = @GTK2_LIBS@
    122130HAVE_CURL_FALSE = @HAVE_CURL_FALSE@
    123131HAVE_CURL_TRUE = @HAVE_CURL_TRUE@
    124 HAVE_GTHREAD_FALSE = @HAVE_GTHREAD_FALSE@
    125 HAVE_GTHREAD_TRUE = @HAVE_GTHREAD_TRUE@
    126132HAVE_GTK2_FALSE = @HAVE_GTK2_FALSE@
    127133HAVE_GTK2_TRUE = @HAVE_GTK2_TRUE@
     
    144150PACKAGE_VERSION = @PACKAGE_VERSION@
    145151PATH_SEPARATOR = @PATH_SEPARATOR@
     152PKG_CONFIG = @PKG_CONFIG@
     153RANLIB = @RANLIB@
    146154SET_MAKE = @SET_MAKE@
    147155SHELL = @SHELL@
     
    152160ac_ct_CC = @ac_ct_CC@
    153161ac_ct_CXX = @ac_ct_CXX@
     162ac_ct_RANLIB = @ac_ct_RANLIB@
    154163ac_ct_STRIP = @ac_ct_STRIP@
    155164am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
     
    193202target_vendor = @target_vendor@
    194203MAINSRCDIR = ../../..
    195 AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/gaphics -I$(MAINSRCDIR)/lib/graphics/font -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai
     204AM_CXXFLAGS = $(GTK2_CFLAGS) $(GTHREAD_CFLAGS) $(CURL_CFLAGS) $(MSBITFIELDS) -I$(MAINSRCDIR) -I$(MAINSRCDIR)/world_entities -I$(MAINSRCDIR)/story_entities -I$(MAINSRCDIR)/lib -I$(MAINSRCDIR)/lib/coord -I$(MAINSRCDIR)/lib/data -I$(MAINSRCDIR)/lib/graphics -I$(MAINSRCDIR)/lib/graphics/importer -I$(MAINSRCDIR)/lib/gui -I$(MAINSRCDIR)/lib/lang -I$(MAINSRCDIR)/lib/util -I$(MAINSRCDIR)/lib/math -I$(MAINSRCDIR)/defs -I$(MAINSRCDIR)/font -I$(MAINSRCDIR)/network -I$(MAINSRCDIR)/glmenu -I$(MAINSRCDIR)/ai -I$(MAINSRCDIR)/util -I$(MAINSRCDIR)/util/animation -I$(MAINSRCDIR)/util/common
    196205
    197206#AM_LDFLAGS=$(GTK2_LIBS)   $(GTHREAD_LIBS)
    198207AM_LDFLAGS = $(GTK2_LIBS) $(GTHREAD_LIBS) $(CURL_LIBS)
    199 gui_SOURCES = orxonox_gui.cc \
    200             orxonox_gui_gtk.cc \
    201             orxonox_gui_video.cc \
    202             orxonox_gui_audio.cc \
    203             orxonox_gui_exec.cc \
    204             orxonox_gui_flags.cc \
    205             orxonox_gui_banner.cc \
    206             orxonox_gui_keys.cc \
    207             orxonox_gui_update.cc
    208 
    209 noinst_HEADERS = orxonox_gui.h \
    210             orxonox_gui_gtk.h \
    211             orxonox_gui_video.h \
    212             orxonox_gui_audio.h \
    213             orxonox_gui_exec.h \
    214             orxonox_gui_flags.h \
    215             orxonox_gui_banner.h \
    216             orxonox_gui_keys.h \
    217             orxonox_gui_update.h
     208gui_SOURCES = gui_main.cc \
     209            gui.cc \
     210            gui_gtk.cc \
     211            gui_element.cc \
     212            gui_video.cc \
     213            gui_audio.cc \
     214            gui_exec.cc \
     215            gui_flags.cc \
     216            gui_banner.cc \
     217            gui_keys.cc \
     218            gui_update.cc \
     219                  $(MAINSRCDIR)/lib/graphics/graphics_engine.cc \
     220                  $(MAINSRCDIR)/lib/lang/base_object.cc \
     221                  $(MAINSRCDIR)/lib/math/vector.cc \
     222                  $(MAINSRCDIR)/util/resource_manager.cc \
     223                  $(MAINSRCDIR)/lib/graphics/text_engine.cc \
     224                  $(MAINSRCDIR)/lib/coord/p_node.cc \
     225                  $(MAINSRCDIR)/lib/coord/null_parent.cc \
     226                  $(MAINSRCDIR)/lib/graphics/importer/array.cc \
     227                  $(MAINSRCDIR)/lib/graphics/importer/model.cc \
     228                  $(MAINSRCDIR)/lib/graphics/importer/objModel.cc \
     229                  $(MAINSRCDIR)/lib/graphics/importer/material.cc \
     230                  $(MAINSRCDIR)/lib/graphics/importer/texture.cc \
     231                  $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     232
     233noinst_HEADERS = gui.h \
     234            gui_gtk.h \
     235            gui_element.h \
     236            gui_video.h \
     237            gui_audio.h \
     238            gui_exec.h \
     239            gui_flags.h \
     240            gui_banner.h \
     241            gui_keys.h \
     242            gui_update.h
    218243
    219244
     
    293318        -rm -f *.tab.c
    294319
    295 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui.Po@am__quote@
    296 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_audio.Po@am__quote@
    297 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_banner.Po@am__quote@
    298 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_exec.Po@am__quote@
    299 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_flags.Po@am__quote@
    300 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_gtk.Po@am__quote@
    301 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_keys.Po@am__quote@
    302 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_update.Po@am__quote@
    303 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/orxonox_gui_video.Po@am__quote@
     320@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/array.Po@am__quote@
     321@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base_object.Po@am__quote@
     322@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphics_engine.Po@am__quote@
     323@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui.Po@am__quote@
     324@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_audio.Po@am__quote@
     325@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_banner.Po@am__quote@
     326@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_element.Po@am__quote@
     327@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_exec.Po@am__quote@
     328@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_flags.Po@am__quote@
     329@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_gtk.Po@am__quote@
     330@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_keys.Po@am__quote@
     331@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_main.Po@am__quote@
     332@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_update.Po@am__quote@
     333@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gui_video.Po@am__quote@
     334@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Po@am__quote@
     335@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/model.Po@am__quote@
     336@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/null_parent.Po@am__quote@
     337@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/objModel.Po@am__quote@
     338@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/p_node.Po@am__quote@
     339@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primitive_model.Po@am__quote@
     340@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource_manager.Po@am__quote@
     341@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/text_engine.Po@am__quote@
     342@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/texture.Po@am__quote@
     343@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vector.Po@am__quote@
    304344
    305345.cc.o:
     
    318358@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
    319359@am__fastdepCXX_FALSE@  $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
     360
     361graphics_engine.o: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     362@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.o -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc; \
     363@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
     364@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.o' libtool=no @AMDEPBACKSLASH@
     365@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@
     366@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     367@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     368
     369graphics_engine.obj: $(MAINSRCDIR)/lib/graphics/graphics_engine.cc
     370@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT graphics_engine.obj -MD -MP -MF "$(DEPDIR)/graphics_engine.Tpo" -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`; \
     371@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/graphics_engine.Tpo" "$(DEPDIR)/graphics_engine.Po"; else rm -f "$(DEPDIR)/graphics_engine.Tpo"; exit 1; fi
     372@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/graphics_engine.cc' object='graphics_engine.obj' libtool=no @AMDEPBACKSLASH@
     373@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/graphics_engine.Po' tmpdepfile='$(DEPDIR)/graphics_engine.TPo' @AMDEPBACKSLASH@
     374@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     375@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o graphics_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/graphics_engine.cc'; fi`
     376
     377base_object.o: $(MAINSRCDIR)/lib/lang/base_object.cc
     378@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.o -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc; \
     379@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
     380@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.o' libtool=no @AMDEPBACKSLASH@
     381@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@
     382@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     383@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.o `test -f '$(MAINSRCDIR)/lib/lang/base_object.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/lang/base_object.cc
     384
     385base_object.obj: $(MAINSRCDIR)/lib/lang/base_object.cc
     386@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT base_object.obj -MD -MP -MF "$(DEPDIR)/base_object.Tpo" -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`; \
     387@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/base_object.Tpo" "$(DEPDIR)/base_object.Po"; else rm -f "$(DEPDIR)/base_object.Tpo"; exit 1; fi
     388@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/lang/base_object.cc' object='base_object.obj' libtool=no @AMDEPBACKSLASH@
     389@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/base_object.Po' tmpdepfile='$(DEPDIR)/base_object.TPo' @AMDEPBACKSLASH@
     390@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     391@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o base_object.obj `if test -f '$(MAINSRCDIR)/lib/lang/base_object.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/lang/base_object.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/lang/base_object.cc'; fi`
     392
     393vector.o: $(MAINSRCDIR)/lib/math/vector.cc
     394@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.o -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc; \
     395@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi
     396@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.o' libtool=no @AMDEPBACKSLASH@
     397@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@
     398@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     399@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.o `test -f '$(MAINSRCDIR)/lib/math/vector.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/math/vector.cc
     400
     401vector.obj: $(MAINSRCDIR)/lib/math/vector.cc
     402@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT vector.obj -MD -MP -MF "$(DEPDIR)/vector.Tpo" -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`; \
     403@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/vector.Tpo" "$(DEPDIR)/vector.Po"; else rm -f "$(DEPDIR)/vector.Tpo"; exit 1; fi
     404@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/math/vector.cc' object='vector.obj' libtool=no @AMDEPBACKSLASH@
     405@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/vector.Po' tmpdepfile='$(DEPDIR)/vector.TPo' @AMDEPBACKSLASH@
     406@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     407@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o vector.obj `if test -f '$(MAINSRCDIR)/lib/math/vector.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/math/vector.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/math/vector.cc'; fi`
     408
     409resource_manager.o: $(MAINSRCDIR)/util/resource_manager.cc
     410@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.o -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc; \
     411@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
     412@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.o' libtool=no @AMDEPBACKSLASH@
     413@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
     414@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     415@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.o `test -f '$(MAINSRCDIR)/util/resource_manager.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/util/resource_manager.cc
     416
     417resource_manager.obj: $(MAINSRCDIR)/util/resource_manager.cc
     418@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT resource_manager.obj -MD -MP -MF "$(DEPDIR)/resource_manager.Tpo" -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi`; \
     419@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/resource_manager.Tpo" "$(DEPDIR)/resource_manager.Po"; else rm -f "$(DEPDIR)/resource_manager.Tpo"; exit 1; fi
     420@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/util/resource_manager.cc' object='resource_manager.obj' libtool=no @AMDEPBACKSLASH@
     421@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/resource_manager.Po' tmpdepfile='$(DEPDIR)/resource_manager.TPo' @AMDEPBACKSLASH@
     422@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     423@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o resource_manager.obj `if test -f '$(MAINSRCDIR)/util/resource_manager.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/util/resource_manager.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/util/resource_manager.cc'; fi`
     424
     425text_engine.o: $(MAINSRCDIR)/lib/graphics/text_engine.cc
     426@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.o -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc; \
     427@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     428@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.o' libtool=no @AMDEPBACKSLASH@
     429@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     430@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     431@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.o `test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/text_engine.cc
     432
     433text_engine.obj: $(MAINSRCDIR)/lib/graphics/text_engine.cc
     434@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT text_engine.obj -MD -MP -MF "$(DEPDIR)/text_engine.Tpo" -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi`; \
     435@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/text_engine.Tpo" "$(DEPDIR)/text_engine.Po"; else rm -f "$(DEPDIR)/text_engine.Tpo"; exit 1; fi
     436@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/text_engine.cc' object='text_engine.obj' libtool=no @AMDEPBACKSLASH@
     437@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/text_engine.Po' tmpdepfile='$(DEPDIR)/text_engine.TPo' @AMDEPBACKSLASH@
     438@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     439@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o text_engine.obj `if test -f '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/text_engine.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/text_engine.cc'; fi`
     440
     441p_node.o: $(MAINSRCDIR)/lib/coord/p_node.cc
     442@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.o -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc; \
     443@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi
     444@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.o' libtool=no @AMDEPBACKSLASH@
     445@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@
     446@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     447@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.o `test -f '$(MAINSRCDIR)/lib/coord/p_node.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/p_node.cc
     448
     449p_node.obj: $(MAINSRCDIR)/lib/coord/p_node.cc
     450@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT p_node.obj -MD -MP -MF "$(DEPDIR)/p_node.Tpo" -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi`; \
     451@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/p_node.Tpo" "$(DEPDIR)/p_node.Po"; else rm -f "$(DEPDIR)/p_node.Tpo"; exit 1; fi
     452@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/p_node.cc' object='p_node.obj' libtool=no @AMDEPBACKSLASH@
     453@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/p_node.Po' tmpdepfile='$(DEPDIR)/p_node.TPo' @AMDEPBACKSLASH@
     454@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     455@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o p_node.obj `if test -f '$(MAINSRCDIR)/lib/coord/p_node.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/p_node.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/p_node.cc'; fi`
     456
     457null_parent.o: $(MAINSRCDIR)/lib/coord/null_parent.cc
     458@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.o -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc; \
     459@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi
     460@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.o' libtool=no @AMDEPBACKSLASH@
     461@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@
     462@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     463@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.o `test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/coord/null_parent.cc
     464
     465null_parent.obj: $(MAINSRCDIR)/lib/coord/null_parent.cc
     466@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT null_parent.obj -MD -MP -MF "$(DEPDIR)/null_parent.Tpo" -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi`; \
     467@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/null_parent.Tpo" "$(DEPDIR)/null_parent.Po"; else rm -f "$(DEPDIR)/null_parent.Tpo"; exit 1; fi
     468@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/coord/null_parent.cc' object='null_parent.obj' libtool=no @AMDEPBACKSLASH@
     469@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/null_parent.Po' tmpdepfile='$(DEPDIR)/null_parent.TPo' @AMDEPBACKSLASH@
     470@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     471@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o null_parent.obj `if test -f '$(MAINSRCDIR)/lib/coord/null_parent.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/coord/null_parent.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/coord/null_parent.cc'; fi`
     472
     473array.o: $(MAINSRCDIR)/lib/graphics/importer/array.cc
     474@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.o -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc; \
     475@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     476@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.o' libtool=no @AMDEPBACKSLASH@
     477@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@
     478@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     479@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/array.cc
     480
     481array.obj: $(MAINSRCDIR)/lib/graphics/importer/array.cc
     482@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT array.obj -MD -MP -MF "$(DEPDIR)/array.Tpo" -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi`; \
     483@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/array.Tpo" "$(DEPDIR)/array.Po"; else rm -f "$(DEPDIR)/array.Tpo"; exit 1; fi
     484@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/array.cc' object='array.obj' libtool=no @AMDEPBACKSLASH@
     485@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/array.Po' tmpdepfile='$(DEPDIR)/array.TPo' @AMDEPBACKSLASH@
     486@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     487@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o array.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/array.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/array.cc'; fi`
     488
     489model.o: $(MAINSRCDIR)/lib/graphics/importer/model.cc
     490@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.o -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc; \
     491@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     492@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.o' libtool=no @AMDEPBACKSLASH@
     493@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     494@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     495@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/model.cc
     496
     497model.obj: $(MAINSRCDIR)/lib/graphics/importer/model.cc
     498@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT model.obj -MD -MP -MF "$(DEPDIR)/model.Tpo" -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi`; \
     499@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/model.Tpo" "$(DEPDIR)/model.Po"; else rm -f "$(DEPDIR)/model.Tpo"; exit 1; fi
     500@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/model.cc' object='model.obj' libtool=no @AMDEPBACKSLASH@
     501@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/model.Po' tmpdepfile='$(DEPDIR)/model.TPo' @AMDEPBACKSLASH@
     502@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     503@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/model.cc'; fi`
     504
     505objModel.o: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     506@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.o -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc; \
     507@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi
     508@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.o' libtool=no @AMDEPBACKSLASH@
     509@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@
     510@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     511@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     512
     513objModel.obj: $(MAINSRCDIR)/lib/graphics/importer/objModel.cc
     514@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT objModel.obj -MD -MP -MF "$(DEPDIR)/objModel.Tpo" -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi`; \
     515@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/objModel.Tpo" "$(DEPDIR)/objModel.Po"; else rm -f "$(DEPDIR)/objModel.Tpo"; exit 1; fi
     516@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/objModel.cc' object='objModel.obj' libtool=no @AMDEPBACKSLASH@
     517@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/objModel.Po' tmpdepfile='$(DEPDIR)/objModel.TPo' @AMDEPBACKSLASH@
     518@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     519@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o objModel.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/objModel.cc'; fi`
     520
     521material.o: $(MAINSRCDIR)/lib/graphics/importer/material.cc
     522@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.o -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc; \
     523@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     524@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.o' libtool=no @AMDEPBACKSLASH@
     525@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@
     526@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     527@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/material.cc
     528
     529material.obj: $(MAINSRCDIR)/lib/graphics/importer/material.cc
     530@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT material.obj -MD -MP -MF "$(DEPDIR)/material.Tpo" -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi`; \
     531@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/material.Tpo" "$(DEPDIR)/material.Po"; else rm -f "$(DEPDIR)/material.Tpo"; exit 1; fi
     532@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/material.cc' object='material.obj' libtool=no @AMDEPBACKSLASH@
     533@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/material.Po' tmpdepfile='$(DEPDIR)/material.TPo' @AMDEPBACKSLASH@
     534@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     535@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o material.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/material.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/material.cc'; fi`
     536
     537texture.o: $(MAINSRCDIR)/lib/graphics/importer/texture.cc
     538@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.o -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc; \
     539@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi
     540@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.o' libtool=no @AMDEPBACKSLASH@
     541@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@
     542@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     543@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/texture.cc
     544
     545texture.obj: $(MAINSRCDIR)/lib/graphics/importer/texture.cc
     546@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT texture.obj -MD -MP -MF "$(DEPDIR)/texture.Tpo" -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi`; \
     547@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/texture.Tpo" "$(DEPDIR)/texture.Po"; else rm -f "$(DEPDIR)/texture.Tpo"; exit 1; fi
     548@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/texture.cc' object='texture.obj' libtool=no @AMDEPBACKSLASH@
     549@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/texture.Po' tmpdepfile='$(DEPDIR)/texture.TPo' @AMDEPBACKSLASH@
     550@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     551@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o texture.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/texture.cc'; fi`
     552
     553primitive_model.o: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     554@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.o -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc; \
     555@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
     556@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.o' libtool=no @AMDEPBACKSLASH@
     557@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@
     558@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     559@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.o `test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' || echo '$(srcdir)/'`$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     560
     561primitive_model.obj: $(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc
     562@am__fastdepCXX_TRUE@   if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT primitive_model.obj -MD -MP -MF "$(DEPDIR)/primitive_model.Tpo" -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi`; \
     563@am__fastdepCXX_TRUE@   then mv -f "$(DEPDIR)/primitive_model.Tpo" "$(DEPDIR)/primitive_model.Po"; else rm -f "$(DEPDIR)/primitive_model.Tpo"; exit 1; fi
     564@AMDEP_TRUE@@am__fastdepCXX_FALSE@      source='$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc' object='primitive_model.obj' libtool=no @AMDEPBACKSLASH@
     565@AMDEP_TRUE@@am__fastdepCXX_FALSE@      depfile='$(DEPDIR)/primitive_model.Po' tmpdepfile='$(DEPDIR)/primitive_model.TPo' @AMDEPBACKSLASH@
     566@AMDEP_TRUE@@am__fastdepCXX_FALSE@      $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
     567@am__fastdepCXX_FALSE@  $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o primitive_model.obj `if test -f '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; then $(CYGPATH_W) '$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; else $(CYGPATH_W) '$(srcdir)/$(MAINSRCDIR)/lib/graphics/importer/primitive_model.cc'; fi`
    320568uninstall-info-am:
    321569
  • orxonox/branches/openAL/src/lib/gui/gui/rc

    r3423 r4194  
    1 # pixmap_path "<dir 1>:<dir 2>:<dir 3>:..."
    2 #
    3 pixmap_path "/usr/include/X11R6/pixmaps:/home/imain/pixmaps"
    4 #
    5 # style <name> [= <name>]
    6 # {
    7 #   <option>
    8 # }
    9 #
    10 # widget <widget_set> style <style_name>
    11 # widget_class <widget_class_set> style <style_name>
    12 
    13 # Here is a list of all the possible states.  Note that some do not apply to
    14 # certain widgets.
    15 #
    16 # NORMAL - The normal state of a widget, without the mouse over top of
    17 # it, and not being pressed, etc.
    18 #
    19 # PRELIGHT - When the mouse is over top of the widget, colors defined
    20 # using this state will be in effect.
    21 #
    22 # ACTIVE - When the widget is pressed or clicked it will be active, and
    23 # the attributes assigned by this tag will be in effect.
    24 #
    25 # INSENSITIVE - When a widget is set insensitive, and cannot be
    26 # activated, it will take these attributes.
    27 #
    28 # SELECTED - When an object is selected, it takes these attributes.
    29 #
    30 # Given these states, we can set the attributes of the widgets in each of
    31 # these states using the following directives.
    32 #
    33 # fg - Sets the foreground color of a widget.
    34 # bg - Sets the background color of a widget.
    35 # bg_pixmap - Sets the background of a widget to a tiled pixmap.
    36 # font - Sets the font to be used with the given widget.
    37 #
    38 
    39 # This sets a style called "button".  The name is not really important, as
    40 # it is assigned to the actual widgets at the bottom of the file.
    41 
    42 style "window"
    43 {
    44   #This sets the padding around the window to the pixmap specified.
    45   #bg_pixmap[<STATE>] = "<pixmap filename>"
    46   #bg_pixmap[NORMAL] = "warning.xpm"
    47   bg[NORMAL] = { 0, 0, 0 }
    48   fg[NORMAL] = { 0, 1.0, 0 }
    49   base[NORMAL] = { 0, 0, 0 }
    50   base[INSENSITIVE] = { 0, 0, 0 }
    51 }
    52 
    53 style "scale"
    54 {
    55   #Sets the foreground color (font color) to red when in the "NORMAL"
    56   #state.
    57  
    58   fg[NORMAL] = { 0, 1.0, 0 }
    59   bg[NORMAL] = { 0, 1.0, 0 }
    60   bg[INSENSITIVE] = { 0, 1.0, 0 }
    61   bg[PRELIGHT] = { 0, 1.0, 0 }
    62   bg[ACTIVE] =   {0.2, 0.2, 0.2 }
    63  
    64   #Sets the background pixmap of this widget to that of its parent.
    65   bg_pixmap[NORMAL] = "<parent>"
    66 }
    67 
    68 style "button"
    69 {
    70   # This shows all the possible states for a button.  The only one that
    71   # doesn't apply is the SELECTED state.
    72  
    73   fg[PRELIGHT] = { 0, 0, 0 }
    74   bg[PRELIGHT] = { 0, 1.0, 0 }
    75   bg[ACTIVE] = { 0, 1.0, 0 }
    76   fg[ACTIVE] = { 0, 1.0, 0 }
    77   bg[NORMAL] = { 0, 0, 0 }
    78   fg[NORMAL] = { 0, 1.0, 0 }
    79   bg[INSENSITIVE] = { 1.0, 0, 1.0 }
    80   fg[INSENSITIVE] = { 1.0, 0, 1.0 }
    81   base[NORMAL] = { 0, 1.0, 0 }
    82   base[PRELIGHT] = { 0, 1.0, 0 }
    83 }
    84 
    85 # In this example, we inherit the attributes of the "button" style and then
    86 # override the font and background color when prelit to create a new
    87 # "main_button" style.
    88 
    89 style "main_button" = "button"
    90 {
    91   font = "-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*"
    92   bg[PRELIGHT] = { 0, 0.75, 0 }
    93 }
    94 
    95 style "toggle_button" = "button"
    96 {
    97   fg[NORMAL] = { 0, 1.0, 0 }
    98   fg[ACTIVE] = { 0, 1.0, 0 }
    99   text[NORMAL] = { 0, 0, 0}
    100   # This sets the background pixmap of the toggle_button to that of its
    101   # parent widget (as defined in the application).
    102   #bg_pixmap[NORMAL] = "<parent>"
    103 }
    104 
    105 style "text"
    106 {
    107   #bg_pixmap[NORMAL] = "marble.xpm"
    108   fg[NORMAL] = { 0, 1.0, 0 }
    109 }
    110 
    111 style "ruler"
    112 {
    113   font = "-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*"
    114 }
    115 
    116 # pixmap_path "~/.pixmaps"
    117 
    118 # These set the widget types to use the styles defined above.
    119 # The widget types are listed in the class hierarchy, but could probably be
    120 # just listed in this document for the users reference.
    121 
    122 widget_class "GtkWindow"           style "window"
    123 widget_class "GtkFrame"            style "window"
    124 widget_class "Gtk*EventBox"        style "window"
    125 widget_class "GtkDialog"           style "window"
    126 widget_class "GtkFileSelection"    style "window"
    127 widget_class "*Gtk*Scale"          style "scale"
    128 widget_class "*GtkCheckButton*"    style "toggle_button"
    129 widget_class "*Gtk*Menu*"          style "toggle_button"
    130 widget_class "*GtkRadioButton*"    style "toggle_button"
    131 widget_class "*GtkButton*"         style "button"
    132 widget_class "*Ruler"              style "ruler"
    133 widget_class "*GtkText"            style "text"
    134 widget_class "*GtkLabel"           style "text"
     1/*
     2 * style <name> [= <name>]
     3 * {
     4 *   <option>
     5 * }
     6 *
     7 * widget <widget_set> style <style_name>
     8 * widget_class <widget_class_set> style <style_name>
     9 *
     10 * Here is a list of all the possible states.  Note that some do not apply to
     11 * certain widgets.
     12 *
     13 * NORMAL - The normal state of a widget, without the mouse over top of
     14 * it, and not being pressed, etc.
     15 *
     16 * PRELIGHT - When the mouse is over top of the widget, colors defined
     17 * using this state will be in effect.
     18 *
     19 * ACTIVE - When the widget is pressed or clicked it will be active, and
     20 * the attributes assigned by this tag will be in effect.
     21 *
     22 * INSENSITIVE - When a widget is set insensitive, and cannot be
     23 * activated, it will take these attributes.
     24 *
     25 * SELECTED - When an object is selected, it takes these attributes.
     26 *
     27 * Given these states, we can set the attributes of the widgets in each of
     28 * these states using the following directives.
     29 *
     30 * fg - Sets the foreground color of a widget.
     31 * bg - Sets the background color of a widget.
     32 * bg_pixmap - Sets the background of a widget to a tiled pixmap.
     33 * base - Sets the base of Widgets
     34 * font - Sets the font to be used with the given widget.
     35*/
    13536
    13637
    137 # This sets all the buttons that are children of the "main window" to
    138 # the main_button style.  These must be documented to be taken advantage of.
    139 widget "main window.*GtkButton*" style "main_button"
     38
     39static const gchar* rc_string =
     40(
     41"style'orxonox'"
     42"{"
     43"fg[NORMAL]      = { 0.0, 1.0, 0.0 }"
     44"fg[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     45"fg[ACTIVE]      = { 0.0, 1.0, 0.0 }"
     46"fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }"
     47"fg[SELECTED]    = { 0.0, 1.0, 0.0 }"
     48
     49"bg[NORMAL]      = { 0.0, 0.0, 0.0 }"
     50"bg[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     51"bg[ACTIVE]      = { 0.0, 0.3, 0.0 }"
     52"bg[INSENSITIVE] = { 0.0, 0.1, 0.0 }"
     53"bg[SELECTED]    = { 0.0, 0.1, 0.0 }"
     54
     55"base[NORMAL]      = { 0.0, 1.0, 0.0 }"
     56"base[PRELIGHT]    = { 0.0, 1.0, 0.0 }"
     57"base[ACTIVE]      = { 0.0, 1.0, 0.0 }"
     58"base[INSENSITIVE] = { 0.0, 1.0, 0.0 }"
     59"base[SELECTED]    = { 0.0, 1.0, 0.0 }"
     60
     61"font              = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'"
     62"}"
     63
     64"style'window'"
     65"{"                     
     66"bg[NORMAL] = { 0, 0, 0 }"
     67"fg[NORMAL] = { 0, 1.0, 0 }"
     68"base[NORMAL] = { 0, 0, 0 }"
     69"base[INSENSITIVE] = { 0, 0, 0 }"
     70"}"
     71
     72"style'frame'"
     73"{"
     74"bg[NORMAL]  = { 0.0, 0.4, 0.0 }"
     75"}"
     76
     77"style'scale'"
     78"{"
     79"fg[NORMAL] = { 0, 1.0, 0 }"
     80"bg[NORMAL] = { 0, 1.0, 0 }"
     81"bg[INSENSITIVE] = { 0, 1.0, 0 }"
     82"bg[PRELIGHT] = { 0, 1.0, 0 }"
     83"bg[ACTIVE] =   {0.2, 0.2, 0.2 }"
     84"}"
     85
     86"style'button'"
     87"{"
     88"fg[PRELIGHT] = { 0, 0, 0 }"
     89"bg[PRELIGHT] = { 0, 1.0, 0 }"
     90"bg[ACTIVE] = { 0, 1.0, 0 }"
     91"fg[ACTIVE] = { 0, 1.0, 0 }"
     92"bg[NORMAL] = { 0, 0, 0 }"
     93"fg[NORMAL] = { 0, 1.0, 0 }"
     94"bg[INSENSITIVE] = { 0.0, 0.2, 0.0 }"
     95"fg[INSENSITIVE] = { 0.0, 0.8, 0.0 }"
     96"base[NORMAL] = { 0, 1.0, 0 }"
     97"base[PRELIGHT] = { 0, 1.0, 0 }"
     98"}"
     99
     100"style'main_button' = 'button'"
     101"{"
     102"font = '-adobe-helvetica-medium-r-normal--*-100-*-*-*-*-*-*'"
     103"bg[PRELIGHT] = { 0, 0.75, 0 }"
     104"}"
     105
     106"style'toggle_button' = 'button'"
     107"{"
     108"fg[NORMAL] = { 0, 1.0, 0 }"
     109"fg[ACTIVE] = { 0, 1.0, 0 }"
     110"text[NORMAL] = { 0, 0, 0}"
     111"}"
     112
     113"style'text'"
     114"{"
     115"fg[NORMAL] = { 0, 1.0, 0 }"
     116"}"
     117
     118"style'ruler'"
     119"{"
     120"font = '-adobe-helvetica-medium-r-normal--*-20-*-*-*-*-*-*'"
     121"}"
     122
     123"widget'Gtk*'                   style'orxonox'"
     124"widget'*Gtk*Frame*'              style'frame'"
     125"widget'GtkWindow'              style'window'"
     126"widget'GtkFileSelection'       style'window'"
     127"widget'*Gtk*Scale'             style'scale'"
     128"widget'*GtkCheckButton*'       style'toggle_button'"
     129"widget'*Gtk*Menu*'             style'toggle_button'"
     130"widget'*GtkRadioButton*'       style'toggle_button'"
     131"widget'*GtkButton*'            style'button'"
     132"widget'*Ruler'                 style'ruler'"
     133"widget'*GtkText'               style'text'"
     134"widget'*GtkLabel'              style'text'"
     135
     136"widget'main window.*GtkButton*' style 'main_button'"
     137
     138
     139);
  • orxonox/branches/openAL/src/lib/math/vector.cc

    r3860 r4194  
    100100*/
    101101
    102 Vector* Vector::getNormalized()
     102Vector Vector::getNormalized()
    103103{
    104104  float l = len();
    105105  if(unlikely(l != 1.0))
    106106    {
    107       return this;
     107      return *this;
    108108    }
    109109  else if(unlikely(l == 0.0))
    110110    {
    111       return 0;
     111      return *this;
    112112    }
    113113
    114   return new Vector(x / l, y /l, z / l);
     114  return *this / l;
    115115}
    116116
     
    172172   \brief Outputs the values of the Vector
    173173*/
    174 void Vector::debug(void)
     174void Vector::debug(void) const
    175175{
    176176  PRINT(0)("Vector Debug information\n");
     
    435435/**
    436436   \brief performs a smooth move.
    437    \param from from where
    438    \param to to where
    439    \param t the time this transformation should take
    440    \param res The approximation-density
    441 */
    442 void Quaternion::quatSlerp(const Quaternion* from, const Quaternion* to, float t, Quaternion* res)
     437   \param from  where
     438   \param to where
     439   \param t the time this transformation should take value [0..1]
     440
     441   \returns the Result of the smooth move
     442*/
     443Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t)
    443444{
    444445  float tol[4];
    445446  double omega, cosom, sinom, scale0, scale1;
    446   DELTA = 0.2;
    447 
    448   cosom = from->v.x * to->v.x + from->v.y * to->v.y + from->v.z * to->v.z + from->w * to->w;
     447  //  float DELTA = 0.2;
     448
     449  cosom = from.v.x * to.v.x + from.v.y * to.v.y + from.v.z * to.v.z + from.w * to.w;
    449450
    450451  if( cosom < 0.0 )
    451452    {
    452453      cosom = -cosom;
    453       tol[0] = -to->v.x;
    454       tol[1] = -to->v.y;
    455       tol[2] = -to->v.z;
    456       tol[3] = -to->w;
     454      tol[0] = -to.v.x;
     455      tol[1] = -to.v.y;
     456      tol[2] = -to.v.z;
     457      tol[3] = -to.w;
    457458    }
    458459  else
    459460    {
    460       tol[0] = to->v.x;
    461       tol[1] = to->v.y;
    462       tol[2] = to->v.z;
    463       tol[3] = to->w;
     461      tol[0] = to.v.x;
     462      tol[1] = to.v.y;
     463      tol[2] = to.v.z;
     464      tol[3] = to.w;
    464465    }
    465466 
    466467  //if( (1.0 - cosom) > DELTA )
    467468  //{
    468       omega = acos(cosom);
    469       sinom = sin(omega);
    470       scale0 = sin((1.0 - t) * omega) / sinom;
    471       scale1 = sin(t * omega) / sinom;
    472       //}
    473       /*
    474   else
     469  omega = acos(cosom);
     470  sinom = sin(omega);
     471  scale0 = sin((1.0 - t) * omega) / sinom;
     472  scale1 = sin(t * omega) / sinom;
     473  //}
     474  /*
     475    else
    475476    {
    476       scale0 = 1.0 - t;
    477       scale1 = t;
     477    scale0 = 1.0 - t;
     478    scale1 = t;
    478479    }
    479       */
    480   res->v.x = scale0 * from->v.x + scale1 * tol[0];
    481   res->v.y = scale0 * from->v.y + scale1 * tol[1];
    482   res->v.z = scale0 * from->v.z + scale1 * tol[2];
    483   res->w = scale0 * from->w + scale1 * tol[3];
     480  */
     481
     482
     483  /*
     484    Quaternion res;
     485    res.v.x = scale0 * from.v.x + scale1 * tol[0];
     486    res.v.y = scale0 * from.v.y + scale1 * tol[1];
     487    res.v.z = scale0 * from.v.z + scale1 * tol[2];
     488    res.w = scale0 * from.w + scale1 * tol[3];
     489  */
     490  return Quaternion(Vector(scale0 * from.v.x + scale1 * tol[0],
     491                           scale0 * from.v.y + scale1 * tol[1],
     492                           scale0 * from.v.z + scale1 * tol[2]),
     493                    scale0 * from.w + scale1 * tol[3]);
    484494}
    485495
  • orxonox/branches/openAL/src/lib/math/vector.h

    r3860 r4194  
    3131
    3232  inline Vector operator+ (const Vector& v) const { return Vector(x + v.x, y + v.y, z + v.z); }
     33  inline const Vector& operator+= (const Vector& v) {this->x += v.x; this->y += v.y; this->z += v.z; return *this;}
    3334  inline Vector operator- (const Vector& v) const { return Vector(x - v.x, y - v.y, z - v.z); }
     35  inline const Vector& operator-= (const Vector& v) {this->x -= v.x; this->y -= v.y; this->z -= v.z; return *this;}
    3436  inline float operator* (const Vector& v) const { return x * v.x + y * v.y + z * v.z; }
     37  inline const Vector& operator*= (const Vector& v) {this->x *= v.x; this->y *= v.y; this->z *= v.z; return *this;}
    3538  inline Vector operator* (float f) const { return Vector(x * f, y * f, z * f); }
     39  inline const Vector& operator*= (float f) {this->x *= f; this->y *= f; this->z *= f; return *this;}
    3640  Vector operator/ (float f) const;
     41  inline const Vector& operator/= (float f) {this->x /= f; this->y /= f; this->z /= f; return *this;}
     42  inline const Vector& operator= (const Vector& v) {this->x = v.x; this->y = v.y; this->z = v.z; return *this;}
    3743  float dot (const Vector& v) const;
    38   inline Vector cross (const Vector& v) const {  return Vector(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); }
     44  inline Vector cross (const Vector& v) const { return Vector(y * v.z - z * v.y, z * v.x - x * v.z, x * v.y - y * v.x ); }
    3945  void scale(const Vector& v);
    4046  inline float len() const { return sqrt (x*x+y*y+z*z); }
     
    5056                      z = z / l;
    5157                    }
    52   Vector* getNormalized();
     58  Vector getNormalized();
    5359  Vector abs();
    5460
    55   void debug();
     61  void debug() const;
    5662};
    5763
     
    7076 
    7177  inline Quaternion () { w = 1; v = Vector(0,0,0); }
    72   inline Quaternion (const Vector& b, float a) { w = a; v = b; }
     78  inline Quaternion (const Vector& v, float f) { this->w = f; this->v = v; }
    7379  Quaternion (float m[4][4]);
    7480  inline Quaternion (float angle, const Vector& axis) { w = cos(angle/2); v = axis * sin(angle/2); }
     
    7682  Quaternion (float roll, float pitch, float yaw);
    7783  Quaternion operator/ (const float& f) const;
     84  inline const Quaternion operator/= (const float& f) {*this = *this / f; return *this;}
    7885  Quaternion operator* (const float& f) const;
     86  inline const Quaternion operator*= (const float& f) {*this = *this * f; return *this;}
    7987  Quaternion operator* (const Quaternion& q) const;
     88  inline const Quaternion operator*= (const Quaternion& q) {*this = *this * q; return *this;}
    8089  inline Quaternion operator+ (const Quaternion& q) const { return Quaternion(q.v + v, q.w + w); }
     90  inline const Quaternion& operator+= (const Quaternion& q) {this->v += q.v; this->w += q.w; return *this;}
    8191  inline Quaternion operator- (const Quaternion& q) const { return Quaternion(q.v - v, q.w - w); }
     92  inline const Quaternion& operator-= (const Quaternion& q) {this->v -= q.v; this->w -= q.w; return *this;}
     93  inline Quaternion operator= (const Quaternion& q) {this->v = q.v; this->w = q.w; return *this;}
    8294  Quaternion conjugate () const {  Quaternion r(*this);
    8395  r.v = Vector() - r.v;
     
    8799  float norm () const;
    88100  void matrix (float m[4][4]) const;
    89   void quatSlerp(const Quaternion* from, const Quaternion* to, const float t, Quaternion* res);
    90101 
    91102  void debug();
    92  private:
    93   float DELTA;      //!< resolution of calculation
     103};
    94104
    95 };
     105Quaternion quatSlerp(const Quaternion& from, const Quaternion& to, float t);
     106
     107
    96108
    97109//! 3D rotation (OBSOLETE)
  • orxonox/branches/openAL/src/lib/util/ini_parser.cc

    r3484 r4194  
    1616
    1717#include "ini_parser.h"
     18#include "resource_manager.h"
    1819
    1920using namespace std;
    2021
    2122/**
    22         \brief constructs an IniParser using a file
    23         \param filename: the path and name of the file to parse
     23   \brief constructs an IniParser using a file
     24   \param filename: the path and name of the file to parse
    2425*/
    25 IniParser::IniParser (char* filename)
     26IniParser::IniParser (const char* filename)
    2627{
    2728  stream = NULL;
    2829  bInSection = false;
    29   openFile(filename);
     30  this->openFile(filename);
    3031}
    3132
    3233/**
    33         \brief removes the IniParser from memory
     34   \brief removes the IniParser from memory
    3435*/
    3536IniParser::~IniParser ()
     
    4344   \return zero on success or -1 if an error occured;
    4445*/
    45 int IniParser::openFile( char* filename)
     46int IniParser::openFile(const char* filename)
    4647{
     48  char* tmpName = ResourceManager::homeDirCheck(filename);
    4749  if( filename == NULL) return -1;
    4850  if( stream != NULL)   fclose (stream);
    49   if( (stream = fopen (filename, "r")) == NULL)
     51  if( (stream = fopen (tmpName, "r")) == NULL)
    5052    {
    51       printf("IniParser could not open %s\n", filename);
     53      PRINTF(1)("IniParser could not open %s\n", filename);
     54      delete tmpName;
    5255      return -1;
    5356    }
    5457  bInSection = false;
     58  delete tmpName;
    5559  return 0;
    5660}
     
    123127          return -1;
    124128        }
    125       if( (ptr = strchr( linebuffer, '=')) != NULL)
     129      sscanf(linebuffer, "%s = %s", name, value);
     130      return 0;
     131      /*
     132        if( (ptr = strchr( tmpBuffer, '=')) != NULL)
    126133        {
    127           if( ptr == linebuffer) continue;
    128           strcpy (value, &ptr[1]);
    129           strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
    130           return 0;
     134        if( ptr == linebuffer) continue;
     135        strcpy (value, &ptr[1]);
     136        strncpy (name, linebuffer, strlen (linebuffer) - strlen (value) - 1);
     137        printf ("%s, %s\n", value, name);
     138        return 0;
    131139        }
     140      */
    132141    }
    133142  return -1;   
     
    144153   lead to unwanted behaviour.
    145154*/
    146 char* IniParser::getVar( char* name, char* section, char* defvalue = "")
     155char* IniParser::getVar(const char* name, char* section, char* defvalue = "")
    147156{
    148157  strcpy (internbuf, defvalue);
  • orxonox/branches/openAL/src/lib/util/ini_parser.h

    r3484 r4194  
    2626       
    2727 public:
    28   IniParser (char* filename);
     28  IniParser (const char* filename);
    2929  ~IniParser ();
    3030 
    31   char* getVar( char* name, char* section, char* defvalue);
    32         int openFile( char* name);
     31  char* getVar(const char* name, char* section, char* defvalue);
     32  int openFile(const char* name);
    3333  int getSection( char* section);
    3434  int nextVar( char* name, char* value);
Note: See TracChangeset for help on using the changeset viewer.