Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ogre1.9/src/modules/objects/Planet.h @ 11128

Last change on this file since 11128 was 11128, checked in by landauf, 8 years ago

let Planet inherit from Model to avoid code duplication (especially lod levels).
since model is a static entity, all planets with rotation and/or dynamic physics need to be attached to a movableentity now.

  • Property svn:eol-style set to native
File size: 2.5 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/**
30    @file Planet.h
31    @brief Definition of the Planet class.
32    @ingroup Objects
33*/
34
35#ifndef _Planet_H__
36#define _Planet_H__
37
38#include "objects/ObjectsPrereqs.h"
39
40#include <string>
41#include "tools/BillboardSet.h"
42#include "tools/Mesh.h"
43#include "tools/interfaces/Tickable.h"
44#include "graphics/Model.h"
45
46namespace orxonox
47{
48    class _ObjectsExport Planet : public Model, public Tickable
49    {
50        public:
51            Planet(Context* context);
52
53            virtual ~Planet();
54
55            virtual void tick(float dt) override;
56
57            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode) override;
58
59            virtual void changedVisibility() override;
60
61            inline void setAtmosphereSize(float size){
62                this->atmosphereSize = size;
63            }
64
65            inline float getAtmosphereSize(){
66                return this->atmosphereSize;
67            }
68
69            inline void setAtmosphere(const std::string& atmosphere){
70                this->atmosphere_ = atmosphere;
71                this->changedAtmosphere();
72            }
73
74            inline const std::string& getAtmosphere(){
75                return this->atmosphere_;
76            }
77
78            inline void setImageSize(float size){
79                this->imageSize = size;
80            }
81
82            inline float getImageSize(){
83                return this->imageSize;
84            }
85
86        protected:
87
88        private:
89            void registerVariables();
90
91            void changedAtmosphere();
92
93            std::string atmosphere_;
94            float atmosphereSize;
95            float imageSize;
96            BillboardSet billboard_;
97
98    };
99}
100
101#endif
102
Note: See TracBrowser for help on using the repository browser.