Emergency 20 Dokumentation  4.2.0
em5::FireMaterial Class Reference

Fire material class. More...

#include <FireMaterial.h>

Inheritance diagram for em5::FireMaterial:
qsf::Object

Public Member Functions

 FireMaterial (uint32 key)
 Constructor. More...
 
virtual ~FireMaterial ()
 Destructor. More...
 
uint32 getFireMaterialId () const
 Get unique fire material ID. More...
 
void setFireMaterialId (uint32 id)
 Set fire material ID. More...
 
const std::string & getName () const
 Get name of the fire material. More...
 
void setName (const std::string &name)
 Set name of the fire material. More...
 
float getCombustionValue () const
 Get the combustion value, if this value is reached, the fire starts burning. More...
 
void setCombustionValue (float combustionValue)
 Set the combustion value, if this value is reached, the fire starts burning. More...
 
qsf::Time getBurnTime () const
 Get the burn time, the time the entity burns after start fire and no other touching. More...
 
void setBurnTime (qsf::Time burnTime)
 Set the burn time, the time the entity burns after start fire and no other touching. More...
 
float getLifeValue () const
 Get the life value, the amount of energy the entity can take till it is completely destroyed; its greater or equal than the charge time. More...
 
void setLifeValue (float lifeValue)
 Set the life value, the amount of energy the entity can take till it is completly destroyed; must be greater than the charge time. More...
 
float getStartEnergyValue () const
 Get the start energy value, the amount of energy the fire starts with. More...
 
void setStartEnergyValue (float startEnergyValue)
 Set the start energy value, the amount of energy the fire starts with. More...
 
float getMaxEnergyValue () const
 Get the maximum energy a fire can have. More...
 
void setMaxEnergyValue (float maxEnergyValue)
 Set the maximum energy a fire can have. More...
 
qsf::Time getChargeTime () const
 Get the time the fire needs to grow to his maximum energy value. More...
 
void setChargeTime (qsf::Time chargeTime)
 Set the time the fire needs to grow to his maxium energy value. More...
 
float getChargeValue () const
 Get the value the fire grows per second (eg. "5") More...
 
void setChargeValue (float chargeValue)
 Set the value the fire grows per second (eg. "5") More...
 
float getSelfCoolingValue () const
 Get the self cooling value, amount of energy the fire shrinks in case of an extinguished fire. More...
 
void setSelfCoolingValue (float selfCoolingValue)
 Set the self cooling value, amount of energy the fire shrinks in case of an extinguished fire. More...
 
float getFireResistance () const
 Get the fire resistance value, amount of energy is substracted of receiving energy. More...
 
void setFireResistance (float fireResistance)
 Set the fire resistance value, amount of energy is substracted of receiving energy. More...
 
float getBlastForce () const
 Get the blast force value, amount of energy is given to entities in the blast radius in case of explosion. More...
 
void setBlastForce (float blastForce)
 Set the blast force value, amount of energy is given to entities in the blast radius in case of explosion. More...
 
float getBlastRadius () const
 Get the blast radius, entities in the radius receive the blast force value in case of a combustion. More...
 
void setBlastRadius (float blastRadius)
 Set the blast radius, entities in the radius receive the blast force value in case of a combustion. More...
 
bool canExplode () const
 Check whether this material can explode at all. More...
 
float getAmountChargeValue () const
 Get the full amount of energy, the fire would damage the entity (see setLifeValue() for details) in his "heating-phase". More...
 
- Public Member Functions inherited from qsf::Object
virtual ~Object ()
 Destructor. More...
 
const camp::Class & getCampClass () const
 Return the CAMP class. More...
 
int getPropertyIndexById (const StringHash &propertyId) const
 Return the CAMP property index by using the unique class property ID. More...
 
uint32 getPropertyIdByIndex (int index) const
 Return the unique class property ID with the given index. More...
 
std::string getPropertyNameById (const StringHash &propertyId) const
 Return the CAMP property name by using the unique class property ID. More...
 
const camp::Property * getCampPropertyById (const StringHash &propertyId) const
 Return the CAMP property by using the unique class property ID. More...
 
void setPropertyValuesByString (const std::string &values)
 Set CAMP reflection property values by using a given string. More...
 
void setPropertiesToDefaultValues ()
 Set all CAMP reflection system properties to their default values. More...
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void serializeToBoostPTree (boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
bool deserializeFromBoostPTree (const boost::property_tree::ptree &pTree, const camp::Class &campClass, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL)
 
void serializeToBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL) const
 
void deserializeFromBinarySerializer (BinarySerializer &serializer, SerializationMode mode=MODE_MINIMAL, SerializationMethod serializationMethod=SERIALIZE_DIFFERENTIAL, bool setOverrideState=true)
 
virtual camp::Value getPropertyDefaultValue (const StringHash &propertyId) const
 
virtual PropertyOverrideState getPropertyOverrideState (const StringHash &propertyId) const
 
virtual bool setPropertyOverrideState (const StringHash &propertyId, PropertyOverrideState overrideState)
 
virtual void onPreDeserialize ()
 Called right before the object is deserialized using any of the above methods. Default implementation is empty. More...
 
virtual void onPostDeserialize ()
 Called right after the object was deserialized using any of the above methods. Default implementation is empty. More...
 
virtual ScriptgetAssociatedScript () const
 Return the script instance associated with this object instance. More...
 

Static Public Attributes

static const std::string DEFAULT_FIREMATERIAL_NAME
 

