Emergency 20 Dokumentation  4.2.0
em5::FireSpreadCalculation Class Reference

Fire spread calculation helper. More...

#include <FireSpreadCalculation.h>

Classes

struct  DebugRequestData
 

Public Types

typedef firesimulation::ComponentData ComponentData
 

Public Member Functions

 FireSpreadCalculation ()
 Default constructor. More...
 
std::vector< ComponentData > & getCalculationResult ()
 Returns the result of the last calculation. More...
 
void prepareNextCalculationRun ()
 Prepare for the next calculation run, remove old component data. More...
 
void startNextCalculationRun (float secondsPassed)
 Start the next calculation run. More...
 
ComponentDataaddNewComponentData ()
 Add a new uninitialized component data element, and return a reference to it. More...
 
void stopCalculation ()
 Stops the calculation thread (the thread has ended after this call) More...
 
void invalidateComponent (FireReceiverComponent &component)
 Invalidate a component for fire spread calculation. More...
 
const std::vector< DebugRequestData > & getDebugDrawRequests () const
 Returns a list of DebugRequestData items for displaying fire receiver debug draw info. More...
 
void setDebugActive (bool isActive)
 Setter for setting the information of debug request data should be generated for fire receiver lines. More...
 
int64 getCalculationTime () const
 Returns the time (in microseconds) how much time the thread spent to do the calculation. More...
 
const qsf::Time getTimePassed () const
 Returns the time passed value which was used for the calculation (for time based interpolation) More...
 

Detailed Description

Fire spread calculation helper.

Remarks
This class uses a thread for the calculation

Member Typedef Documentation

Constructor & Destructor Documentation

em5::FireSpreadCalculation::FireSpreadCalculation ( )

Default constructor.

Member Function Documentation

ComponentData& em5::FireSpreadCalculation::addNewComponentData ( )

Add a new uninitialized component data element, and return a reference to it.

std::vector<ComponentData>& em5::FireSpreadCalculation::getCalculationResult ( )

Returns the result of the last calculation.

Remarks
This method waits until the calculation thread has completed its computation
int64 em5::FireSpreadCalculation::getCalculationTime ( ) const
inline

Returns the time (in microseconds) how much time the thread spent to do the calculation.

const std::vector< FireSpreadCalculation::DebugRequestData > & em5::FireSpreadCalculation::getDebugDrawRequests ( ) const
inline

Returns a list of DebugRequestData items for displaying fire receiver debug draw info.

const qsf::Time em5::FireSpreadCalculation::getTimePassed ( ) const
inline

Returns the time passed value which was used for the calculation (for time based interpolation)

void em5::FireSpreadCalculation::invalidateComponent ( FireReceiverComponent component)

Invalidate a component for fire spread calculation.

void em5::FireSpreadCalculation::prepareNextCalculationRun ( )

Prepare for the next calculation run, remove old component data.

void em5::FireSpreadCalculation::setDebugActive ( bool  isActive)
inline

Setter for setting the information of debug request data should be generated for fire receiver lines.

void em5::FireSpreadCalculation::startNextCalculationRun ( float  secondsPassed)

Start the next calculation run.

void em5::FireSpreadCalculation::stopCalculation ( )

Stops the calculation thread (the thread has ended after this call)


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