Emergency 20 Dokumentation  4.2.0
em5::FireSystem Class Reference

Fire system. More...

#include <FireSystem.h>

Inheritance diagram for em5::FireSystem:
qsf::System

Public Types

enum  SimulationVisualisationMode : uint8 { SimulationVisualisationMode::SHOW_NONE, SimulationVisualisationMode::SHOW_GLOBAL, SimulationVisualisationMode::SHOW_ONLY_SELECTED }
 
enum  FireSpreadLinesVisualisationMode : uint8 { FireSpreadLinesVisualisationMode::SHOW_BOTH, FireSpreadLinesVisualisationMode::SHOW_RECEIVING, FireSpreadLinesVisualisationMode::SHOW_SENDING }
 
typedef boost::container::flat_set< uint64EntityIdSet
 

Public Member Functions

 FireSystem ()
 Default constructor. More...
 
 ~FireSystem ()
 Destructor. More...
 
const FireMaterialgetFireMaterialByName (const std::string &id) const
 
FireMaterialManagergetFireMaterialManager () const
 Get the fire material manager instance. More...
 
bool getFireSimulationActive () const
 
void setFireSimulationActive (bool fireSimulationEnabled)
 
void onGameStartup ()
 Gets called on game startup. More...
 
void onGameShutdown ()
 Gets called on game shutdown. More...
 
void resetFireSystem ()
 Set a flag to reset the fire spread calculation. More...
 
float getFireEnergyMultiplier () const
 
void setFireEnergyMultiplier (float multiplier)
 
SimulationVisualisationMode getFireRadiansSimulationVisualisationMode () const
 
void setFireRadiansSimulationVisualisationMode (SimulationVisualisationMode visualisationMode)
 
SimulationVisualisationMode getFireSpreadSimulationVisualisationMode () const
 
void setFireSpreadSimulationVisualisationMode (SimulationVisualisationMode visualisationMode)
 
FireSpreadLinesVisualisationMode getFireSpreadLinesVisualisationMode () const
 
void setFireSpreadLinesVisualisationMode (FireSpreadLinesVisualisationMode visualisationMode)
 
void registerFireReceiver (FireReceiverComponent &fireReceiver)
 
void unregisterFireReceiver (FireReceiverComponent &fireReceiver)
 
virtual const char * getName () const override
 Get the name of the system. More...
 
virtual bool onStartup (bool serverMode) override
 Startup the system. More...
 
virtual void onShutdown () override
 Shutdown the system. More...
 
- Public Member Functions inherited from qsf::System
virtual ~System ()
 Destructor. More...
 

Additional Inherited Members

- Protected Member Functions inherited from qsf::System
 System ()
 Default constructor. More...
 

Detailed Description

Fire system.

Remarks
The fire system loads the fire materials via the FireMaterialManager class and keeps vital variables. Entities with a FireReceiverComponent or FireComponent are part of the fire system. They take "damage" from fire. Entities with FireComponent can burn with an particle effect, have different fire states and can get burned.

FireMaterials are a collection of data of the fire. Every FireComponent has one. Use "EM5_FIRE" as shortcut to the fire system class.

Member Typedef Documentation

typedef boost::container::flat_set<uint64> em5::FireSystem::EntityIdSet

Member Enumeration Documentation

Enumerator
SHOW_BOTH 

Show receiving and sending lines.

SHOW_RECEIVING 

Show receiving lines.

SHOW_SENDING 

Show sending lines.

Enumerator
SHOW_NONE 

No visualisation.

SHOW_GLOBAL 

Show for all items.

SHOW_ONLY_SELECTED 

Show only for selected items.

Constructor & Destructor Documentation

em5::FireSystem::FireSystem ( )

Default constructor.

em5::FireSystem::~FireSystem ( )

Destructor.

  • Not virtual by intent

Member Function Documentation

float em5::FireSystem::getFireEnergyMultiplier ( ) const
const FireMaterial* em5::FireSystem::getFireMaterialByName ( const std::string &  id) const

Get fire material by ID

FireMaterialManager & em5::FireSystem::getFireMaterialManager ( ) const
inline

Get the fire material manager instance.

FireSystem::SimulationVisualisationMode em5::FireSystem::getFireRadiansSimulationVisualisationMode ( ) const
inline
bool em5::FireSystem::getFireSimulationActive ( ) const
inline
FireSystem::FireSpreadLinesVisualisationMode em5::FireSystem::getFireSpreadLinesVisualisationMode ( ) const
inline
FireSystem::SimulationVisualisationMode em5::FireSystem::getFireSpreadSimulationVisualisationMode ( ) const
inline
const char * em5::FireSystem::getName ( ) const
inlineoverridevirtual

Get the name of the system.

Returns
Null terminated ASCII name of the system, never a null pointer, do not manipulate or destroy the returned name

Implements qsf::System.

void em5::FireSystem::onGameShutdown ( )

Gets called on game shutdown.

void em5::FireSystem::onGameStartup ( )

Gets called on game startup.

virtual void em5::FireSystem::onShutdown ( )
overridevirtual

Shutdown the system.

Note
  • This method is only called case "onStartup()" returned successfully

Implements qsf::System.

virtual bool em5::FireSystem::onStartup ( bool  serverMode)
overridevirtual

Startup the system.

Parameters
[in]serverMode"true" if the system should start in server mode, else "false"
Returns
"true" if all went fine, else "false"
Note
  • Server mode means that e.g. there's no need for audio & visual stuff because there's no display or sound hardware in the first place

Implements qsf::System.

void em5::FireSystem::registerFireReceiver ( FireReceiverComponent fireReceiver)
void em5::FireSystem::resetFireSystem ( )
inline

Set a flag to reset the fire spread calculation.

void em5::FireSystem::setFireEnergyMultiplier ( float  multiplier)
void em5::FireSystem::setFireRadiansSimulationVisualisationMode ( FireSystem::SimulationVisualisationMode  visualisationMode)
inline
void em5::FireSystem::setFireSimulationActive ( bool  fireSimulationEnabled)
void em5::FireSystem::setFireSpreadLinesVisualisationMode ( FireSystem::FireSpreadLinesVisualisationMode  visualisationMode)
inline
void em5::FireSystem::setFireSpreadSimulationVisualisationMode ( FireSystem::SimulationVisualisationMode  visualisationMode)
inline
void em5::FireSystem::unregisterFireReceiver ( FireReceiverComponent fireReceiver)

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