xoreos  0.0.5
fadequad.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef GRAPHICS_AURORA_FADEQUAD_H
26 #define GRAPHICS_AURORA_FADEQUAD_H
27 
29 
30 namespace Graphics {
31 
32 namespace Aurora {
33 
34 class FadeQuad : public Renderable {
35 public:
36  FadeQuad();
37 
39  void getColor(float &r, float &g, float &b) const;
41  void setColor(float r, float g, float b);
42 
44  void getWaitTime(float &wait) const;
46  void setWaitTime(float wait);
47 
49  void getRunTime(float &run) const;
51  void setRunTime(float run);
52 
54  void fadeIn();
56  void fadeOut();
57 
58  void calculateDistance();
59  void render(RenderPass pass);
60 
61 private:
62  enum FadeType {
66  };
67 
69 
70  float _r, _g, _b;
71  float _opacity;
75 };
76 
77 } // End of namespace Aurora
78 
79 } // End of namespace Graphics
80 
81 #endif // GRAPHICS_AURORA_FADEQUAD_H
void setWaitTime(float wait)
Set the time to wait until fading begins.
Definition: fadequad.cpp:57
void getColor(float &r, float &g, float &b) const
Get the current color of the quad.
Definition: fadequad.cpp:41
void getWaitTime(float &wait) const
Get the time to wait until fading begins.
Definition: fadequad.cpp:53
RenderPass
Definition: types.h:97
void render(RenderPass pass)
Render the object.
Definition: fadequad.cpp:84
void fadeIn()
Start a fade in.
Definition: fadequad.cpp:69
An object that can be displayed by the graphics manager.
Definition: renderable.h:42
void setColor(float r, float g, float b)
Set the current color of the quad.
Definition: fadequad.cpp:47
uint32_t uint32
Definition: types.h:204
void fadeOut()
Start a fade out.
Definition: fadequad.cpp:75
void getRunTime(float &run) const
Get the time the quad is fading.
Definition: fadequad.cpp:61
#define pass
Definition: fft.cpp:257
void setRunTime(float run)
Set the time the quad is fading.
Definition: fadequad.cpp:65
An object that can be displayed by the graphics manager.
void calculateDistance()
Calculate the object&#39;s distance.
Definition: fadequad.cpp:81