- Timestamp:
- Apr 14, 2011, 4:53:27 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h
r8237 r8244 27 27 */ 28 28 29 /* TODO: - Markiere SpaceBoundaries-Position mit einem schoenen Objekt 30 - Kugel-Model mal hinzufuegen, das nur sichtbar ist, wenn man genuegend nah an maxDistance dran ist 31 - Reflexion an obiger Kugel beim Versuch durchzudringen 29 /* TODO: - Markiere SpaceBoundaries-Position mit einem schoenen Objekt 30 - Reflexion an Grenze mit Quaternionen machen (--> vgl. Funktion bounceBack() ) 32 31 */ 33 32 … … 49 48 @brief SpaceBoundaries gives level creators the possibility to bar Pawns from leaving a defined area. 50 49 51 F ourattributes can/should be defined in the XML-File:52 - 'position' : absolute position of the SpaceBoundaries class. ' *Distance' refersto this 'position'.50 Five attributes can/should be defined in the XML-File: 51 - 'position' : absolute position of the SpaceBoundaries class. 'warnDistance' and 'maxDistance' refer to this 'position'. 53 52 - 'warnDistance' : If the distance between the pawn of the human player and 'position' is bigger than 'warnDistance', a message is displayed to 54 53 inform the player that he'll soon be leaving the allowed area. 55 54 - 'maxDistance' : defines the area, where a pawn is allowed to be (radius of a ball). 55 - 'showDistance' : If the distance between the pawn and the boundary of the allowed area is smaller than 'showDistance', the boundary is shown. 56 56 - 'healthDecrease' : a measure to define how fast the health of a pawn should decrease after leaving the allowed area. 57 57 Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung) … … 66 66 ~SpaceBoundaries(); 67 67 68 void se 68 void setMaxDistance(float r); 69 69 float getMaxDistance(); 70 70 71 71 void setWarnDistance(float r); 72 72 float getWarnDistance(); 73 74 void setShowDistance(float r); 75 float getShowDistance(); 73 76 74 77 void setHealthDecrease(float amount); … … 82 85 float maxDistance_; //!< maximal zulaessige Entfernung von 'this->getPosition()'. 83 86 float warnDistance_; //!< Entfernung von 'this->getPosition()', ab der eine Warnung angezeigt wird, dass man bald das zulaessige Areal verlaesst. 87 float showDistance_; //!< Definiert, wann die Grenzen visualisiert werden sollen. 84 88 85 89 float healthDecrease_; //!< Mass fuer die Anzahl Health-Points, die nach ueberschreiten der Entfernung 'maxDistance_' von 'this->getPosition()' abgezogen werden. 86 90 //!< Empfohlene Werte: 0.1 (langsame Health-Verminderung) bis 5 (sehr schnelle Health-Verminderung) 91 92 Billboard *boundary_; 87 93 88 94 RadarViewable* centerRadar_; //!< Repraesentation von SpaceBoundaries auf dem Radar. … … 90 96 float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'this->getPosition()' bezogen. 91 97 void displayWarning(const std::string warnText); 98 void displayBoundaries(Pawn *item); 99 void bounceBack(Pawn *item); 92 100 bool isHumanPlayer(Pawn *item); 93 101
Note: See TracChangeset
for help on using the changeset viewer.