Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/trunk/src/orxonox/items/Engine.h @ 8324

Last change on this file since 8324 was 8079, checked in by landauf, 14 years ago

merged usability branch back to trunk

incomplete summary of the changes in this branch:

  • enhanced keyboard navigation in GUIs
  • implemented new graphics menu and changeable window size at runtime
  • added developer mode
  • HUD shows if game is paused, game pauses if ingame menu is opened
  • removed a few obsolete commands and hid some that are more for internal use
  • numpad works in console and gui
  • faster loading of level info
  • enhanced usage of compositors (Shader class)
  • improved camera handling, configurable FOV and aspect ratio
  • Property svn:eol-style set to native
File size: 5.5 KB
RevLine 
[2254]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 _Engine_H__
30#define _Engine_H__
31
32#include "OrxonoxPrereqs.h"
33
[5693]34#include "tools/interfaces/Tickable.h"
[2254]35#include "Item.h"
36
[6709]37#include "interfaces/PickupCarrier.h"
38
[2254]39namespace orxonox
40{
[6709]41    class _OrxonoxExport Engine : public Item, public Tickable, public PickupCarrier
[2254]42    {
43        public:
44            Engine(BaseObject* creator);
45            virtual ~Engine();
46
47            virtual void XMLPort(Element& xmlelement, XMLPort::Mode mode);
[2478]48            void setConfigValues();
[2254]49
50            virtual void tick(float dt);
[2350]51            virtual void changedActivity();
[2254]52
53            virtual void addToSpaceShip(SpaceShip* ship);
54            inline SpaceShip* getShip() const
55                { return this->ship_; }
56
57            inline void setBoostFactor(float factor)
58                { this->boostFactor_ = factor; }
59            inline float getBoostFactor() const
60                { return this->boostFactor_; }
61
62            inline void setSpeedFactor(float factor)
63                { this->speedFactor_ = factor; }
64            inline float getSpeedFactor() const
65                { return this->speedFactor_; }
66
67            inline void setMaxSpeedFront(float speed)
68                { this->maxSpeedFront_ = speed; }
69            inline void setMaxSpeedBack(float speed)
70                { this->maxSpeedBack_ = speed; }
71            inline void setMaxSpeedLeftRight(float speed)
72                { this->maxSpeedLeftRight_ = speed; }
73            inline void setMaxSpeedUpDown(float speed)
74                { this->maxSpeedUpDown_ = speed; }
75
[2256]76            inline float getMaxSpeedFront() const
77                { return this->maxSpeedFront_; }
78            inline float getMaxSpeedBack() const
79                { return this->maxSpeedBack_; }
80            inline float getMaxSpeedLeftRight() const
81                { return this->maxSpeedLeftRight_; }
82            inline float getMaxSpeedUpDown() const
83                { return this->maxSpeedUpDown_; }
84
[2254]85            inline void setAccelerationFront(float acceleration)
86                { this->accelerationFront_ = acceleration; }
87            inline void setAccelerationBrake(float acceleration)
88                { this->accelerationBrake_ = acceleration; }
89            inline void setAccelerationBack(float acceleration)
90                { this->accelerationBack_ = acceleration; }
91            inline void setAccelerationLeftRight(float acceleration)
92                { this->accelerationLeftRight_ = acceleration; }
93            inline void setAccelerationUpDown(float acceleration)
94                { this->accelerationUpDown_ = acceleration; }
95
[2256]96            inline float getAccelerationFront() const
97                { return this->accelerationFront_; }
98            inline float getAccelerationBrake() const
99                { return this->accelerationBrake_; }
100            inline float getAccelerationBack() const
101                { return this->accelerationBack_; }
102            inline float getAccelerationLeftRight() const
103                { return this->accelerationLeftRight_; }
104            inline float getAccelerationUpDown() const
105                { return this->accelerationUpDown_; }
106
[6709]107            inline float getSpeedAdd(void)
108                { return this->speedAdd_; }
109            inline float getSpeedMultiply(void)
110                { return this->speedMultiply_; }
111
[2254]112            virtual const Vector3& getDirection() const;
113
[7547]114            virtual const Vector3& getCarrierPosition(void) const;
[6709]115
116            inline void setSpeedAdd(float speedAdd)
117                { this->speedAdd_=speedAdd; }
118            inline void setSpeedMultiply(float speedMultiply)
119                { this->speedMultiply_=speedMultiply; }
120
121        protected:
[7547]122            virtual std::vector<PickupCarrier*>* getCarrierChildren(void) const
[6711]123                { return new std::vector<PickupCarrier*>(); }
[7547]124            virtual PickupCarrier* getCarrierParent(void) const;
[6709]125
[2254]126        private:
[7163]127            void registerVariables();
[2254]128            void networkcallback_shipID();
[8079]129            void changedEnableMotionBlur();
[2254]130
131            SpaceShip* ship_;
132            unsigned int shipID_;
133
134            float boostFactor_;
135            float speedFactor_;
136
[6709]137            float speedAdd_;
138            float speedMultiply_;
139
[2254]140            float maxSpeedFront_;
141            float maxSpeedBack_;
142            float maxSpeedLeftRight_;
143            float maxSpeedUpDown_;
144
145            float accelerationFront_;
146            float accelerationBrake_;
147            float accelerationBack_;
148            float accelerationLeftRight_;
149            float accelerationUpDown_;
[2350]150
151            Shader* boostBlur_;
[2478]152            float blurStrength_;
[8079]153            bool bEnableMotionBlur_;
[2254]154    };
155}
156
157#endif /* _Engine_H__ */
Note: See TracBrowser for help on using the repository browser.