- Timestamp:
- Apr 14, 2010, 7:54:41 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/hudelements/src/orxonox/interfaces/RadarViewable.cc
r6717 r6727 40 40 @brief Constructor. 41 41 */ 42 RadarViewable::RadarViewable( )42 RadarViewable::RadarViewable(BaseObject* creator) 43 43 : isHumanShip_(false) 44 44 , bVisibility_(true) 45 , bInitialized_(false) 46 , creator_(creator) 45 47 , radarObjectCamouflage_(0.0f) 46 48 , radarObjectShape_(Dot) … … 50 52 51 53 this->uniqueId_=getUniqueNumberString(); 54 this->creator_->getScene()->getRadar()->addRadarObject(this); 55 this->bInitialized_ = true; 52 56 } 53 57 … … 55 59 RadarViewable::~RadarViewable() 56 60 { 61 if( this->bInitialized_ ) 62 this->creator_->getScene()->getRadar()->removeRadarObject(this); 57 63 } 58 64 59 void RadarViewable::setRadarObjectDescription(const std::string& str)60 {61 Radar* radar = this->getWorldEntity()->getScene()->getRadar();62 if (radar)63 this->radarObjectShape_ = radar->addObjectDescription(str);64 else65 {66 CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl;67 }68 this->radarObjectDescription_ = str;69 }65 // void RadarViewable::setRadarObjectDescription(const std::string& str) 66 // { 67 // Radar* radar = this->getWorldEntity()->getScene()->getRadar(); 68 // if (radar) 69 // this->radarObjectShape_ = radar->addObjectDescription(str); 70 // else 71 // { 72 // CCOUT(2) << "Attempting to access the radar, but the radar is non existent." << std::endl; 73 // } 74 // this->radarObjectDescription_ = str; 75 // } 70 76 71 77 const Vector3& RadarViewable::getRVWorldPosition() const … … 91 97 } 92 98 } 99 100 void RadarViewable::settingsChanged() 101 { 102 this->creator_->getScene()->getRadar()->radarObjectChanged(this); 103 } 93 104 }
Note: See TracChangeset
for help on using the changeset viewer.