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

Fire effect renderer. More...

#include <pyro.h>

Classes

struct  PyroBurnPart
 
struct  PyroLightOper
 

Public Member Functions

Error IsEnded ()
 Indicates whether the pyrotechnic effect is complete. More...
 
void CutObjectLink (CObject *obj)
 Indicates that the object binds to the effect no longer exists, without deleting it. More...
 
bool EventProcess (const Event &event)
 Management of an event. More...
 

Protected Member Functions

bool Create (PyroType type, CObject *obj, float force)
 Creates pyrotechnic effect. More...
 
void DeleteObject ()
 Destroys the object. More...
 
void DisplayError (PyroType type, CObject *obj)
 
void CreateLight (Math::Vector pos, float height)
 Creates light to accompany a pyrotechnic effect. More...
 
void DeleteObject (bool primary, bool secondary)
 Removes the binding to a pyrotechnic effect. More...
 
void CreateTriangle (CObject *obj, ObjectType oType, int part)
 Creates an explosion with triangular form of particles. More...
 
void ExploStart ()
 Starts the explosion of a vehicle. More...
 
void ExploTerminate ()
 Ends the explosion of a vehicle. More...
 
void BurnStart ()
 Starts a vehicle fire. More...
 
void BurnAddPart (int part, Math::Vector pos, Math::Vector angle)
 Adds a part move. More...
 
void BurnProgress ()
 Advances of a vehicle fire. More...
 
bool BurnIsKeepPart (int part)
 Indicates whether a part should be retained. More...
 
void BurnTerminate ()
 Ends the fire of an insect or a vehicle. More...
 
void FallStart ()
 Start of an object freight falling. More...
 
CObjectFallSearchBeeExplo ()
 Seeks an object to explode by the falling ball of bees. More...
 
void FallProgress (float rTime)
 Fall of an object's freight. More...
 
Error FallIsEnded ()
 Indicates whether the fall is over. More...
 
void LightOperFlush ()
 Empty the table of operations of animation of light. More...
 
void LightOperAdd (float progress, float intensity, float r, float g, float b)
 Adds an animation operation of the light. More...
 
void LightOperFrame (float rTime)
 Updates the associated light. More...
 

Protected Attributes

CEnginem_engine = nullptr
 
CTerrainm_terrain = nullptr
 
CCameram_camera = nullptr
 
CParticlem_particle = nullptr
 
CLightManagerm_lightMan = nullptr
 
CObjectm_object = nullptr
 
CRobotMainm_main = nullptr
 
CSoundInterfacem_sound = nullptr
 
Math::Vector m_pos
 
Math::Vector m_posPower
 
bool m_power = false
 
PyroType m_type = PT_NULL
 
float m_force = 0.0f
 
float m_size = 0.0f
 
float m_progress = 0.0f
 
float m_speed = 0.0f
 
float m_time = 0.0f
 
float m_lastParticle = 0.0f
 
float m_lastParticleSmoke = 0.0f
 
int m_soundChannel = -1
 
int m_lightRank = -1
 
float m_lightHeight = 0.0f
 
std::vector< PyroLightOperm_lightOper
 
ObjectType m_burnType = OBJECT_NULL
 
int m_burnPartTotal = 0
 
PyroBurnPart m_burnPart [10]
 
int m_burnKeepPart [10] = {}
 
float m_burnFall = 0.0f
 
float m_fallFloor = 0.0f
 
float m_fallSpeed = 0.0f
 
float m_fallBulletTime = 0.0f
 
bool m_fallEnding = false
 
std::vector< Math::Spherem_crashSpheres
 
float m_resetAngle = 0.0f
 

Friends

class CPyroManager
 

Detailed Description

Fire effect renderer.

TODO: documentation

Member Function Documentation

bool Gfx::CPyro::Create ( PyroType  type,
CObject obj,
float  force 
)
protected

Creates pyrotechnic effect.

void Gfx::CPyro::DeleteObject ( )
protected

Destroys the object.

Error Gfx::CPyro::IsEnded ( )

Indicates whether the pyrotechnic effect is complete.

void Gfx::CPyro::CutObjectLink ( CObject obj)

Indicates that the object binds to the effect no longer exists, without deleting it.

bool Gfx::CPyro::EventProcess ( const Event event)

Management of an event.

void Gfx::CPyro::DisplayError ( PyroType  type,
CObject obj 
)
protected

Displays the error or eventual information Information can be linked to the destruction of an insect, a vehicle or building

void Gfx::CPyro::CreateLight ( Math::Vector  pos,
float  height 
)
protected

Creates light to accompany a pyrotechnic effect.

void Gfx::CPyro::DeleteObject ( bool  primary,
bool  secondary 
)
protected

Removes the binding to a pyrotechnic effect.

void Gfx::CPyro::CreateTriangle ( CObject obj,
ObjectType  oType,
int  part 
)
protected

Creates an explosion with triangular form of particles.

void Gfx::CPyro::ExploStart ( )
protected

Starts the explosion of a vehicle.

void Gfx::CPyro::ExploTerminate ( )
protected

Ends the explosion of a vehicle.

void Gfx::CPyro::BurnStart ( )
protected

Starts a vehicle fire.

void Gfx::CPyro::BurnAddPart ( int  part,
Math::Vector  pos,
Math::Vector  angle 
)
protected

Adds a part move.

void Gfx::CPyro::BurnProgress ( )
protected

Advances of a vehicle fire.

bool Gfx::CPyro::BurnIsKeepPart ( int  part)
protected

Indicates whether a part should be retained.

void Gfx::CPyro::BurnTerminate ( )
protected

Ends the fire of an insect or a vehicle.

void Gfx::CPyro::FallStart ( )
protected

Start of an object freight falling.

CObject * Gfx::CPyro::FallSearchBeeExplo ( )
protected

Seeks an object to explode by the falling ball of bees.

void Gfx::CPyro::FallProgress ( float  rTime)
protected

Fall of an object's freight.

Error Gfx::CPyro::FallIsEnded ( )
protected

Indicates whether the fall is over.

void Gfx::CPyro::LightOperFlush ( )
protected

Empty the table of operations of animation of light.

void Gfx::CPyro::LightOperAdd ( float  progress,
float  intensity,
float  r,
float  g,
float  b 
)
protected

Adds an animation operation of the light.

void Gfx::CPyro::LightOperFrame ( float  rTime)
protected

Updates the associated light.


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