Changeset 2478 for code/branches/objecthierarchy2/src/orxonox/objects/items
- Timestamp:
- Dec 15, 2008, 11:26:16 PM (16 years ago)
- Location:
- code/branches/objecthierarchy2/src/orxonox/objects/items
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.cc
r2361 r2478 31 31 32 32 #include "core/CoreIncludes.h" 33 #include "core/ConfigValueIncludes.h" 33 34 #include "core/XMLPort.h" 34 35 #include "objects/Scene.h" … … 63 64 this->boostBlur_ = 0; 64 65 66 this->setConfigValues(); 65 67 this->registerVariables(); 66 68 } … … 95 97 } 96 98 99 void Engine::setConfigValues() 100 { 101 SetConfigValue(blurStrength_, 3.0f); 102 } 103 97 104 void Engine::registerVariables() 98 105 { … … 197 204 198 205 if (this->boostBlur_ && this->maxSpeedFront_ != 0 && this->boostFactor_ != 1) 199 this->boostBlur_->setParameter("Ogre/Compositor/Radial_Blur", 0, 0, "sampleStrength", 5.0f* clamp((-velocity.z - this->maxSpeedFront_) / ((this->boostFactor_ - 1) * this->maxSpeedFront_), 0.0f, 1.0f));206 this->boostBlur_->setParameter("Ogre/Compositor/Radial_Blur", 0, 0, "sampleStrength", this->blurStrength_ * clamp((-velocity.z - this->maxSpeedFront_) / ((this->boostFactor_ - 1) * this->maxSpeedFront_), 0.0f, 1.0f)); 200 207 } 201 208 -
code/branches/objecthierarchy2/src/orxonox/objects/items/Engine.h
r2350 r2478 46 46 virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode); 47 47 void registerVariables(); 48 void setConfigValues(); 48 49 49 50 virtual void tick(float dt); … … 127 128 128 129 Shader* boostBlur_; 130 float blurStrength_; 129 131 }; 130 132 }
Note: See TracChangeset
for help on using the changeset viewer.