Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 10052 in orxonox.OLD for branches/mount_points/src/world_entities


Ignore:
Timestamp:
Dec 13, 2006, 12:22:11 AM (17 years ago)
Author:
patrick
Message:

integrating loading to we

Location:
branches/mount_points/src/world_entities
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/mount_points/src/world_entities/world_entity.cc

    r10013 r10052  
    2424#include "md2/md2Model.h"
    2525#include "md3/md3_model.h"
     26#include "oif/object_information_file.h"
    2627
    2728#include "aabb_tree_node.h"
     
    191192    {
    192193      PRINTF(4)("fetching OBJ file: %s\n", fileName.c_str());
     194      // creating the model and loading it
    193195      StaticModel* model = new StaticModel();
    194196      *model = ResourceOBJ(fileName, this->scaling);
     
    201203      else
    202204        delete model;
     205
     206      // now get the object information file for this model, if any
     207      std::string oifName = fileName.substr(0, fileName.length() - 3) + ".oif";
     208      this->loadObjectInformationFile( oifName);
    203209    }
    204210    /// LOADING AN MD2-model
     
    246252
    247253  this->models[modelNumber] = model;
     254}
     255
     256
     257
     258/**
     259 * loads the object information file for this model
     260 * @param fileName the name of the file
     261 */
     262void WorldEntity::loadObjectInformationFile(const std::string& fileName)
     263{
     264  PRINTF(0)("loading the oif File: %s", fileName.c_str());
    248265}
    249266
  • branches/mount_points/src/world_entities/world_entity.h

    r10013 r10052  
    3232class AABBTreeNode;
    3333class Model;
     34class ObjectInformationFile;
    3435
    3536
     
    4950  void setModel(Model* model, unsigned int modelNumber = 0);
    5051  Model* getModel(unsigned int modelNumber = 0) const { return (this->models.size() > modelNumber)? this->models[modelNumber] : NULL; };
     52
     53  void loadObjectInformationFile(const std::string& fileName);
    5154
    5255  inline void loadMD2Texture(const std::string& fileName) { this->md2TextureFileName = fileName; }
     
    185188
    186189  std::vector<Model*>     models;             //!< The model that should be loaded for this entity.
     190  ObjectInformationFile*  oiFile;             //!< Reference to the object information file discribing the model of this WE
    187191  std::string             md2TextureFileName; //!< the file name of the md2 model texture, only if this
    188192  std::string             modelLODName;       //!< the name of the model lod file
Note: See TracChangeset for help on using the changeset viewer.