Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/modules/objects/Planet.h @ 10296

Last change on this file since 10296 was 9667, checked in by landauf, 11 years ago

merged core6 back to trunk

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