Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/objecthierarchy2/src/orxonox/objects/worldentities/Backlight.h @ 2254

Last change on this file since 2254 was 2254, checked in by landauf, 15 years ago

Update your media repository and delete keybindings.ini if you want to use boost (space).

  • Added new class "Engine" to control the speed of a SpaceShip (Engine is an Item, MultiStateEngine is a specialized version of Engine)
  • Added FadingBillboard, a billboard with the ability to fade in and out smoothly when activated/deactivated.
  • Several changes in Backlight, it's now a child of FadingBillboard
  • Some changes concerning local control in ControllableEntity
  • Fixed a bug in WorldEntity caused by different destruction order of attached objects on server and client
  • Added a "MainState" to BaseObject. An object has several states (activity, visibility, …) and one of it can be defined as "MainState" in the XML file. Other objects can change this state without knowing which state it really is (used by MultiStateEngine).
  • Property svn:eol-style set to native
  • Property svn:mergeinfo set to (toggle deleted branches)
    /code/branches/objecthierarchy/src/orxonox/objects/worldentities/Backlight.hmergedeligible
    /code/branches/ceguilua/src/orxonox/objects/Backlight.h1802-1808
    /code/branches/core3/src/orxonox/objects/Backlight.h1572-1739
    /code/branches/gcc43/src/orxonox/objects/Backlight.h1580
    /code/branches/gui/src/orxonox/objects/Backlight.h1635-1723
    /code/branches/input/src/orxonox/objects/Backlight.h1629-1636
    /code/branches/script_trigger/src/orxonox/objects/Backlight.h1295-1953,​1955
File size: 3.2 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 _Backlight_H__
30#define _Backlight_H__
31
32#include "OrxonoxPrereqs.h"
33#include "FadingBillboard.h"
34
35namespace orxonox
36{
37    class _OrxonoxExport Backlight : public FadingBillboard
38    {
39        public:
40            Backlight(BaseObject* creator);
41            virtual ~Backlight();
42
43            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
44            void registerVariables();
45
46            virtual void tick(float dt);
47            virtual void changedVisibility();
48
49            inline void setWidth(float width)
50                { this->width_ = width; this->update_width(); }
51            inline float getWidth() const
52                { return this->width_; }
53
54            inline void setLifetime(float lifetime)
55                { this->lifetime_ = lifetime; this->update_lifetime(); }
56            inline float getLifetime() const
57                { return this->lifetime_; }
58
59            inline void setLength(float length)
60                { this->length_ = length; this->update_length(); }
61            inline float getLength() const
62                { return this->length_; }
63
64            inline void setMaxElements(size_t maxelements)
65                { this->maxelements_ = maxelements; this->update_maxelements(); }
66            inline size_t getMaxElements() const
67                { return this->maxelements_; }
68
69            inline void setTrailMaterial(const std::string& material)
70                { this->trailmaterial_ = material; this->update_trailmaterial(); }
71            inline const std::string& getTrailMaterial() const
72                { return this->trailmaterial_; }
73
74            virtual void changedScale();
75
76        private:
77            virtual void startturnonoff();
78            virtual void stopturnonoff();
79            virtual void poststopturnonoff();
80            virtual void changedColour();
81            void update_width();
82            void update_lifetime();
83            void update_length();
84            void update_maxelements();
85            void update_trailmaterial();
86
87            Ogre::RibbonTrail* ribbonTrail_;
88            Ogre::SceneNode* ribbonTrailNode_;
89            float width_;
90            float length_;
91            float lifetime_;
92            size_t maxelements_;
93            std::string trailmaterial_;
94            char tickcount_;
95    };
96}
97
98#endif /* _Backlight_H__ */
Note: See TracBrowser for help on using the repository browser.