Changeset 8166 for code/branches/spaceboundaries/src/orxonox/worldentities
- Timestamp:
- Apr 1, 2011, 9:33:37 PM (14 years ago)
- Location:
- code/branches/spaceboundaries/src/orxonox/worldentities
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.cc
r8164 r8166 42 42 #include <infos/PlayerInfo.h> 43 43 44 #include <OgreTextAreaOverlayElement.h>44 //#include <OgreTextAreaOverlayElement.h> 45 45 #include <OgreOverlayManager.h> 46 #include <overlays/OverlayText.h>46 //#include <overlays/OverlayText.h> 47 47 48 48 namespace orxonox … … 55 55 COUT(0) << "Test ob Konstruktor aufgerufen wird." << std::endl; //!< message for debugging 56 56 // Show Boundaries on the radar. 57 m_pColoredTextAreaOverlayElementFactory = new ColoredTextAreaOverlayElementFactory();57 // m_pColoredTextAreaOverlayElementFactory = new ColoredTextAreaOverlayElementFactory(); 58 58 } 59 59 SpaceBoundaries::~SpaceBoundaries() 60 60 { 61 delete pColoredTextAreaOverlayElementFactory;61 // delete pColoredTextAreaOverlayElementFactory; 62 62 } 63 63 64 64 void SpaceBoundaries::setCenter(Vector3 r) 65 65 { 66 this->center = r;66 this->center_ = r; 67 67 } 68 68 Vector3 SpaceBoundaries::getCenter() 69 69 { 70 return this->center ;70 return this->center_; 71 71 } 72 72 73 73 void SpaceBoundaries::setMaxDistance(float r) 74 74 { 75 this->maxDistance = r;75 this->maxDistance_ = r; 76 76 } 77 77 float SpaceBoundaries::getMaxDistance() 78 78 { 79 return this->maxDistance ;79 return this->maxDistance_; 80 80 } 81 81 82 82 void SpaceBoundaries::setWarnDistance(float r) 83 83 { 84 this->warnDistance = r;84 this->warnDistance_ = r; 85 85 } 86 86 float SpaceBoundaries::getWarnDistance() 87 87 { 88 return this->warnDistance ;88 return this->warnDistance_; 89 89 } 90 90 … … 111 111 COUT(0) << "Pawn wird erkannt!!!" << std::endl; //!< message for debugging 112 112 COUT(0) << "Distanz:" << distance << std::endl; //!< message for debugging 113 if(distance > this->warnDistance /*&& distance < this->maxDistance*/)113 if(distance > this->warnDistance_ /*&& distance < this->maxDistance*/) 114 114 { 115 115 COUT(0) << "You are leaving the area" << std::endl; //!< message for debugging … … 121 121 122 122 } 123 } else if(distance > maxDistance )123 } else if(distance > maxDistance_) 124 124 { 125 125 // Decrease Health … … 138 138 { 139 139 Vector3 itemPosition = item->getPosition(); 140 return (itemPosition.distance(this->center ));140 return (itemPosition.distance(this->center_)); 141 141 } 142 142 … … 159 159 warning.show();*/ 160 160 // Register the overlay element 161 OverlayManager::getSingleton().addOverlayElementFactory(pColoredTextAreaOverlayElementFactory);161 /* OverlayManager::getSingleton().addOverlayElementFactory(pColoredTextAreaOverlayElementFactory); 162 162 163 163 Ogre::TextAreaOverlayElement *pTextArea = 164 164 (Ogre::TextAreaOverlayElement*)Ogre::OverlayManager.createOverlayElement("TextArea", "MyTextArea"); 165 165 pTextArea->setCaption("Some plain text"); 166 166 */ 167 167 168 168 } -
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
r8164 r8166 40 40 #include "worldentities/WorldEntity.h" 41 41 42 #include <ColoredTextAreaOverlayElementFactory.h>42 //#include <ColoredTextAreaOverlayElementFactory.h> 43 43 44 44 #include <string> … … 67 67 68 68 private: 69 Vector3 center ;70 float maxDistance ;71 float warnDistance ;69 Vector3 center_; 70 float maxDistance_; 71 float warnDistance_; 72 72 73 73 float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'center' bezogen. 74 74 void displayWarning(const std::string warnText); 75 75 bool isHumanPlayer(Pawn *item); 76 ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory;76 // ColoredTextAreaOverlayElementFactory* pColoredTextAreaOverlayElementFactory; 77 77 }; 78 78 }
Note: See TracChangeset
for help on using the changeset viewer.