Colobot
Loading...
Searching...
No Matches
Gfx::CPyro Class Reference

Fire effect renderer. More...

#include <src/graphics/engine/pyro.h>

Classes

struct  PyroLightOper
struct  PyroBurnPart

Public Member Functions

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

Protected Member Functions

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

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

◆ Create()

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

Creates pyrotechnic effect.

◆ DeleteObject() [1/2]

void Gfx::CPyro::DeleteObject ( )
protected

Destroys the object.

◆ IsEnded()

Error Gfx::CPyro::IsEnded ( )

Indicates whether the pyrotechnic effect is complete.

◆ CutObjectLink()

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

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

◆ EventProcess()

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

Management of an event.

◆ DisplayError()

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

◆ CreateLight()

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

Creates light to accompany a pyrotechnic effect.

◆ DeleteObject() [2/2]

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

Removes the binding to a pyrotechnic effect.

◆ CreateTriangle()

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

Creates an explosion with triangular form of particles.

◆ ExploStart()

void Gfx::CPyro::ExploStart ( )
protected

Starts the explosion of a vehicle.

◆ ExploTerminate()

void Gfx::CPyro::ExploTerminate ( )
protected

Ends the explosion of a vehicle.

◆ BurnStart()

void Gfx::CPyro::BurnStart ( )
protected

Starts a vehicle fire.

◆ BurnAddPart()

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

Adds a part move.

◆ BurnProgress()

void Gfx::CPyro::BurnProgress ( )
protected

Advances of a vehicle fire.

◆ BurnIsKeepPart()

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

Indicates whether a part should be retained.

◆ BurnTerminate()

void Gfx::CPyro::BurnTerminate ( )
protected

Ends the fire of an insect or a vehicle.

◆ FallStart()

void Gfx::CPyro::FallStart ( )
protected

Start of an object freight falling.

◆ FallSearchBeeExplo()

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

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

◆ FallProgress()

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

Fall of an object's freight.

◆ FallIsEnded()

Error Gfx::CPyro::FallIsEnded ( )
protected

Indicates whether the fall is over.

◆ LightOperFlush()

void Gfx::CPyro::LightOperFlush ( )
protected

Empty the table of operations of animation of light.

◆ LightOperAdd()

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

Adds an animation operation of the light.

◆ LightOperFrame()

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

Updates the associated light.


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