Changeset 9406 in orxonox.OLD for trunk/src/lib/graphics/importer
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- Location:
- trunk/src/lib/graphics/importer
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/importer/bsp_file.cc
r9025 r9406 40 40 #include <vector> 41 41 42 using namespace std; 42 43 43 44 44 … … 96 96 if (stat( name , &results) == 0) { 97 97 PRINTF(0)("BSP FILE: Datei %s gefunden. \n", name); 98 ifstream bspFile (name, ios::in |ios::binary);98 std::ifstream bspFile (name, std::ios::in | std::ios::binary); 99 99 bspFile.read(this->header, 260); 100 100 PRINTF(0)("BSP FILE: BSPVersion: %i. \n", ((int *)(header) )[1]); -
trunk/src/lib/graphics/importer/grid.cc
r6467 r9406 18 18 #include "grid.h" 19 19 20 using namespace std; 20 21 21 22 22 -
trunk/src/lib/graphics/importer/interactive_model.cc
r8490 r9406 20 20 #include "glincl.h" 21 21 22 using namespace std; 22 23 23 24 24 /** -
trunk/src/lib/graphics/importer/material.cc
r8761 r9406 88 88 Material::~Material() 89 89 { 90 PRINTF(5)("delete Material %s.\n", this->get Name());90 PRINTF(5)("delete Material %s.\n", this->getCName()); 91 91 92 92 if (this->ambientTexture != NULL) … … 217 217 void Material::setIllum (int illum) 218 218 { 219 PRINTF(4)("setting illumModel of Material %s to %i\n", this->get Name(), illum);219 PRINTF(4)("setting illumModel of Material %s to %i\n", this->getCName(), illum); 220 220 this->illumModel = illum; 221 221 } … … 229 229 void Material::setDiffuse (float r, float g, float b) 230 230 { 231 PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->get Name(), r, g, b);231 PRINTF(4)("setting Diffuse Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b); 232 232 this->diffuse = Color(r, g, b, this->diffuse.a() ); 233 233 } … … 242 242 void Material::setAmbient (float r, float g, float b) 243 243 { 244 PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->get Name(), r, g, b);244 PRINTF(4)("setting Ambient Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b); 245 245 this->ambient = Color(r, g, b, 1.0); 246 246 } … … 254 254 void Material::setSpecular (float r, float g, float b) 255 255 { 256 PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->get Name(), r, g, b);256 PRINTF(4)("setting Specular Color of Material %s to r=%f g=%f b=%f.\n", this->getCName(), r, g, b); 257 257 this->specular = Color (r, g, b, 1.0); 258 258 } … … 273 273 void Material::setTransparency (float trans) 274 274 { 275 PRINTF(4)("setting Transparency of Material %s to %f.\n", this->get Name(), trans);275 PRINTF(4)("setting Transparency of Material %s to %f.\n", this->getCName(), trans); 276 276 this->diffuse.a() = trans; 277 277 } … … 455 455 void Material::debug() const 456 456 { 457 PRINT(0)("Debug Material: %s\n", this->get Name());457 PRINT(0)("Debug Material: %s\n", this->getCName()); 458 458 PRINT(0)("illumModel: %d ; ShiniNess %f\n", this->illumModel, shininess); 459 459 PRINT(0)("diffuseColor: "); diffuse.debug(); -
trunk/src/lib/graphics/importer/md2/md2Model.cc
r9235 r9406 22 22 23 23 24 using namespace std; 24 25 25 26 26 //! the model anorms -
trunk/src/lib/graphics/importer/md3/md3_animation_cfg.cc
r9391 r9406 19 19 #include "md3_animation.h" 20 20 21 #include " tokenizer.h"21 #include "substring.h" 22 22 #include "helper_functions.h" 23 23 24 24 #include "debug.h" 25 25 26 #include <stdio.h> 27 #include <stdlib.h> 28 29 30 using namespace std; 26 27 28 31 29 32 30 namespace md3 … … 100 98 if( inHeader && line.find("sex") == 0) { 101 99 //parse line: sex [m | f | ...] 102 std::vector<std::string> tokens; 103 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 100 SubString tokens(line, " \t\n\r\f/"); 104 101 105 102 std::string sexStr = tokens.back(); … … 117 114 else if( inHeader && line.find("headoffset") == 0) { 118 115 // parse line: headoffset X Y Z 119 std::vector<std::string> tokens; 120 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 116 SubString tokens(line, " \t\n\r\f/"); 121 117 122 118 float z = atof(tokens.back().c_str()); tokens.pop_back(); … … 130 126 else if( inHeader && line.find("footsteps") == 0) { 131 127 //parse line: footsteps [normal | mech | ...] 132 std::vector<std::string> tokens; 133 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 128 SubString tokens (line, " \t\n\r\f/"); 134 129 135 130 this->footsteps = tokens.back(); … … 190 185 // parse the line: 191 186 // first frame, num frames, looping frames, frames per second (fps) 192 std::vector<std::string> tokens; 193 Tokenizer::tokenize(line, tokens, " \t\n\r\f/"); 187 SubString tokens(line, " \t\n\r\f/"); 194 188 195 189 anim->fps = atoi(tokens.back().c_str()); tokens.pop_back(); -
trunk/src/lib/graphics/importer/model.cc
r8316 r9406 20 20 #include "glincl.h" 21 21 22 using namespace std; 22 23 23 24 24 /** -
trunk/src/lib/graphics/importer/primitive_model.cc
r9110 r9406 21 21 #include "debug.h" 22 22 23 using namespace std; 23 24 24 25 25 /** -
trunk/src/lib/graphics/importer/static_model.cc
r8362 r9406 23 23 #include <stdarg.h> 24 24 25 using namespace std; 25 26 26 27 27 … … 161 161 { 162 162 PRINTF(4)("Deleting Model "); 163 if ( this->getName())164 { 165 PRINT(4)("%s\n", this->get Name());163 if (!this->getName().empty()) 164 { 165 PRINT(4)("%s\n", this->getCName()); 166 166 } 167 167 else … … 178 178 179 179 //! @todo do we really have to delete this material?? 180 list<ModelMaterial*>::iterator modMat;180 std::list<ModelMaterial*>::iterator modMat; 181 181 for(modMat = this->materialList.begin(); modMat != this->materialList.end(); modMat++) 182 182 { … … 214 214 void StaticModel::rebuild() 215 215 { 216 PRINTF(3)("Rebuilding Model '%s'\n", this->get Name());216 PRINTF(3)("Rebuilding Model '%s'\n", this->getCName()); 217 217 this->finalize(); 218 218 } … … 266 266 tmpGroup = tmpGroup->next; 267 267 } 268 PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->get Name());268 PRINTF(2)("Model number %i in %s not Found.\n", groupNumber, this->getCName()); 269 269 return; 270 270 } … … 291 291 tmpGroup = tmpGroup->next; 292 292 } 293 PRINTF(2)("Model Named %s in %s not Found.\n", groupName.c_str(), this->get Name());293 PRINTF(2)("Model Named %s in %s not Found.\n", groupName.c_str(), this->getCName()); 294 294 return; 295 295 } … … 358 358 Material* StaticModel::findMaterialByName(const std::string& materialName) 359 359 { 360 list<ModelMaterial*>::iterator modMat;360 std::list<ModelMaterial*>::iterator modMat; 361 361 for (modMat = this->materialList.begin(); modMat != this->materialList.end(); modMat++) 362 362 if (materialName == (*modMat)->material->getName()) … … 748 748 { 749 749 tmpFace->material->select(); 750 PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->get Name());750 PRINTF(5)("using material %s for coming Faces.\n", tmpFace->material->getCName()); 751 751 } 752 752 } … … 840 840 else if( tmpFace->vertexCount > 4) { 841 841 if (!warned) { 842 PRINTF(2)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->get Name());842 PRINTF(2)("This model (%s) got over 4 vertices per face <=> conflicts in the CD engine!\n", this->getCName()); 843 843 warned = true; 844 844 } -
trunk/src/lib/graphics/importer/texture.cc
r8761 r9406 230 230 if (this->data->getStoredImage() != NULL) 231 231 { 232 PRINTF(3)("Reloading Texture of %s '%s'\n", this->getClass Name(), this->getName());232 PRINTF(3)("Reloading Texture of %s '%s'\n", this->getClassCName(), this->getCName()); 233 233 this->setTexture(Texture::loadTexToGL(this->data->getStoredImage())); 234 234 } -
trunk/src/lib/graphics/importer/texture_sequence.cc
r8619 r9406 225 225 bool TextureSequence::rebuild() 226 226 { 227 PRINTF(3)("Reloading TextureSequence of %s '%s'\n", this->getClass Name(), this->getName());227 PRINTF(3)("Reloading TextureSequence of %s '%s'\n", this->getClassCName(), this->getCName()); 228 228 229 229 for (unsigned int i = 0; i < this->textures.size(); i++) -
trunk/src/lib/graphics/importer/vertex_array_model.cc
r8362 r9406 23 23 #include "tc.h" 24 24 25 using namespace std; 25 26 26 27 27 ///////////// … … 116 116 VertexArrayModel::~VertexArrayModel() 117 117 { 118 PRINTF(4)("Deleting VertexArrayModel %s\n", this->get Name());118 PRINTF(4)("Deleting VertexArrayModel %s\n", this->getCName()); 119 119 } 120 120 … … 127 127 void VertexArrayModel::draw() const 128 128 { 129 PRINTF(4)("drawing 3D-VertexArrayModel %s\n", this->get Name());129 PRINTF(4)("drawing 3D-VertexArrayModel %s\n", this->getCName()); 130 130 glEnableClientState(GL_VERTEX_ARRAY ); 131 131 glEnableClientState(GL_TEXTURE_COORD_ARRAY ); … … 343 343 void VertexArrayModel::debug() const 344 344 { 345 PRINT(0)("VertexArrayModel (%s): debug\n", this->get Name());345 PRINT(0)("VertexArrayModel (%s): debug\n", this->getCName()); 346 346 PRINT(0)("Stripes: %d; Indices: %d; Vertices: %d; Normals %d; TextCoords %d; Colors %d\n", 347 347 this->stripes.size(),
Note: See TracChangeset
for help on using the changeset viewer.