Changeset 9406 in orxonox.OLD for trunk/src/lib/graphics
- Timestamp:
- Jul 24, 2006, 11:09:47 AM (18 years ago)
- Location:
- trunk/src/lib/graphics
- Files:
-
- 37 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/lib/graphics/effects/atmospheric_engine.cc
r8495 r9406 25 25 26 26 27 using namespace std; 27 28 28 29 29 /** … … 116 116 std::list<BaseObject*>::const_iterator it; 117 117 for (it = weatherEffects->begin(); it != weatherEffects->end(); it++) { 118 /* printf("%s::%s \n", (*it)->getClass Name(), (*it)->getName());*/118 /* printf("%s::%s \n", (*it)->getClassCName(), (*it)->getName());*/ 119 119 dynamic_cast<WeatherEffect*>(*it)->tick(dt); 120 120 } -
trunk/src/lib/graphics/effects/cloud_effect.cc
r9235 r9406 40 40 float CloudEffect::fadeTime; 41 41 42 using namespace std; 42 43 43 44 44 SHELL_COMMAND(activate, CloudEffect, activateCloud); -
trunk/src/lib/graphics/effects/fog_effect.cc
r9235 r9406 28 28 SHELL_COMMAND(fadeout, FogEffect, fadeOutFog); 29 29 30 using namespace std; 30 31 31 32 32 CREATE_SCRIPTABLE_CLASS(FogEffect, CL_FOG_EFFECT, -
trunk/src/lib/graphics/effects/graphics_effect.cc
r8495 r9406 23 23 24 24 25 using namespace std; 25 26 26 27 27 -
trunk/src/lib/graphics/effects/lense_flare.cc
r9006 r9406 34 34 35 35 36 using namespace std; 36 37 37 38 38 -
trunk/src/lib/graphics/effects/lightning_effect.cc
r9235 r9406 34 34 SHELL_COMMAND(deactivate, LightningEffect, deactivateLightning); 35 35 36 using namespace std; 36 37 37 38 38 CREATE_SCRIPTABLE_CLASS(LightningEffect, CL_LIGHTNING_EFFECT, … … 130 130 131 131 //load sound 132 if (this->thunderBuffer != NULL)133 ResourceManager::getInstance()->unload(this->thunderBuffer);134 132 this->thunderBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/thunder.wav", WAV); 135 133 -
trunk/src/lib/graphics/effects/rain_effect.cc
r9235 r9406 39 39 SHELL_COMMAND(stopraining, RainEffect, stopRaining); 40 40 41 using namespace std; 41 42 42 43 43 CREATE_SCRIPTABLE_CLASS(RainEffect, CL_RAIN_EFFECT, -
trunk/src/lib/graphics/effects/snow_effect.cc
r9235 r9406 1 1 /* 2 3 4 5 6 7 8 9 2 orxonox - the future of 3D-vertical-scrollers 3 4 Copyright (C) 2004 orx 5 6 This program is free software; you can redistribute it and/or modify 7 it under the terms of the GNU General Public License as published by 8 the Free Software Foundation; either version 2, or (at your option) 9 any later version. 10 10 11 11 ### File Specific: 12 12 main-programmer: hdavid, amaechler 13 13 */ 14 14 … … 35 35 SHELL_COMMAND(deactivate, SnowEffect, deactivateSnow); 36 36 37 using namespace std;38 37 39 38 CREATE_SCRIPTABLE_CLASS(SnowEffect, CL_SNOW_EFFECT, … … 46 45 SnowEffect::SnowEffect(const TiXmlElement* root) 47 46 { 48 this->setClassID(CL_SNOW_EFFECT, "SnowEffect"); 49 50 this->init(); 51 52 if (root != NULL) 53 this->loadParams(root); 54 55 //load wind sound 56 if (this->snowWindForce >= 1) { 57 if (this->windBuffer != NULL) 58 ResourceManager::getInstance()->unload(this->windBuffer); 59 this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV); 60 } 47 this->setClassID(CL_SNOW_EFFECT, "SnowEffect"); 48 49 this->init(); 50 51 if (root != NULL) 52 this->loadParams(root); 53 54 this->windBuffer = NULL; 55 //load wind sound 56 if (this->snowWindForce >= 1) { 57 this->windBuffer = (OrxSound::SoundBuffer*)ResourceManager::getInstance()->load("sound/atmosphere/wind.wav", WAV); 58 } 61 59 62 60 if(snowActivate) { 63 61 this->activate(); 64 62 SnowEffect::snowParticles->precache((int) this->snowLife); 65 63 } … … 69 67 SnowEffect::~SnowEffect() 70 68 { 71 69 this->deactivate(); 72 70 } 73 71 … … 76 74 void SnowEffect::loadParams(const TiXmlElement* root) 77 75 { 78 79 80 81 82 83 84 85 86 87 88 89 76 WeatherEffect::loadParams(root); 77 78 LoadParam(root, "numParticles", this, SnowEffect, numParticles); 79 LoadParam(root, "materialTexture", this, SnowEffect, materialTexture); 80 LoadParam(root, "lifeSpans", this, SnowEffect, lifeSpan); 81 LoadParam(root, "radius", this, SnowEffect, radius); 82 LoadParam(root, "mass", this, SnowEffect, mass); 83 LoadParam(root, "emissionRate", this, SnowEffect, emissionRate); 84 LoadParam(root, "emissionVelocity", this, SnowEffect, emissionVelocity); 85 LoadParam(root, "wind", this, SnowEffect, wind); 86 LoadParam(root, "size", this, SnowEffect, size); 87 LoadParam(root, "coord", this, SnowEffect, coord); 90 88 LoadParam(root, "cloudcolor", this, SnowEffect, setCloudColor); 91 89 LoadParam(root, "skycolor", this, SnowEffect, setSkyColor); 92 90 LoadParam(root, "fadetime", this, SnowEffect, setFadeTime); 93 91 94 95 96 97 98 92 LOAD_PARAM_START_CYCLE(root, element); 93 { 94 LoadParam_CYCLE(element, "option", this, SnowEffect, setSnowOption); 95 } 96 LOAD_PARAM_END_CYCLE(element); 99 97 } 100 98 101 99 void SnowEffect::init() 102 100 { 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 101 this->emitter = new PlaneEmitter(); 102 103 // Default values 104 this->snowActivate = false; 105 this->snowMove = false; 106 this->particles = 12000; 107 this->texture = "maps/snow_flake_01_32x32.png"; 108 this->snowLife = 8; 109 this->randomLife = 2; 110 this->snowRadius = 3.5; 111 this->randomRadius = 1; 112 this->snowMass = 1.0; 113 this->randomMass = 0.3; 114 this->rate = 900; 115 this->velocity = -100; 116 this->randomVelocity = 5; 117 this->angle = 0.5; 118 this->randomAngle = 0.2; 119 this->alpha = 0.5; 120 this->snowSize = Vector2D(2500, 2500); 121 this->snowCoord = Vector(100,450,400); 122 this->snowWindForce = 1; 123 126 124 this->fadeTime = 10; 127 125 this->cloudColor = Vector(0.2f, 0.2f, 0.2f); … … 131 129 void SnowEffect::activate() 132 130 { 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 131 PRINTF(3)("Activating SnowEffect\n"); 132 133 this->snowActivate = true; 134 135 SnowEffect::snowParticles = new SpriteParticles(particles); 136 SnowEffect::snowParticles->setName("SnowEffectTrailParticles"); 137 SnowEffect::snowParticles->setMaterialTexture(texture); 138 SnowEffect::snowParticles->setLifeSpan(snowLife, randomLife); 139 SnowEffect::snowParticles->setRadius(0.0, snowRadius, randomRadius); 140 SnowEffect::snowParticles->setRadius(0.2, snowRadius, randomRadius*0.8); 141 SnowEffect::snowParticles->setRadius(1.0, snowRadius, randomRadius*0.5); 142 SnowEffect::snowParticles->setMass(0, snowMass, randomMass); 143 SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha); 144 SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2); 145 SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0); 146 147 this->emitter->setSystem(SnowEffect::snowParticles); 148 149 this->emitter->setRelCoor(snowCoord); 150 this->emitter->setEmissionRate(rate); 151 this->emitter->setEmissionVelocity(velocity, randomVelocity); 152 this->emitter->setSpread(angle * this->snowWindForce , randomAngle * this->snowWindForce); 153 this->emitter->setSize(snowSize); 156 154 157 155 if (this->snowWindForce != 0) 158 156 this->soundSource.play(this->windBuffer, 0.1f * this->snowWindForce, true); 159 157 160 158 // Store cloud- and sky color before the snow 161 159 this->oldCloudColor = CloudEffect::cloudColor; … … 171 169 void SnowEffect::deactivate() 172 170 { 173 174 175 176 177 178 179 180 171 PRINTF(3)("Deactivating SnowEffect\n"); 172 173 this->snowActivate = false; 174 this->emitter->setSystem(NULL); 175 176 if (this->windBuffer != NULL) 177 ResourceManager::getInstance()->unload(this->windBuffer); 178 181 179 // Restore the old cloud- and sky color 182 180 CloudEffect::changeCloudColor(this->oldCloudColor, this->fadeTime); … … 186 184 void SnowEffect::draw() const 187 185 { 188 189 186 if (!this->snowActivate) 187 return; 190 188 } 191 189 192 190 void SnowEffect::tick(float dt) 193 191 { 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 } 192 if (!this->snowActivate) 193 return; 194 195 /* 196 float distance = (State::getCameraNode()->getAbsCoor() - Vector(snowCoord.x, State::getCameraNode()->getAbsCoor().y, snowCoord.z)).len(); 197 198 if(activated) 199 { 200 if(distance > 0.3*snowSize.x || distance > 0.3*snowSize.y) 201 this->deactivate(); 202 else if(distance > 0.25*snowSize.x || distance > 0.25*snowSize.y) 203 this->alpha = 0.15; 204 else if(distance > 0.2*snowSize.x || distance > 0.2*snowSize.y) 205 this->alpha = 0.25; 206 else if(distance > 0.1*snowSize.x || distance > 0.1*snowSize.y) 207 this->alpha = 0.4; 208 209 SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha); 210 SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2); 211 SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0); 212 } 213 else 214 { 215 if(distance < 0.3*snowSize.x || distance < 0.3*snowSize.y ) 216 this->activate(); 217 if( distance < 0.25*snowSize.x || distance < 0.25*snowSize.y ) 218 this->alpha = 0.25; 219 else if( distance < 0.2*snowSize.x || distance < 0.2*snowSize.y ) 220 this->alpha = 0.4; 221 else if( distance < 0.1*snowSize.x || distance < 0.1*snowSize.y ) 222 this->alpha = 0.5; 223 224 SnowEffect::snowParticles->setColor(0,1, 1, 1, alpha); 225 SnowEffect::snowParticles->setColor(.5, .6, .6, .6, alpha/2); 226 SnowEffect::snowParticles->setColor(1, .0, .0, .0, .0); 227 }*/ 228 229 if (this->snowMove) { 230 this->snowCoord = State::getCameraNode()->getAbsCoor(); 231 this->emitter->setRelCoor(this->snowCoord.x , this->snowCoord.y+300, this->snowCoord.z); 232 } 233 } -
trunk/src/lib/graphics/effects/snow_effect.h
r9235 r9406 101 101 102 102 private: 103 int particles;103 int particles; 104 104 std::string texture; 105 float snowLife, randomLife;106 float snowRadius, randomRadius;107 float snowMass, randomMass;108 float rate;109 float velocity, randomVelocity;110 float angle, randomAngle;111 float alpha;112 float fadeTime;113 Vector snowCoord;114 Vector2D snowSize;115 int snowWindForce;105 float snowLife, randomLife; 106 float snowRadius, randomRadius; 107 float snowMass, randomMass; 108 float rate; 109 float velocity, randomVelocity; 110 float angle, randomAngle; 111 float alpha; 112 float fadeTime; 113 Vector snowCoord; 114 Vector2D snowSize; 115 int snowWindForce; 116 116 117 bool snowMove;118 bool snowActivate;117 bool snowMove; 118 bool snowActivate; 119 119 120 120 PlaneEmitter* emitter; 121 121 122 122 static SpriteParticles* snowParticles; 123 OrxSound::SoundSource soundSource;123 OrxSound::SoundSource soundSource; 124 124 OrxSound::SoundBuffer* windBuffer; 125 125 126 Vector oldSkyColor;127 Vector oldCloudColor;128 Vector skyColor;129 Vector cloudColor;126 Vector oldSkyColor; 127 Vector oldCloudColor; 128 Vector skyColor; 129 Vector cloudColor; 130 130 }; 131 131 -
trunk/src/lib/graphics/effects/sun_effect.cc
r8793 r9406 21 21 22 22 23 using namespace std; 23 24 24 25 25 -
trunk/src/lib/graphics/effects/volfog_effect.cc
r9006 r9406 47 47 48 48 49 using namespace std; 49 50 50 51 51 CREATE_FACTORY(VolFogEffect, CL_VOLFOG_EFFECT); -
trunk/src/lib/graphics/effects/weather_effect.cc
r8495 r9406 21 21 22 22 23 using namespace std; 23 24 24 25 25 -
trunk/src/lib/graphics/graphics_engine.cc
r8740 r9406 50 50 #include "static_model.h" 51 51 #endif 52 using namespace std;53 52 54 53 SHELL_COMMAND(wireframe, GraphicsEngine, wireframe); 55 54 SHELL_COMMAND(fps, GraphicsEngine, toggleFPSdisplay); 56 55 57 56 /** … … 67 66 this->bDisplayFPS = false; 68 67 this->bAntialiasing = false; 68 this->bDedicated = false; 69 69 this->minFPS = 9999; 70 70 this->maxFPS = 0; … … 164 164 MultiType textures = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO_ADVANCED, CONFIG_NAME_TEXTURES, "1"); 165 165 Texture::setTextureEnableState(textures.getBool()); 166 167 // check it is a dedicated network node: so no drawings are made 168 MultiType dedicated = Preferences::getInstance()->getString(CONFIG_SECTION_VIDEO, CONFIG_NAME_NO_RENDER, "0"); 169 this->bDedicated = dedicated.getBool(); 166 170 167 171 // searching for a usefull resolution … … 604 608 } 605 609 610 /** 611 * this draws the graphics engines graphics effecs 612 */ 606 613 void GraphicsEngine::draw() const 607 614 { 608 // LightManager::getInstance()->draw(); 609 610 if (this->graphicsEffects != NULL) 615 if( this->graphicsEffects != NULL) 611 616 { 612 617 //draw the graphics effects 613 list<BaseObject*>::const_iterator it;618 std::list<BaseObject*>::const_iterator it; 614 619 for (it = this->graphicsEffects->begin(); it != this->graphicsEffects->end(); it++) 615 620 dynamic_cast<GraphicsEffect*>(*it)->draw(); … … 618 623 Render2D::getInstance()->draw(E2D_LAYER_BOTTOM, E2D_LAYER_ABOVE_ALL); 619 624 Shader::restoreShader(); 625 } 626 627 628 void GraphicsEngine::toggleFPSdisplay() 629 { 630 this->displayFPS(!this->bDisplayFPS); 620 631 } 621 632 -
trunk/src/lib/graphics/graphics_engine.h
r8518 r9406 46 46 void toggleFullscreen(); 47 47 static void setBackgroundColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha = 1.0); 48 inline bool isDedicated() { return this->bDedicated; } 48 49 49 50 inline void setAntialiasing(bool flag) { this->bAntialiasing = flag; } … … 74 75 void drawBackgroundElements() const; 75 76 void draw() const; 77 void toggleFPSdisplay(); 76 78 void displayFPS(bool display); 77 79 … … 113 115 bool particlesEnabled; //!< If particles should be enabled. 114 116 bool bAntialiasing; //!< true if antialiasing enabled 117 bool bDedicated; //!< true if this server is a dedicated server and should not render the scene 115 118 116 119 int particlesValue; //!< How many particles -
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(), -
trunk/src/lib/graphics/render2D/element_2d.cc
r8989 r9406 104 104 deleteNode = tmp; 105 105 tmp++; 106 // printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClass Name(), this->getName());106 // printf("TEST::%s(%s) %s\n", (*deleteNode)->getName(), (*deleteNode)->getClassCName(), this->getName()); 107 107 if ((this->parentMode & E2D_PROHIBIT_CHILD_DELETE) || 108 108 ((*deleteNode)->parentMode & E2D_PROHIBIT_DELETE_WITH_PARENT)) … … 214 214 { 215 215 PRINTF(2)("Unable to set %s to layer %s, because it's parent(%s) is of higher layer %s\n", 216 this->get Name(),216 this->getCName(), 217 217 Element2D::layer2DToChar(layer), 218 this->parent->get Name(),218 this->parent->getCName(), 219 219 Element2D::layer2DToChar(this->parent->getLayer())); 220 220 layer = this->parent->getLayer(); … … 602 602 { 603 603 PRINTF(2)("Layer '%s' of Child(%s::%s) lower than parents(%s::%s) layer '%s'. updating...\n", 604 Element2D::layer2DToChar(child->getLayer()),child->getClass Name(), child->getName(),605 this->getClass Name(), this->getName(), Element2D::layer2DToChar(this->layer));604 Element2D::layer2DToChar(child->getLayer()),child->getClassCName(), child->getCName(), 605 this->getClassCName(), this->getCName(), Element2D::layer2DToChar(this->layer)); 606 606 child->layer = this->layer; 607 607 this->children.push_front(child); … … 627 627 { 628 628 PRINTF(1)("Tried to reparent2D to own child '%s::%s' to '%s::%s'.\n", 629 this->getClass Name(), this->getName(), child->getClassName(), child->getName());629 this->getClassCName(), this->getCName(), child->getClassCName(), child->getCName()); 630 630 child->parent = NULL; 631 631 } … … 701 701 { 702 702 (*reparenter)->reparent2D(); 703 PRINTF(5)("REPARENTED TO: %s::%s\n",(*reparenter)->getParent2D()->getClass Name(),(*reparenter)->getParent2D()->getName());703 PRINTF(5)("REPARENTED TO: %s::%s\n",(*reparenter)->getParent2D()->getClassCName(),(*reparenter)->getParent2D()->getCName()); 704 704 } 705 705 } … … 723 723 else 724 724 PRINTF(2)("Not Found Element2D's (%s::%s) new Parent by Name: %s\n", 725 this->getClass Name(), this->getName(), parentName.c_str());725 this->getClassCName(), this->getCName(), parentName.c_str()); 726 726 } 727 727 … … 865 865 Vector2D tmp = *this->toCoordinate; 866 866 this->setRelCoor2D(tmp); 867 PRINTF(5)("SmoothMove of %s finished\n", this->get Name());867 PRINTF(5)("SmoothMove of %s finished\n", this->getCName()); 868 868 } 869 869 } … … 879 879 float tmp = *this->toDirection; 880 880 this->setRelDir2D(tmp); 881 PRINTF(5)("SmoothRotate of %s finished\n", this->get Name());881 PRINTF(5)("SmoothRotate of %s finished\n", this->getCName()); 882 882 } 883 883 } … … 893 893 delete this->toSize; 894 894 this->toSize = NULL; 895 PRINTF(5)("SmoothRotate of %s finished\n", this->get Name());895 PRINTF(5)("SmoothRotate of %s finished\n", this->getCName()); 896 896 } 897 897 } … … 900 900 this->lastAbsCoordinate = this->absCoordinate; 901 901 902 PRINTF(5)("Element2D::update - %s - (%f, %f)\n", this->get Name(), this->absCoordinate.x, this->absCoordinate.y);902 PRINTF(5)("Element2D::update - %s - (%f, %f)\n", this->getCName(), this->absCoordinate.x, this->absCoordinate.y); 903 903 904 904 … … 937 937 projectPos+1, 938 938 projectPos+2); 939 // printf("%s::%s == %f %f %f :: %f %f\n", this->getClass Name(), this->getName(),939 // printf("%s::%s == %f %f %f :: %f %f\n", this->getClassCName(), this->getName(), 940 940 // this->bindNode->getAbsCoor().x, 941 941 // this->bindNode->getAbsCoor().y, … … 1026 1026 PRINT(0)(" -"); 1027 1027 PRINT(0)("E2D(%s::%s);AC:(%0.2f, %0.2f);RC:(%0.2f, %0.2f);AD(%0.2f)->%s;Layer:(%s)\n", 1028 this->getClass Name(),1029 this->get Name(),1028 this->getClassCName(), 1029 this->getCName(), 1030 1030 this->absCoordinate.x, 1031 1031 this->absCoordinate.y, -
trunk/src/lib/graphics/render2D/image_plane.cc
r7843 r9406 25 25 26 26 27 using namespace std; 27 28 28 29 29 -
trunk/src/lib/graphics/render2D/render_2d.cc
r7840 r9406 22 22 #include "element_2d.h" 23 23 24 using namespace std; 24 25 25 26 26 /** -
trunk/src/lib/graphics/shader.cc
r8316 r9406 32 32 #endif 33 33 34 using namespace std; 34 35 35 36 36 -
trunk/src/lib/graphics/spatial_separation/quadtree.cc
r9110 r9406 24 24 #include "debug.h" 25 25 26 using namespace std; 26 27 27 #define QUADTREE_MATERIAL_COUNT 4 28 28 -
trunk/src/lib/graphics/spatial_separation/quadtree_node.cc
r9110 r9406 26 26 #include "util/list.h" 27 27 28 using namespace std; 28 29 29 30 30 -
trunk/src/lib/graphics/spatial_separation/spatial_separation.cc
r6022 r9406 23 23 #include "compiler.h" 24 24 25 using namespace std; 25 26 26 27 27 -
trunk/src/lib/graphics/text_engine/limited_width_text.cc
r8981 r9406 160 160 void LimitedWidthText::debug() const 161 161 { 162 printf("Debug %s::%s \n", this->getClass Name(), this->getName() );162 printf("Debug %s::%s \n", this->getClassCName(), this->getCName() ); 163 163 } -
trunk/src/lib/graphics/text_engine/multi_line_text.cc
r8768 r9406 152 152 void MultiLineText::debug() const 153 153 { 154 printf("Debug %s::%s: %d lines\n", this->getClass Name(), this->getName(), this->getLineCount());154 printf("Debug %s::%s: %d lines\n", this->getClassCName(), this->getCName(), this->getLineCount()); 155 155 156 156 std::string tmpText = this->text(); -
trunk/src/lib/graphics/text_engine/text.cc
r8769 r9406 28 28 */ 29 29 Text::Text(const std::string& fontFile, unsigned int textSize) 30 : _font(fontFile, FONT_DEFAULT_RENDER_SIZE)30 // : _font(fontFile, FONT_DEFAULT_RENDER_SIZE) 31 31 { 32 32 this->setClassID(CL_TEXT, "Text"); 33 33 34 34 // initialize this Text 35 this->setFont(fontFile, FONT_DEFAULT_RENDER_SIZE); 35 36 this->_size = textSize; 36 37 this->setSizeY2D(textSize); … … 278 279 void Text::debug() const 279 280 { 280 PRINT(0)("=== TEXT: %s (with Font:'%s') displaying %s ===\n", this->get Name(), this->_font.getName(), this->_text.c_str());281 PRINT(0)("=== TEXT: %s (with Font:'%s') displaying %s ===\n", this->getCName(), this->_font.getCName(), this->_text.c_str()); 281 282 // PRINT(0)("Color: r=%0.2f g=%0.2f b=%0.2f a=%0.2f\n", this->_color.r(), this->_color.g(), this->_color.b(), this->_color.a()); 282 283 } -
trunk/src/lib/graphics/text_engine/text_engine.cc
r8761 r9406 26 26 #include "font.h" 27 27 28 using namespace std; 28 29 29 30 30 #include <stdlib.h> … … 122 122 void TextEngine::debug() const 123 123 { 124 const list<BaseObject*>* textList = ClassList::getList(CL_TEXT);124 const std::list<BaseObject*>* textList = ClassList::getList(CL_TEXT); 125 125 if (textList != NULL) 126 126 { … … 130 130 PRINT(0)("Reference: %p; Text Counts: %d\n", this, textList->size()); 131 131 132 list<BaseObject*>::const_iterator text;132 std::list<BaseObject*>::const_iterator text; 133 133 for ( text = textList->begin(); text != textList->end(); text++) 134 134 dynamic_cast<Text*>(*text)->debug();
Note: See TracChangeset
for help on using the changeset viewer.