Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/weapons/src/orxonox/objects/worldentities/Planet.h @ 3050

Last change on this file since 3050 was 2710, checked in by rgrieder, 16 years ago

Merged buildsystem3 containing buildsystem2 containing Adi's buildsystem branch back to the trunk.
Please update the media directory if you were not using buildsystem3 before.

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