Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/objects/worldentities/Backlight.h @ 3061

Last change on this file since 3061 was 3060, checked in by scheusso, 16 years ago

merged sound2 back to trunk

  • Property svn:eol-style set to native
  • Property svn:mergeinfo set to (toggle deleted branches)
    /code/branches/sound/src/orxonox/objects/worldentities/Backlight.h2829-3010
File size: 3.4 KB
RevLine 
[1608]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 _Backlight_H__
30#define _Backlight_H__
31
32#include "OrxonoxPrereqs.h"
[2662]33#include "FadingBillboard.h"
[2896]34#include "tools/TimeFactorListener.h"
[1608]35
36namespace orxonox
37{
[2662]38    class _OrxonoxExport Backlight : public FadingBillboard, public TimeFactorListener
[1608]39    {
40        public:
[2662]41            Backlight(BaseObject* creator);
[1608]42            virtual ~Backlight();
43
[1907]44            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[2662]45            void registerVariables();
46
[1608]47            virtual void tick(float dt);
48            virtual void changedVisibility();
49
[2662]50            inline void setWidth(float width)
51                { this->width_ = width; this->update_width(); }
52            inline float getWidth() const
53                { return this->width_; }
[1608]54
[2662]55            inline void setLifetime(float lifetime)
56                { this->lifetime_ = lifetime; this->update_lifetime(); }
57            inline float getLifetime() const
58                { return this->lifetime_; }
[1608]59
[2662]60            inline void setLength(float length)
61                { this->length_ = length; this->update_length(); }
62            inline float getLength() const
63                { return this->length_; }
[1608]64
[2662]65            inline void setMaxElements(size_t maxelements)
66                { this->maxelements_ = maxelements; this->update_maxelements(); }
67            inline size_t getMaxElements() const
68                { return this->maxelements_; }
[1608]69
[2662]70            inline void setTrailMaterial(const std::string& material)
71                { this->trailmaterial_ = material; this->update_trailmaterial(); }
72            inline const std::string& getTrailMaterial() const
73                { return this->trailmaterial_; }
[1608]74
[2662]75            virtual void changedScale();
[1608]76
[2662]77        protected:
78            virtual void changedTimeFactor(float factor_new, float factor_old);
79
80        private:
81            virtual void startturnonoff();
82            virtual void stopturnonoff();
83            virtual void poststopturnonoff();
84            virtual void changedColour();
85            void update_width();
86            void update_lifetime();
87            void update_length();
88            void update_maxelements();
89            void update_trailmaterial();
90
91            Ogre::RibbonTrail* ribbonTrail_;
92            Ogre::SceneNode* ribbonTrailNode_;
93            float width_;
94            float length_;
95            float lifetime_;
96            size_t maxelements_;
97            std::string trailmaterial_;
98            char tickcount_;
[1608]99    };
100}
101
102#endif /* _Backlight_H__ */
Note: See TracBrowser for help on using the repository browser.