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

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  
    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}
  • code/branches/objecthierarchy/src/orxonox/objects/worldentities/BlinkingBillboard.h

    r2044 r2063  
    5757                { return this->frequency_; }
    5858
    59             inline void setPhase(float phase)
     59            inline void setPhase(const Degree& phase)
    6060                { this->phase_ = phase; }
    61             inline float getPhase() const
     61            inline const Degree& getPhase() const
    6262                { return this->phase_; }
    6363
     
    6565            float amplitude_;
    6666            float frequency_;
    67             float phase_;
     67            Degree phase_;
    6868            long double time_;
    6969    };
Note: See TracChangeset for help on using the changeset viewer.