Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/spaceboundaries/src/orxonox/worldentities/SpaceBoundaries.h @ 8110

Last change on this file since 8110 was 8110, checked in by kmaurus, 13 years ago

Iteratorschleife aller MobileEntities sowie Funktion zum Berechnen des Abstandes einer MobileEntity vom Zentrun erstellt

File size: 2.2 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Maurus Kaufmann
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _SpaceBoundaries_H__
30#define _SpaceBoundaries_H__
31
32/* Folgender Block ist Copy-Paste und somit teilweise wohl unnoetig */
33#include "OrxonoxPrereqs.h"
34#include <string>
35#include "core/SubclassIdentifier.h"
36
37/* Einige, spezifische include-Statements */
38#include "core/CoreIncludes.h"
39#include "tools/interfaces/Tickable.h"
40#include "worldentities/StaticEntity.h"
41#include "worldentities/WorldEntity.h"
42
43
44namespace orxonox
45{
46    class _OrxonoxExport SpaceBoundaries : public StaticEntity, public Tickable
47    {
48        public:
49            SpaceBoundaries(BaseObject* creator);
50            ~SpaceBoundaries();
51           
52            void setCenter(Vector3 r);
53            Vector3 getCenter();
54           
55            void setMaxDistance(float r);
56            float getMaxDistance();
57           
58            void setWarnDistance(float r);
59            float getWarnDistance();
60
61            void XMLPort(Element& xmlelement, XMLPort::Mode mode);
62           
63            void tick(float dt);
64
65        private:
66            Vector3 center;
67            float maxDistance;
68            float warnDistance;
69       
70            float computeDistance(WorldEntity *item); //!< Auf den Mittelpunkt 'center' bezogen.
71    };
72}
73
74#endif /* _SpaceBoundaries_H__ */
Note: See TracBrowser for help on using the repository browser.