Colobot
|
Cloud layer renderer. More...
#include <cloud.h>
Classes | |
struct | CloudLine |
Cloud strip. More... | |
Public Member Functions | |
CCloud (CEngine *engine) | |
bool | EventProcess (const Event &event) |
void | Flush () |
Removes all the clouds. More... | |
void | Create (const std::string &fileName, const Color &diffuse, const Color &ambient, float level) |
Creates all areas of cloud. More... | |
void | Draw () |
Draw the clouds. More... | |
void | SetLevel (float level) |
Management of cloud level. More... | |
float | GetLevel () |
void | SetEnabled (bool enabled) |
Management of clouds. More... | |
bool | GetEnabled () |
Protected Member Functions | |
bool | EventFrame (const Event &event) |
Makes the clouds evolve. More... | |
void | AdjustLevel (Math::Vector &pos, Math::Vector &eye, float deep, Math::Point &uv1, Math::Point &uv2) |
Adjusts the position to normal, to imitate the clouds at movement. More... | |
void | CreateLine (int x, int y, int len) |
Updates the positions, relative to the ground. More... | |
Protected Attributes | |
CEngine * | m_engine = nullptr |
CTerrain * | m_terrain = nullptr |
bool | m_enabled = true |
float | m_level = 0.0f |
Overall level. More... | |
std::string | m_fileName |
Texture. More... | |
Math::Point | m_speed |
Feedrate (wind) More... | |
Color | m_diffuse |
Diffuse color. More... | |
Color | m_ambient |
Ambient color. More... | |
float | m_time = 0.0f |
float | m_lastTest = 0.0f |
int | m_subdiv = 8 |
Math::Vector | m_wind |
Wind speed. More... | |
int | m_brickCount = 0 |
Brick mosaic. More... | |
float | m_brickSize = 0 |
Size of a brick element. More... | |
std::vector< CloudLine > | m_lines |
Cloud layer renderer.
Renders the cloud layer as fog. Cloud layer is similar to water layer
void Gfx::CCloud::Flush | ( | ) |
Removes all the clouds.
void Gfx::CCloud::Create | ( | const std::string & | fileName, |
const Color & | diffuse, | ||
const Color & | ambient, | ||
float | level | ||
) |
Creates all areas of cloud.
void Gfx::CCloud::Draw | ( | ) |
Draw the clouds.
void Gfx::CCloud::SetLevel | ( | float | level | ) |
Management of cloud level.
void Gfx::CCloud::SetEnabled | ( | bool | enabled | ) |
Management of clouds.
|
protected |
Makes the clouds evolve.
|
protected |
Adjusts the position to normal, to imitate the clouds at movement.
|
protected |
Updates the positions, relative to the ground.
|
protected |
Overall level.
|
protected |
|
protected |
Feedrate (wind)
|
protected |
Diffuse color.
|
protected |
Ambient color.
|
protected |
Wind speed.
|
protected |
Brick mosaic.
|
protected |
Size of a brick element.