Changeset 3370 for code/trunk/src/orxonox/tools
- Timestamp:
- Jul 30, 2009, 2:10:44 PM (15 years ago)
- Location:
- code/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk
- Property svn:mergeinfo changed
/code/branches/resource (added) merged: 3328,3336-3340,3342-3350,3352-3366
- Property svn:mergeinfo changed
-
code/trunk/src/orxonox/tools/ParticleInterface.cc
r3301 r3370 43 43 #include "util/Math.h" 44 44 #include "core/CoreIncludes.h" 45 #include "core/ConfigValueIncludes.h" 45 46 #include "core/GameMode.h" 46 #include "GraphicsManager.h"47 47 48 48 namespace orxonox … … 91 91 } 92 92 93 void ParticleInterface::setConfigValues() 94 { 95 SetConfigValue(globalDetailLevel_, 2) 96 .description("O: off, 1: low, 2: normal, 3: high").callback(this, &ParticleInterface::detailLevelChanged); 97 } 98 93 99 Ogre::ParticleEmitter* ParticleInterface::createNewEmitter() 94 100 { … … 180 186 this->detaillevel_ = level; 181 187 if (GameMode::showsGraphics()) 182 this->detailLevelChanged( GraphicsManager::getInstance().getDetailLevelParticle());183 } 184 185 void ParticleInterface::detailLevelChanged( unsigned int newlevel)186 { 187 if ( newlevel >= static_cast<unsigned int>(this->detaillevel_))188 this->detailLevelChanged(); 189 } 190 191 void ParticleInterface::detailLevelChanged() 192 { 193 if (this->globalDetailLevel_ >= this->detaillevel_) 188 194 this->bAllowedByLOD_ = true; 189 195 else -
code/trunk/src/orxonox/tools/ParticleInterface.h
r3280 r3370 47 47 ParticleInterface(Ogre::SceneManager* scenemanager, const std::string& templateName, LODParticle::Value detaillevel); 48 48 virtual ~ParticleInterface(); 49 void setConfigValues(); 49 50 50 51 inline Ogre::ParticleSystem* getParticleSystem() … … 77 78 { return this->bVisible_; } 78 79 79 void detailLevelChanged(unsigned int newlevel);80 80 void setDetailLevel(unsigned int level); 81 81 … … 90 90 private: 91 91 void updateVisibility(); 92 void detailLevelChanged(); 92 93 93 94 Ogre::ParticleSystem* particleSystem_; … … 96 97 bool bEnabled_; 97 98 bool bAllowedByLOD_; 98 unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high)99 unsigned int detaillevel_; //!< Detail level of this particle effect (0: off, 1: low, 2: normal, 3: high) 99 100 float speedFactor_; 101 102 // config values 103 unsigned int globalDetailLevel_; //!< Global maximum detail level of particle effects (0: off, 1: low, 2: normal, 3: high) 100 104 101 105 static ParticleInterface* currentParticleInterface_s; -
code/trunk/src/orxonox/tools/Shader.cc
r3301 r3370 41 41 #include "core/CoreIncludes.h" 42 42 #include "core/GameMode.h" 43 #include " GraphicsManager.h"43 #include "core/GraphicsManager.h" 44 44 45 45 namespace orxonox
Note: See TracChangeset
for help on using the changeset viewer.