- Timestamp:
- Dec 30, 2015, 1:59:38 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/src/modules/objects/triggers/DistanceMultiTrigger.cc
r10916 r10998 58 58 59 59 this->distance_ = 100.0f; 60 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::off);60 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::off); 61 61 this->targetName_ = ""; 62 62 this->beaconMask_.exclude(Class(BaseObject)); … … 136 136 ClassTreeMask targetMask = this->getTargetMask(); 137 137 // If we are in identify-mode another target mask has to be applies to find the DistanceTriggerBeacons. 138 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)138 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 139 139 targetMask = this->beaconMask_; 140 140 … … 145 145 146 146 // If the DistanceMultiTrigger is in identify-mode and the DistanceTriggerBeacon attached to the object has the wrong name we ignore it. 147 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)147 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 148 148 { 149 149 if(entity->getName() != this->targetName_) … … 155 155 156 156 // If the DistanceMultiTrigger is in exclude mode and the DistanceTriggerBeacon attached to the object has the right name, we ignore it. 157 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::exclude)157 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::exclude) 158 158 { 159 159 … … 182 182 183 183 // Change the entity to the parent of the DistanceTriggerBeacon (if in identify-mode), which is the entity to which the beacon is attached. 184 if(this->beaconMode_ == distanceMultiTriggerBeaconMode::identify)184 if(this->beaconMode_ == DistanceMultiTriggerBeaconMode::identify) 185 185 entity = entity->getParent(); 186 186 … … 206 206 The mode as an enum. 207 207 */ 208 void DistanceMultiTrigger::setBeaconModeDirect( distanceMultiTriggerBeaconMode::Value mode)208 void DistanceMultiTrigger::setBeaconModeDirect(DistanceMultiTriggerBeaconMode mode) 209 209 { 210 210 this->beaconMode_ = mode; … … 221 221 switch(this->getBeaconModeDirect()) 222 222 { 223 case distanceMultiTriggerBeaconMode::off :223 case DistanceMultiTriggerBeaconMode::off : 224 224 return DistanceMultiTrigger::beaconModeOff_s; 225 case distanceMultiTriggerBeaconMode::identify:225 case DistanceMultiTriggerBeaconMode::identify: 226 226 return DistanceMultiTrigger::beaconModeIdentify_s; 227 case distanceMultiTriggerBeaconMode::exclude:227 case DistanceMultiTriggerBeaconMode::exclude: 228 228 return DistanceMultiTrigger::beaconModeExlcude_s; 229 229 default : … … 242 242 { 243 243 if(mode == DistanceMultiTrigger::beaconModeOff_s) 244 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::off);244 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::off); 245 245 else if(mode == DistanceMultiTrigger::beaconModeIdentify_s) 246 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::identify);246 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::identify); 247 247 else if(mode == DistanceMultiTrigger::beaconModeExlcude_s) 248 this->setBeaconModeDirect( distanceMultiTriggerBeaconMode::exclude);248 this->setBeaconModeDirect(DistanceMultiTriggerBeaconMode::exclude); 249 249 else 250 250 orxout(internal_error, context::triggers) << "Invalid beacon mode in DistanceMultiTrigger." << endl;
Note: See TracChangeset
for help on using the changeset viewer.