- Timestamp:
- Apr 7, 2011, 10:19:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/dockingsystem2/src/modules/objects/triggers/DistanceTrigger.h
r8079 r8206 45 45 namespace orxonox 46 46 { 47 48 /** 49 @brief 50 Enum for the beacon mode of the DistanceTrigger. 51 52 @ingroup NormalTrigger 53 */ 54 namespace distanceTriggerBeaconMode 55 { 56 enum Value { 57 off, 58 identify, 59 exclude 60 }; 61 } 47 62 48 63 /** … … 69 84 void removeTargets(const std::string& targets); 70 85 71 inline void setTargetName(const std::string& targetname)72 { if(targetname != "") this->singleTargetMode_ = true; else this->singleTargetMode_ = false; this->targetName_ = targetname; }73 inline const std::string& getTargetName(void)74 { return this->targetName_; }75 76 86 inline void setDistance(float distance) 77 87 { this->distance_ = distance; } 78 88 inline float getDistance() const 79 89 { return this->distance_; } 90 91 void setBeaconModeDirect(distanceTriggerBeaconMode::Value mode); //!< Set the beacon mode. 92 /** 93 @brief Get the beacon mode. 94 @return Returns the mode as an enum. 95 */ 96 inline distanceTriggerBeaconMode::Value getBeaconModeDirect(void) const 97 { return this->beaconMode_; } 98 void setBeaconMode(const std::string& mode); //!< Set the beacon mode. 99 const std::string& getBeaconMode(void) const; //!< Get the beacon mode. 100 101 inline void setTargetName(const std::string& targetname) 102 { this->targetName_ = targetname; } 103 inline const std::string& getTargetName(void) 104 { return this->targetName_; } 80 105 81 106 bool checkDistance(); … … 88 113 89 114 private: 115 //! Strings for the beacon modes. 116 static const std::string beaconModeOff_s; 117 static const std::string beaconModeIdentify_s; 118 static const std::string beaconModeExlcude_s; 119 90 120 std::set<Ogre::Node*> targetSet_; 121 122 distanceTriggerBeaconMode::Value beaconMode_; 91 123 std::string targetName_; 124 ClassTreeMask* beaconMask_; //!< A mask, that only accepts DistanceTriggerBeacons. 125 92 126 float distance_; 93 bool singleTargetMode_;94 127 95 128 };
Note: See TracChangeset
for help on using the changeset viewer.