Colobot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
Gfx::CLightning Class Reference

Lightning effect renderer. More...

#include <lightning.h>

Public Member Functions

 CLightning (CEngine *engine)
bool Create (float sleep, float delay, float magnetic)
 Triggers lightning.
void Flush ()
 Removes lightning.
bool GetStatus (float &sleep, float &delay, float &magnetic, float &progress)
 Gives the status of lightning.
bool SetStatus (float sleep, float delay, float magnetic, float progress)
 Specifies the status of lightning.
bool EventProcess (const Event &event)
 Management of an event.
void Draw ()
 Draws lightning.

Protected Types

enum  LightningPhase { LP_WAIT, LP_FLASH }

Protected Member Functions

bool EventFrame (const Event &event)
 Updates lightning.
CObjectSearchObject (Math::Vector pos)
 Seeks for the object closest to the lightning.

Protected Attributes

CEnginem_engine
CTerrainm_terrain
CCameram_camera
CSoundInterfacem_sound
bool m_lightningExists
float m_sleep
float m_delay
float m_magnetic
float m_speed
float m_progress
Math::Vector m_pos
LightningPhase m_phase
Math::Point m_shift [FLASH_SEGMENTS]
float m_width [FLASH_SEGMENTS]

Static Protected Attributes

static const short FLASH_SEGMENTS = 50

Detailed Description

Lightning effect renderer.

TODO: documentation


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