Changeset 10698 in orxonox.OLD for trunk/src/world_entities/effects
- Timestamp:
- Jun 14, 2007, 5:33:43 PM (17 years ago)
- Location:
- trunk/src/world_entities/effects
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/world_entities/effects/billboard.cc
r10618 r10698 11 11 ### File Specific: 12 12 main-programmer: David Hasenfratz 13 co-programmer: Nicolas Schlumberger 13 14 */ 14 15 … … 69 70 70 71 this->texColor = NULL; 72 73 this->pulseMagnitude = .5; 74 this->bPulse = false; 75 76 this->angularSpeed = M_2_PI; //360; 77 this->angle = 0; 78 79 this->setUpdateFunction((*sinf)); 71 80 } 72 81 … … 113 122 void Billboard::tick(float dt) 114 123 { 124 this->angle += dt * this->angularSpeed; 125 if (this->angle > M_2_PI) 126 this->angle -= M_2_PI; 127 // curMagnitude = updatePulse(this->angle); 115 128 } 116 129 … … 145 158 v.normalize(); 146 159 147 v *= sizeX; 148 h *= sizeY; 160 float tmp = 1; 161 if (this->bPulse) 162 tmp += this->pulseMagnitude * sinf(this->angle); //updatePulse(this->angle); 163 164 v *= sizeX * tmp; 165 h *= sizeY * tmp; 149 166 150 167 //v += this->getAbsCoor(); -
trunk/src/world_entities/effects/billboard.h
r10433 r10698 26 26 void colorTexture(const Color col); 27 27 28 //!< Pulsing Capability, changes size of the grid 29 inline void togglePluse () {this->bPulse = !bPulse; }; 30 inline void setPulse () { this->bPulse = true; }; 31 inline void setPulse ( bool state ) {this->bPulse = state; }; 32 inline float getPulse () { return this->bPulse; }; 33 34 inline void setPulseMagnitude(float mag) {this->pulseMagnitude = mag; }; 35 28 36 virtual void tick(float dt); 29 37 virtual void draw() const; 30 38 39 inline void setUpdateFunction(float (*updateFct)(float value)) { if( updateFct) this->updatePulse = updateFct;}; 40 31 41 private: 42 43 float (*updatePulse)(float value); 44 32 45 Material* material; 33 46 Color* texColor; 34 47 float sizeX; 35 48 float sizeY; 49 50 bool bPulse; 51 float pulseMagnitude; 52 float curMagnitude; 53 float angle; 54 float angularSpeed; 36 55 }; 37 56 -
trunk/src/world_entities/effects/blink.cc
r10618 r10698 67 67 this->bBoard->setTexture("textures/light/blink.png"); 68 68 69 // /Standard values69 //!< Standard values 70 70 this->bBoard->setAbsCoor(0, 0, 0); 71 71 // default position if not set in xml -
trunk/src/world_entities/effects/explosion.h
r10695 r10698 32 32 virtual void tick (float time); 33 33 34 private: 34 void setLifeTime( float lifeTime ){ this->lifeTime = lifeTime; } 35 36 protected: 35 37 static FastFactory* fastFactory; 36 38 -
trunk/src/world_entities/effects/wobblegrid.cc
r10618 r10698 10 10 11 11 ### File Specific: 12 main-programmer: David Hasenfratz12 main-programmer: Marc Schärer 13 13 */ 14 14
Note: See TracChangeset
for help on using the changeset viewer.