Changeset 2063 for code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.cc
- Timestamp:
- Oct 29, 2008, 6:39:31 PM (16 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.