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. | |
void | Create (const std::string &fileName, const Color &diffuse, const Color &ambient, float level) |
Creates all areas of cloud. | |
void | Draw () |
Draw the clouds. | |
void | SetLevel (float level) |
Management of cloud level. | |
float | GetLevel () |
void | SetEnabled (bool enable) |
Management of clouds. | |
bool | GetEnabled () |
Protected Member Functions | |
bool | EventFrame (const Event &event) |
Makes the clouds evolve. | |
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. | |
void | CreateLine (int x, int y, int len) |
Updates the positions, relative to the ground. | |
Protected Attributes | |
CEngine * | m_engine = nullptr |
CTerrain * | m_terrain = nullptr |
bool | m_enabled = true |
float | m_level = 0.0f |
Overall level. | |
std::string | m_fileName |
Texture. | |
Math::Point | m_speed |
Feedrate (wind) | |
Color | m_diffuse |
Diffuse color. | |
Color | m_ambient |
Ambient color. | |
float | m_time = 0.0f |
float | m_lastTest = 0.0f |
int | m_subdiv = 8 |
Math::Vector | m_wind |
Wind speed. | |
int | m_brickCount = 0 |
Brick mosaic. | |
float | m_brickSize = 0 |
Size of a brick element. | |
std::vector< CloudLine > | m_lines |
Cloud layer renderer.
Renders the cloud layer as fog. Cloud layer is similar to water layer