Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Oct 29, 2008, 6:39:31 PM (16 years ago)
Author:
landauf
Message:

added events but not yet connected with triggers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.cc

    r2044 r2063  
    4343        this->amplitude_ = 1.0f;
    4444        this->frequency_ = 1.0f;
    45         this->phase_ = 0.0f;
     45        this->phase_ = 0;
    4646        this->time_ = 0;
    4747
     
    5959        XMLPortParam(BlinkingBillboard, "amplitude", setAmplitude, getAmplitude, xmlelement, mode).defaultValues(1.0f);
    6060        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));
    6262    }
    6363
     
    7272    {
    7373        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_));
    7575    }
    7676}
Note: See TracChangeset for help on using the changeset viewer.