Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Aug 16, 2005, 11:46:55 PM (20 years ago)
Author:
bensch
Message:

orxonox/trunk: model scaleable

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orxonox/trunk/src/world_entities/world_entity.cc

    r5046 r5057  
    6464 * loads a Model onto a WorldEntity
    6565 * @param fileName the name of the model to load
    66 */
    67 void WorldEntity::loadModel(const char* fileName)
     66 * @param scaling the Scaling of the model
     67*/
     68void WorldEntity::loadModelWithScale(const char* fileName, float scaling)
    6869{
    6970  if (this->model)
     
    7273  {
    7374    PRINTF(4)("loading %s\n", fileName);
    74     this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
     75    if (scaling == 1.0)
     76      this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN);
     77    else
     78      this->model = (Model*)ResourceManager::getInstance()->load(fileName, OBJ, RP_CAMPAIGN, &scaling);
     79
    7580    PRINTF(4)("creating obb tree\n");
    7681    this->obbTree = new OBBTree(4, (sVec3D*)this->model->getVertexArray(), this->model->getVertexCount());
     
    7984    this->model = NULL;
    8085}
     86
     87
    8188
    8289/**
Note: See TracChangeset for help on using the changeset viewer.