Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jul 12, 2009, 11:58:01 PM (15 years ago)
Author:
rgrieder
Message:

Merged most of the core4 revisions back to the trunk except for:

  • orxonox_cast
  • all the radical changes in the input library
Location:
code/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.cc

    r3196 r3280  
    141141  }
    142142
    143   bool DistanceTrigger::isTriggered(TriggerMode mode)
     143  bool DistanceTrigger::isTriggered(TriggerMode::Value mode)
    144144  {
    145145    if (Trigger::isTriggered(mode))
  • code/trunk/src/orxonox/objects/worldentities/triggers/DistanceTrigger.h

    r3196 r3280  
    5959
    6060    protected:
    61       virtual bool isTriggered(TriggerMode mode);
     61      virtual bool isTriggered(TriggerMode::Value mode);
    6262      virtual void notifyMaskUpdate() {}
    6363
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.cc

    r3196 r3280  
    5454    }
    5555
    56     bool EventTrigger::isTriggered(TriggerMode mode)
     56    bool EventTrigger::isTriggered(TriggerMode::Value mode)
    5757    {
    5858        if (Trigger::isTriggered(mode))
  • code/trunk/src/orxonox/objects/worldentities/triggers/EventTrigger.h

    r3196 r3280  
    4747
    4848        protected:
    49             virtual bool isTriggered(TriggerMode mode);
     49            virtual bool isTriggered(TriggerMode::Value mode);
    5050
    5151        private:
  • code/trunk/src/orxonox/objects/worldentities/triggers/PlayerTrigger.h

    r3196 r3280  
    7070           
    7171    protected:
    72         virtual bool isTriggered(TriggerMode mode) = 0;
     72        virtual bool isTriggered(TriggerMode::Value mode) = 0;
    7373       
    7474        /**
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.cc

    r3196 r3280  
    4646    RegisterObject(Trigger);
    4747
    48     this->mode_ = TM_EventTriggerAND;
     48    this->mode_ = TriggerMode::EventTriggerAND;
    4949
    5050    this->bFirstTick_ = true;
     
    163163  }
    164164
    165   bool Trigger::isTriggered(TriggerMode mode)
     165  bool Trigger::isTriggered(TriggerMode::Value mode)
    166166  {
    167167//    if (this->bUpdating_)
     
    175175      switch (mode)
    176176      {
    177         case TM_EventTriggerAND:
     177        case TriggerMode::EventTriggerAND:
    178178          returnval = checkAnd();
    179179          break;
    180         case TM_EventTriggerOR:
     180        case TriggerMode::EventTriggerOR:
    181181          returnval = checkOr();
    182182          break;
    183         case TM_EventTriggerXOR:
     183        case TriggerMode::EventTriggerXOR:
    184184          returnval = checkXor();
    185185          break;
     
    270270  {
    271271    if (modeName == "and")
    272       this->setMode(TM_EventTriggerAND);
     272      this->setMode(TriggerMode::EventTriggerAND);
    273273    else if (modeName == "or")
    274       this->setMode(TM_EventTriggerOR);
     274      this->setMode(TriggerMode::EventTriggerOR);
    275275    else if (modeName == "xor")
    276       this->setMode(TM_EventTriggerXOR);
     276      this->setMode(TriggerMode::EventTriggerXOR);
    277277  }
    278278
    279279  std::string Trigger::getModeString() const
    280280  {
    281     if (this->mode_ == TM_EventTriggerAND)
     281    if (this->mode_ == TriggerMode::EventTriggerAND)
    282282      return std::string("and");
    283     else if (this->mode_ == TM_EventTriggerOR)
     283    else if (this->mode_ == TriggerMode::EventTriggerOR)
    284284      return std::string("or");
    285     else if (this->mode_ == TM_EventTriggerXOR)
     285    else if (this->mode_ == TriggerMode::EventTriggerXOR)
    286286      return std::string("xor");
    287287    else
  • code/trunk/src/orxonox/objects/worldentities/triggers/Trigger.h

    r3196 r3280  
    4141namespace orxonox
    4242{
    43   enum TriggerMode
     43  namespace TriggerMode
    4444  {
    45     TM_EventTriggerAND,
    46     TM_EventTriggerOR,
    47     TM_EventTriggerXOR,
    48   };
     45    enum Value
     46    {
     47      EventTriggerAND,
     48      EventTriggerOR,
     49      EventTriggerXOR,
     50    };
     51  }
    4952
    5053  class _OrxonoxExport Trigger : public StaticEntity, public Tickable
     
    6467
    6568      void setMode(const std::string& modeName);
    66       inline void setMode(TriggerMode mode)
     69      inline void setMode(TriggerMode::Value mode)
    6770        { this->mode_ = mode; }
    68       inline TriggerMode getMode() const
     71      inline TriggerMode::Value getMode() const
    6972        { return mode_; }
    7073
     
    103106    protected:
    104107      inline bool isTriggered() { return this->isTriggered(this->mode_); }
    105       virtual bool isTriggered(TriggerMode mode);
     108      virtual bool isTriggered(TriggerMode::Value mode);
    106109      virtual void triggered(bool bIsTriggered);
    107110
     
    118121      bool bFirstTick_;
    119122
    120       TriggerMode mode_;
     123      TriggerMode::Value mode_;
    121124      bool bInvertMode_;
    122125      bool bSwitch_;
Note: See TracChangeset for help on using the changeset viewer.