Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/lodfinal/src/orxonox/objects/worldentities/Planet.h @ 2394

Last change on this file since 2394 was 2394, checked in by FelixSchulthess, 15 years ago

messing up planet so it will work in client mode

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 *      Marian Runo
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _Planet_H__
30#define _Planet_H__
31#include "tools/BillboardSet.h"
32#include "OrxonoxPrereqs.h"
33
34#include "MovableEntity.h"
35#include "tools/Mesh.h"
36#include "objects/Tickable.h"
37#include "Camera.h"
38
39namespace orxonox
40{
41
42    class _OrxonoxExport Planet : public MovableEntity
43    {
44        public:
45            Planet(BaseObject* creator);
46           
47            virtual ~Planet();
48           
49            void init();
50            virtual void tick(float dt);
51           
52            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
53           
54            virtual void changedVisibility();
55           
56            inline void setMeshSource(const std::string& meshname)
57                { this->meshSrc_ = meshname; this->changedMesh(); }
58               
59            inline const std::string& getMeshSource() const
60                { return this->meshSrc_; }
61
62            inline void setCastShadows(bool bCastShadows)
63                { this->bCastShadows_ = bCastShadows; this->changedShadows(); }
64               
65            inline bool getCastShadows() const
66                { return this->bCastShadows_; }           
67           
68            inline const std::string& getMesh() const{
69                return this->meshSrc_;
70            }
71           
72            inline void setAtmosphereSize(Real size){
73                this->atmosphereSize = size;
74            }
75           
76            inline Real getAtmosphereSize(){
77                return this->atmosphereSize;
78            }
79           
80            inline void setAtmosphere(const std::string& atmosphere){
81                this->atmosphere_ = atmosphere;
82            }
83           
84            inline const std::string& getAtmosphere(){
85                return this->atmosphere_;
86            }
87           
88            inline void setImageSize(Real size){
89                this->imageSize = size;
90            }
91           
92            inline Real getImageSize(){
93                return this->imageSize;
94            }
95
96        protected:
97            void registerVariables();
98
99        private:
100       
101            void changedMesh();
102            void changedShadows();
103           
104            std::string meshSrc_;
105            std::string atmosphere_;
106            Mesh mesh_;
107            Real atmosphereSize;
108            Real imageSize;
109            Ogre::Mesh::LodDistanceList distList;
110            BillboardSet billboard_;
111            bool bCastShadows_;
112                        Camera* activeCamera_;
113
114    };
115}
116
117#endif
118
Note: See TracBrowser for help on using the repository browser.