Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

integrating loading to we

Location:
branches/mount_points/src/lib/graphics/importer/oif
Files:
4 edited

Legend:

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

    r10051 r10052  
    2121
    2222
     23
    2324/**
    2425 * standard constructor
     26 */
     27ObjectInformationFile::ObjectInformationFile()
     28{
     29}
     30
     31/**
     32 *  constructor
    2533 * @todo this constructor is not jet implemented - do it
    2634*/
    27 ObjectInformationFile::ObjectInformationFile()
     35ObjectInformationFile::ObjectInformationFile(const std::string& fileName)
    2836{
    29   this->data = ResourceOIF("adsf").data;
     37  // load the oif file
     38  this->data = ResourceOIF(fileName).data;
    3039
    3140}
  • branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h

    r10051 r10052  
    77#define _OBJECT_INFORMATION_FILE_H
    88
    9 #include "vertex_array_model.h"
     9#include "base_object.h"
    1010
    1111#include "count_pointer.h"
     
    2929
    3030//! A class for object informations
    31 class ObjectInformationFile : public VertexArrayModel
     31class ObjectInformationFile : BaseObject
    3232{
    3333
    3434public:
    3535  ObjectInformationFile();
     36  ObjectInformationFile(const std::string& fileName);
    3637  virtual ~ObjectInformationFile();
    3738
  • branches/mount_points/src/lib/graphics/importer/oif/resource_oif.cc

    r10051 r10052  
    77
    88
    9 ResourceOIF::ResourceOIF(const std::string& modelName, const Resources::KeepLevel& keepLevel)
     9ResourceOIF::ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel)
    1010    : Resource(&ResourceOIF::type)
    1111{
    12   Resources::StorePointer* ptr = this->acquireResource(loadString(modelName));
     12  Resources::StorePointer* ptr = this->acquireResource(fileName);
    1313
    1414  if (ptr)
    1515  {
    16     PRINTF(0)("FOUND OIF: %s\n", modelName.c_str());
     16    PRINTF(0)("FOUND OIF: %s\n", fileName.c_str());
    1717    //this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr());
    1818  }
    1919  else
    2020  {
    21     PRINTF(0)("NOT FOUND OIF: %s\n", modelName.c_str());
     21    PRINTF(0)("NOT FOUND OIF: %s\n", fileName.c_str());
    2222//     std::string modelFileName = this->Resource::locateFile(modelName);
    2323//     //std::string skinFileName = this->Resource::locateFile(skinName);
     
    3131{
    3232  SubString loadValues(loadString, ',');
    33   std::string modelName;
    34   std::string skinName;
    35   float scale = 1.0f;
     33  std::string fileName;
    3634  if (loadValues.size() > 0)
    37     modelName = loadValues[0];
    38   if (loadValues.size() > 1)
    39     skinName = loadValues[1];
    40   if (loadValues.size() > 2)
    41     scale = MultiType(loadValues[2]).getFloat();
     35    fileName = loadValues[0];
    4236
    43   return ResourceOIF(modelName);
     37  return ResourceOIF(fileName);
    4438}
    4539
    46 std::string ResourceOIF::loadString(const std::string& modelName)
    47 {
    48   return modelName;
    49 }
    5040
    5141
  • branches/mount_points/src/lib/graphics/importer/oif/resource_oif.h

    r10051 r10052  
    1515{
    1616public:
    17   ResourceOIF(const std::string& modelName,
    18               const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
     17  ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
    1918  static ResourceOIF createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel());
    20   static std::string loadString(const std::string& modelName);
     19
    2120
    2221private:
Note: See TracChangeset for help on using the changeset viewer.