Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core5/src/orxonox/graphics/ParticleEmitter.h @ 5858

Last change on this file since 5858 was 5858, checked in by rgrieder, 15 years ago

Cleanup in *Prereqs.h files

  • Removed forward declarations to non-existent classes
  • Ordered all declarations by name and folder
  • introduce new section: "Enums" for those files with enums.
  • Added missing declarations
  • 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 *      Fabian 'x3n' Landau
24 *   Co-authors:
25 *      ...
26 *
27 */
28
29#ifndef _ParticleEmitter_H__
30#define _ParticleEmitter_H__
31
32#include "OrxonoxPrereqs.h"
33
34#include <string>
35#include "worldentities/StaticEntity.h"
36#include "tools/ToolsPrereqs.h"
37
38namespace orxonox
39{
40    class _OrxonoxExport ParticleEmitter : public StaticEntity
41    {
42        public:
43            ParticleEmitter(BaseObject* creator);
44            ~ParticleEmitter();
45
46            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
47            void registerVariables();
48
49            virtual void changedVisibility();
50            virtual void changedActivity();
51
52            inline ParticleInterface* getParticleInterface() const
53                { return this->particles_; }
54
55            inline void setSource(const std::string& source)
56                { this->source_ = source; this->sourceChanged(); }
57            inline const std::string& getSource() const
58                { return this->source_; }
59
60            inline void setLOD(LODParticle::Value level)
61                { this->LOD_ = level; this->LODchanged(); }
62            inline LODParticle::Value getLOD() const
63                { return this->LOD_; }
64
65        protected:
66            inline void setLODxml(unsigned int level)
67                { this->LOD_ = static_cast<LODParticle::Value>(level); this->LODchanged(); }
68            inline unsigned int getLODxml() const
69                { return static_cast<unsigned int>(this->LOD_); }
70
71            void sourceChanged();
72            void LODchanged();
73
74            ParticleInterface* particles_;
75            std::string        source_;
76            LODParticle::Value   LOD_;
77    };
78}
79
80#endif /* _ParticleEmitter_H__ */
Note: See TracBrowser for help on using the repository browser.