Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/AsteroidMining_HS17/src/modules/asteroidmining/SpicedAsteroidField.h @ 11665

Last change on this file since 11665 was 11664, checked in by remartin, 7 years ago

SpicedAsteroidBelt erstellt, kosmetische Veränderungen. Offener Punkt um velocity, ansonsten fehlt nur noch das dokumentieren.

File size: 3.4 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 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29/**
30
31    @file SpicedAsteroidField.h
32    @brief Asteroid field with lots of parameters. Derived from asteroidField.lua
33
34
35*/
36
37#ifndef _SpicedAsteroidField_H__
38#define _SpicedAsteroidField_H__
39
40#include "OrxonoxPrereqs.h"
41
42#include <string>
43#include <vector>
44
45#include "worldentities/ControllableEntity.h"
46#include "../../orxonox/worldentities/pawns/Pawn.h"
47
48namespace orxonox // tolua_export
49{
50
51    // tolua_export
52    class _OrxonoxExport SpicedAsteroidField : public Pawn // need pawn to get tick for clean argument passing
53    { // tolua_export
54
55        public:
56            SpicedAsteroidField(Context* context);// This constructor is for XML access only!
57            SpicedAsteroidField(Context* c, Vector3 p, int minS, int maxS, int w, int count, bool f, float mD, float fD); 
58
59            virtual ~SpicedAsteroidField();
60            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
61            virtual void XMLEventPort(Element& xmlelement, XMLPort::Mode mode) override;
62            virtual void tick(float dt) override;
63
64
65            inline void setCount(float s){this->count = s;}
66            inline float getCount(){return this->count;}
67
68            inline void setMineralDensity(float d){this->mDensity = d;}
69            inline float getMineralDensity(){return this->mDensity;}
70
71            inline void setPosition(Vector3 v){this->position = v;}
72            inline Vector3 getPosition(){return this->position;}
73
74            inline void setMaxSize(int i){this->maxSize = i;}
75            inline int getMaxSize(){return this->maxSize;}
76
77            inline void setMinSize(int i){this->minSize = i;}
78            inline int getMinSize(){return this->minSize;}
79
80            inline void setRadius(float r){this->radius = r;}
81            inline int getRadius(){return this->radius;}
82
83            inline void setFog(bool f){this->foggy = f;}
84            inline bool isFoggy(){return this->foggy;}
85
86            inline void setFogDensity(float fd){this->fogDensity = fd;}
87            inline float getFogDensity(){return this->fogDensity;}
88
89        protected:
90
91            Context* context;
92
93            float count;
94            float mDensity; // Mineral density, between 0 and 1;
95
96            Vector3 position;
97           
98            int maxSize;
99            int minSize;
100
101            float radius; 
102            bool foggy;
103            float fogDensity; 
104
105            virtual void create();
106
107
108
109        private:
110            void registerVariables();
111
112    }; // tolua_export
113} // tolua_export
114
115#endif /* _SpicedAsteroidField_H__ */
Note: See TracBrowser for help on using the repository browser.