Changeset 10241 in orxonox.OLD for branches/mount_points/src/lib/graphics
- Timestamp:
- Jan 16, 2007, 11:43:15 PM (18 years ago)
- 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
r10240 r10241 52 52 void OIFData::load(const std::string& fileName) 53 53 { 54 PRINTF(0)("loading %sas oif data\n", fileName.c_str());55 54 PRINTF(0)("loading |%s| as oif data\n", fileName.c_str()); 55 if( fileName.empty()) 56 56 { 57 PRINTF( 3)("No filename specified for object information loading");57 PRINTF(0)("No filename specified for object information loading"); 58 58 return; 59 59 } … … 64 64 { 65 65 // report an error 66 PRINTF( 1)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());66 PRINTF(0)("Could not load XML File %s: %s @ %d:%d\n", fileName.c_str(), XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol()); 67 67 return; 68 68 } … … 75 75 { 76 76 // report an error 77 PRINTF( 2)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n");77 PRINTF(0)("Specified XML File is not an orxonox object information file (<ObjectInformationFile> element missing)\n"); 78 78 return; 79 79 } 80 PRINTF(0)("OIF loaded\n"); 80 81 81 82 } … … 139 140 140 141 142 void ObjectInformationFile::load(const std::string& fileName) 143 { 144 } 145 146 141 147 /** 142 148 * standard deconstructor -
branches/mount_points/src/lib/graphics/importer/oif/object_information_file.h
r10239 r10241 43 43 virtual ~ObjectInformationFile(); 44 44 45 void load(const std::string& fileName); 46 45 47 ObjectInformationFile& operator=(const ObjectInformationFile& oif); 46 48 47 49 /** @returns a reference to the xml oif file */ 48 50 inline const TiXmlElement* getMountPointDescription() { return this->data->root(); } 51 52 inline void acquireData(const OIFData::Pointer& data) { this->data = data; } 53 const OIFData::Pointer& dataPointer() const { return this->data; }; 54 49 55 50 56 -
branches/mount_points/src/lib/graphics/importer/oif/resource_oif.cc
r10147 r10241 26 26 Resources::StorePointer* ptr = this->acquireResource(fileName); 27 27 28 28 29 if (ptr) 29 30 { 30 PRINTF( 0)("FOUND OIF: %s\n", fileName.c_str());31 //this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr());31 PRINTF(5)("FOUND OIF: %s\n", fileName.c_str()); 32 this->acquireData(static_cast<ResourceOIF::OIFResourcePointer*>(ptr)->ptr()); 32 33 } 33 34 else 34 35 { 35 PRINTF( 4)("NOT FOUND OIF: %s\n", fileName.c_str());36 // std::string modelFileName = this->Resource::locateFile(modelName);37 // //std::string skinFileName = this->Resource::locateFile(skinName); 38 // this->MD2Model::load(modelFileName, skinName, scale);39 // this->Resource::addResource(new ResourceOIF::OIFResourcePointer(loadString(modelName, skinName, scale), keepLevel, this->MD2Model::dataPointer()));36 PRINTF(5)("NOT FOUND OIF: %s\n", fileName.c_str()); 37 std::string fullName = this->Resource::locateFile(fileName); 38 39 this->ObjectInformationFile::load(fileName); 40 this->Resource::addResource(new ResourceOIF::OIFResourcePointer(fileName, keepLevel, this->ObjectInformationFile::dataPointer())); 40 41 } 41 42 -
branches/mount_points/src/lib/graphics/importer/oif/resource_oif.h
r10147 r10241 15 15 { 16 16 public: 17 ResourceOIF(const std::string& fileName, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); 17 ResourceOIF(const std::string& fileName, 18 const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); 18 19 static ResourceOIF createFromString(const std::string& loadString, const Resources::KeepLevel& keepLevel = Resources::KeepLevel()); 19 20
Note: See TracChangeset
for help on using the changeset viewer.