37 _fadeType(kFadeNone), _r(1.0f), _g(0.0f), _b(0.0f),
38 _opacity(0.0f), _wait(0), _run(0), _start(0) {
85 bool isTransparent =
_opacity < 1.0f;
112 glGetIntegerv(GL_VIEWPORT, viewport);
117 width = viewport[2] / 2;
118 height = viewport[3] / 2;
121 glVertex3f(width, height, -
FLT_MAX);
122 glVertex3f(-width, height, -
FLT_MAX);
123 glVertex3f(-width, -height, -
FLT_MAX);
124 glVertex3f(width, -height, -
FLT_MAX);
127 glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
The Quad to handle one color fades.
virtual void show()
Show the object.
Only render transparent parts.
void setWaitTime(float wait)
Set the time to wait until fading begins.
void getColor(float &r, float &g, float &b) const
Get the current color of the quad.
void getWaitTime(float &wait) const
Get the time to wait until fading begins.
Utility templates and functions.
The global events manager.
void render(RenderPass pass)
Render the object.
void fadeIn()
Start a fade in.
#define EventMan
Shortcut for accessing the events manager.
An object that can be displayed by the graphics manager.
void setColor(float r, float g, float b)
Set the current color of the quad.
void fadeOut()
Start a fade out.
void getRunTime(float &run) const
Get the time the quad is fading.
void setRunTime(float run)
Set the time the quad is fading.
void calculateDistance()
Calculate the object's distance.
Only render opaque parts.