Colobot
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Gfx::CCloud Class Reference

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

CEnginem_engine = nullptr
 
CTerrainm_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< CloudLinem_lines
 

Detailed Description

Cloud layer renderer.

Renders the cloud layer as fog. Cloud layer is similar to water layer

Member Function Documentation

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.

bool Gfx::CCloud::EventFrame ( const Event event)
protected

Makes the clouds evolve.

void Gfx::CCloud::AdjustLevel ( Math::Vector pos,
Math::Vector eye,
float  deep,
Math::Point uv1,
Math::Point uv2 
)
protected

Adjusts the position to normal, to imitate the clouds at movement.

void Gfx::CCloud::CreateLine ( int  x,
int  y,
int  len 
)
protected

Updates the positions, relative to the ground.

Member Data Documentation

float Gfx::CCloud::m_level = 0.0f
protected

Overall level.

std::string Gfx::CCloud::m_fileName
protected
Math::Point Gfx::CCloud::m_speed
protected

Feedrate (wind)

Color Gfx::CCloud::m_diffuse
protected

Diffuse color.

Color Gfx::CCloud::m_ambient
protected

Ambient color.

Math::Vector Gfx::CCloud::m_wind
protected

Wind speed.

int Gfx::CCloud::m_brickCount = 0
protected

Brick mosaic.

float Gfx::CCloud::m_brickSize = 0
protected

Size of a brick element.


The documentation for this class was generated from the following files: