Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7059 in orxonox.OLD for trunk/src/lib/graphics/importer/md2Model.cc


Ignore:
Timestamp:
Feb 6, 2006, 5:02:09 PM (18 years ago)
Author:
bensch
Message:

md2 model resource managed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/graphics/importer/md2Model.cc

    r7058 r7059  
    7777MD2Model::MD2Model(const char* modelFileName, const char* skinFileName, float scale)
    7878{
    79   this->data->scaleFactor = scale;
    80   this->scaleFactor = this->data->scaleFactor;
    81 
    8279  /* this creates the data container via ressource manager */
    83   this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName);
     80  this->data = (MD2Data*)ResourceManager::getInstance()->load(modelFileName, MD2, RP_GAME, skinFileName, scale);
    8481  if( unlikely(this->data == NULL))
    8582    PRINTF(0)("The model was not found, MD2Model Loader finished abnormaly. Update the data-repos\n");
     83
     84  this->scaleFactor = scale;
    8685
    8786  shadeDots = MD2Model::anormsDots[0];
     
    338337  \brief simple constructor
    339338*/
    340 MD2Data::MD2Data(const char* modelFileName, const char* skinFileName)
    341 {
     339MD2Data::MD2Data(const char* modelFileName, const char* skinFileName, float scale)
     340{
     341  scale *= 0.1f;
     342
    342343  this->pVertices = NULL;
    343344  this->pGLCommands = NULL;
     
    351352
    352353//   this->scaleFactor = 1.0f;
    353   this->scaleFactor = 0.1f;
     354  this->scaleFactor = scale;
    354355
    355356  this->fileName = NULL;
Note: See TracChangeset for help on using the changeset viewer.