Additional Inherited Members

- Public Types inherited from qsf::Object
enum  PropertyOverrideState { PROPERTY_INVALID, PROPERTY_DEFAULT, PROPERTY_OVERRIDE, PROPERTY_REMOVED }
 
enum  SerializationMethod { SERIALIZE_FLAT, SERIALIZE_COMPLETE, SERIALIZE_DIFFERENTIAL, SERIALIZE_IGNORE_UNKNOWN }
 
enum  SerializationMode { MODE_MINIMAL, MODE_COMPATIBLE }
 
- Protected Member Functions inherited from qsf::Object
 Object ()
 Default constructor. More...
 

Detailed Description

Fire material class.

Remarks
A fire material contains detailed information about the behaviour of a specific fire. Its represented by an asset.

An entity can have multiple child entities with fire components. Every fire component has a fire material. All visual effects are part of the fire component of an entity.

Constructor & Destructor Documentation

em5::FireMaterial::FireMaterial ( uint32  key)
inlineexplicit

Constructor.

em5::FireMaterial::~FireMaterial ( )
inlinevirtual

Destructor.

Member Function Documentation

bool em5::FireMaterial::canExplode ( ) const
inline

Check whether this material can explode at all.

float em5::FireMaterial::getAmountChargeValue ( ) const

Get the full amount of energy, the fire would damage the entity (see setLifeValue() for details) in his "heating-phase".

Note
  • This value is smaller or equal to the LifeValue of the entities (because it's only a part of the full burning process)
float em5::FireMaterial::getBlastForce ( ) const
inline

Get the blast force value, amount of energy is given to entities in the blast radius in case of explosion.

float em5::FireMaterial::getBlastRadius ( ) const
inline

Get the blast radius, entities in the radius receive the blast force value in case of a combustion.

qsf::Time em5::FireMaterial::getBurnTime ( ) const
inline

Get the burn time, the time the entity burns after start fire and no other touching.

qsf::Time em5::FireMaterial::getChargeTime ( ) const
inline

Get the time the fire needs to grow to his maximum energy value.

float em5::FireMaterial::getChargeValue ( ) const
inline

Get the value the fire grows per second (eg. "5")

Note
  • The value is not stored inside a member variable, it's calculated from "(mMaxEnergyValue - mStartEnergyValue) / mChargeTime"
float em5::FireMaterial::getCombustionValue ( ) const
inline

Get the combustion value, if this value is reached, the fire starts burning.

uint32 em5::FireMaterial::getFireMaterialId ( ) const
inline

Get unique fire material ID.

float em5::FireMaterial::getFireResistance ( ) const
inline

Get the fire resistance value, amount of energy is substracted of receiving energy.

float em5::FireMaterial::getLifeValue ( ) const

Get the life value, the amount of energy the entity can take till it is completely destroyed; its greater or equal than the charge time.

Note
  • The life value is no member variable, it uses other values for calculating the value
float em5::FireMaterial::getMaxEnergyValue ( ) const
inline

Get the maximum energy a fire can have.

const std::string & em5::FireMaterial::getName ( ) const
inline

Get name of the fire material.

float em5::FireMaterial::getSelfCoolingValue ( ) const
inline

Get the self cooling value, amount of energy the fire shrinks in case of an extinguished fire.

float em5::FireMaterial::getStartEnergyValue ( ) const
inline

Get the start energy value, the amount of energy the fire starts with.

void em5::FireMaterial::setBlastForce ( float  blastForce)
inline

Set the blast force value, amount of energy is given to entities in the blast radius in case of explosion.

void em5::FireMaterial::setBlastRadius ( float  blastRadius)
inline

Set the blast radius, entities in the radius receive the blast force value in case of a combustion.

void em5::FireMaterial::setBurnTime ( qsf::Time  burnTime)
inline

Set the burn time, the time the entity burns after start fire and no other touching.

void em5::FireMaterial::setChargeTime ( qsf::Time  chargeTime)
inline

Set the time the fire needs to grow to his maxium energy value.

void em5::FireMaterial::setChargeValue ( float  chargeValue)
inline

Set the value the fire grows per second (eg. "5")

Note
  • The value is not stored inside a member variable, it's set via the charge time
void em5::FireMaterial::setCombustionValue ( float  combustionValue)
inline

Set the combustion value, if this value is reached, the fire starts burning.

void em5::FireMaterial::setFireMaterialId ( uint32  id)
inline

Set fire material ID.

void em5::FireMaterial::setFireResistance ( float  fireResistance)
inline

Set the fire resistance value, amount of energy is substracted of receiving energy.

void em5::FireMaterial::setLifeValue ( float  lifeValue)

Set the life value, the amount of energy the entity can take till it is completly destroyed; must be greater than the charge time.

Note
  • The life value is no member variable, it changes the life time of the entity
void em5::FireMaterial::setMaxEnergyValue ( float  maxEnergyValue)
inline

Set the maximum energy a fire can have.

void em5::FireMaterial::setName ( const std::string &  name)
inline

Set name of the fire material.

void em5::FireMaterial::setSelfCoolingValue ( float  selfCoolingValue)
inline

Set the self cooling value, amount of energy the fire shrinks in case of an extinguished fire.

void em5::FireMaterial::setStartEnergyValue ( float  startEnergyValue)
inline

Set the start energy value, the amount of energy the fire starts with.

Member Data Documentation

const std::string em5::FireMaterial::DEFAULT_FIREMATERIAL_NAME
static

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