Changeset 2063 for code/branches/objecthierarchy/src/orxonox/objects
- Timestamp:
- Oct 29, 2008, 6:39:31 PM (16 years ago)
- Location:
- code/branches/objecthierarchy/src/orxonox/objects/worldentities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.cc
r2044 r2063 43 43 this->amplitude_ = 1.0f; 44 44 this->frequency_ = 1.0f; 45 this->phase_ = 0 .0f;45 this->phase_ = 0; 46 46 this->time_ = 0; 47 47 … … 59 59 XMLPortParam(BlinkingBillboard, "amplitude", setAmplitude, getAmplitude, xmlelement, mode).defaultValues(1.0f); 60 60 XMLPortParam(BlinkingBillboard, "frequency", setFrequency, getFrequency, xmlelement, mode).defaultValues(1.0f); 61 XMLPortParam(BlinkingBillboard, "phase", setPhase, getPhase, xmlelement, mode).defaultValues( 0.0f);61 XMLPortParam(BlinkingBillboard, "phase", setPhase, getPhase, xmlelement, mode).defaultValues(Degree(0)); 62 62 } 63 63 … … 72 72 { 73 73 this->time_ += dt; 74 this->setScale(this->amplitude_ * sin((6.2831853 + this->phase_) * this->frequency_ * this->time_));74 this->setScale(this->amplitude_ * sin((6.2831853 * this->time_ + this->phase_.valueRadians()) * this->frequency_)); 75 75 } 76 76 } -
code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.h
r2044 r2063 57 57 { return this->frequency_; } 58 58 59 inline void setPhase( floatphase)59 inline void setPhase(const Degree& phase) 60 60 { this->phase_ = phase; } 61 inline floatgetPhase() const61 inline const Degree& getPhase() const 62 62 { return this->phase_; } 63 63 … … 65 65 float amplitude_; 66 66 float frequency_; 67 floatphase_;67 Degree phase_; 68 68 long double time_; 69 69 };
Note: See TracChangeset
for help on using the changeset viewer.