Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10201 in orxonox.OLD for branches


Ignore:
Timestamp:
Jan 10, 2007, 11:14:32 AM (18 years ago)
Author:
patrick
Message:

tracing a bug within the mp structure

Location:
branches/mount_points/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/lib/graphics/importer/model.cc

    r9869 r10201  
    1717
    1818#include "model.h"
    19 
     19#include "debug.h"
    2020#include "glincl.h"
    2121
     
    8888  glEnd();
    8989}
     90
     91
     92/**
     93 * adds a mounting point to the model
     94 * @param up up vector
     95 * @param forward forward vector
     96 * @param center center vector
     97 */
     98void Model::addMountPoint(const Vector& up, const Vector& forward, const Vector& center, const std::string& name)
     99{
     100  PRINTF(0)("added mount point\n");
     101
     102  mountPointSkeleton mps;
     103  mps.up = up;
     104  mps.forward = forward;
     105  mps.center = center;
     106  mps.name = name;
     107
     108  this->mountPoints.push_back(mps);
     109  PRINTF(0)(" size: %i\n", this->mountPoints.size());
     110}
  • branches/mount_points/src/lib/graphics/importer/model.h

    r10185 r10201  
    100100    /** @returns a list of mounting points */
    101101    inline const mpList& getMountPoints() const { return this->mountPoints; }
    102     /** adds a mounting point to the model @param up up vector @param forward forward vector @param center center vector */
    103     inline void addMountPoint(const Vector& up, const Vector& forward, const Vector& center, const std::string& name)
    104     { mountPointSkeleton mps; mps.up = up; mps.forward = forward; mps.center = center; mps.name = name; this->mountPoints.push_back(mps); }
     102    void addMountPoint(const Vector& up, const Vector& forward, const Vector& center, const std::string& name);
    105103
    106104
  • branches/mount_points/src/world_entities/world_entity.cc

    r10185 r10201  
    209209      {
    210210        this->setModel(model, modelNumber);
     211        PRINTF(0)("model number: %i\n", modelNumber);
     212
    211213        if( modelNumber == 0)
    212214        {
     
    279281
    280282  // first get all mount points from the model
    281   std::list<mountPointSkeleton> mpList = this->getModel(0)->getMountPoints();
     283  std::list<mountPointSkeleton> mpList = this->getModel()->getMountPoints();
    282284  // for each skeleton create a mounting point world entity
    283285  std::list<mountPointSkeleton>::const_iterator it = mpList.begin();
    284286
     287  PRINTF(0)("->>>> size: %i\n", mpList.size());
     288
    285289  for( ; it != mpList.end(); it++)
    286290  {
    287     MountPoint* mp = new MountPoint((*it).up, (*it).forward, (*it).center, (*it).name);
    288 
    289     std::string nrStr = (*it).name.substr(1, 2);;
     291    MountPoint* mp = new MountPoint( (*it).up, (*it).forward, (*it).center, (*it).name);
     292
     293    std::string nrStr = (*it).name.substr(1, 2);
    290294
    291295    PRINTF(0)("got mp nr: %s\n", nrStr.c_str());
     
    297301  this->oiFile = new ObjectInformationFile(fileName);
    298302
     303  PRINTF(0)("\n");
    299304
    300305
Note: See TracChangeset for help on using the changeset viewer.