DLA-Fire-Prediction-Thesis 1.0

FuelPoint Class Reference

This class is the constructor class of each point on the fire area. More...

#include <FuelPoint.h>

List of all members.

Public Member Functions

 FuelPoint ()
 default ctor of points
 FuelPoint (ngl::Vector _pointPosition, int _pointStatus)
 ctor of point
ngl::Vector & getPosition ()
 This method will return the position of point.
ngl::Vector & getColour ()
 This method will return the current colour of point.
void makeToBeflammable (float _fuel)
 This method will make the point to be flammable.
void makeToBeNonflammable ()
 This method will make the point to be non-flammable.
void setFire ()
 This method will change the status of point to be burning.
bool isFlammable ()
 This method will return the current status of each point that is flammable or not.
bool isBurning ()
 This method will return the current status of each point that is burning or not.
float getCurrentFuelValue ()
 This method will return the current fuel value of point.
void subtractFuel (float _decreaseAmount)
 This method will decrease the fuel amount of point.
void changeColour (ngl::Vector _assignedColour)
 This method will change the colour of point to the assigned colour value.
void setFuelAmount (float _newFuel)
 This method will set the fuel amount of each point to the assigned value.
float getMoisture ()
 This method will return the moisture value of point.
void decreaseMoisture (float _decreasedAmount)
 This method will decrease moisture value.
void setPosition (ngl::Vector _newPosition)
 This method will set the new position for the point.
float getCircleSize ()
 This method will return the circle size of mountain point.
float getCircleHeight ()
 This method will return the height of mountain point.
void setCircleHeight (float m_circleHeight)
 This method will set the new height of mountain point.
bool isMointain ()
 This method will return type of point that is a mountain or not.
void setToBeMountain (float _circleSize, float _circleHeight)
 This method will set the point to be mountain point with assigned circle size and height.
void setToBeBigFuel (float _fuelAmount)
 This method will set the point to be the point of fuel object.
bool isFuel ()
 This method will return type of point that is located in fuel object area or not.
void setToBeNonBigFuel ()
 This method will set the point to be regular point that is not located in the area of fuel object.
void setBurningTime (float _burningTime)
 This method will set the burning time of the point. It would explain how long the point would be burnt down.
float getBurningTime ()
 This method will return the current burning time of point.
float getEmittedHeat ()
 This method will return the heat of the point that is received from burning fire path.
void setEmittedHeat (float _heat)
 This method will set the heat that received from fire path.
void setNewMoisture (float _moistureAmount)
 This method will set the moisture of point.
void setGeneration (int _generationNumber)
 This method will assign the genearation number of point, referred to the created fire path.
int getGeneration ()
 This method will return the number of generation of point.
void setToOrigin ()
 This method will set the point to be origin point.
void setToRegular ()
 This method will set the point to be regular point, no origin.
bool isOrigin ()
 This method will return type of point that is an origin point or not.
int getGridIndex ()
 This method will return index of grid point from the specific point list.
void setGridIndex (int _gridIndex)
 This method will set the index number of grid point.
int getBurningFormNumber ()
 This method will return form number of fire path.
void setBurningFormNumber (int _formNumber)
 This method will set the form number of fire path that the point is belong to.
void setToBeBurningDown ()
 This method will set the status of point that is burning down.
bool isBurningDown ()
 This method will return the burnt status of point.
void setDrawingFlag (bool _drawFlag)
bool canDraw ()

Private Attributes

bool m_isFlammable
 status of point that is flammable or not
bool m_isBurning
 status of point that is burning or not
ngl::Vector m_position
 point position
float m_fuel
 fuel loading of point
float m_moisture
 fuel moisture
ngl::Vector m_currentColour
 colour vector of point
float m_pointCircleSize
 size of mountain point
float m_pointCircleHeight
 height of mountain point
bool m_isMountainPoint
 flag to identify the mountain point
bool m_isOrigin
 flag to identify the origin point
bool m_isFuel
 status of point that is located in fuel object area or not
float m_burningTimeAtThePoint
 the current burning time
float m_emittedHeat
 the current heat
int m_generation
 the number of generation
int m_gridIndex
 the index number of grid point
int m_burningFormNumber
 the form number of fire path
bool m_isBurningDown
 the burnt status
bool m_draw

Detailed Description

This class is the constructor class of each point on the fire area.

Definition at line 25 of file FuelPoint.h.


Constructor & Destructor Documentation

FuelPoint::FuelPoint ( )

default ctor of points

FuelPoint::FuelPoint ( ngl::Vector  _pointPosition,
int  _pointStatus 
)

ctor of point

Parameters:
_pointPositionis the position of each point on the fire area grid,
_pointStatusis the status of point that is flammable or not

Definition at line 14 of file FuelPoint.cpp.

References m_burningFormNumber, m_burningTimeAtThePoint, m_currentColour, m_draw, m_emittedHeat, m_fuel, m_generation, m_gridIndex, m_isBurning, m_isBurningDown, m_isFlammable, m_isFuel, m_isMountainPoint, m_isOrigin, m_moisture, m_pointCircleHeight, m_pointCircleSize, and m_position.

{
    m_position = _pointPosition;

    if(_pointStatus==1)             // flammable point starts with 100 fuel power
    {
        // ----- flammable point
        m_isFlammable = true;
        m_isBurning = false;
        m_fuel = 100.0;
        // set initial colour to green, depends on the fuel amount
        float m_fuelColour = m_fuel/100;
        m_currentColour = ngl::Vector(0.0f,m_fuelColour,0.0f);

        m_moisture = 0.1;
        m_isMountainPoint = false;
        m_isOrigin = false;
    }
    else                            // non-flammable starts with no fuel
    {
        // ----- non-flammable point
        m_isFlammable = false;
        m_isBurning = false;
        m_fuel = 0.0;
        // set initial colour
        m_currentColour = ngl::Vector(0.0f,0.0f,1.0f);

        m_moisture = 0.8;
        m_isMountainPoint = false;
        m_isOrigin = false;
    }

    m_pointCircleSize = 1.0f;
    m_pointCircleHeight = 1.0f;
    m_isFuel = false;

    m_burningTimeAtThePoint = 10.0;

    m_emittedHeat = 0.0;

    m_generation = 0;

    m_gridIndex = 0;
    m_burningFormNumber = -10;   // negative 10 means it has not been burnt yet
    m_isBurningDown = false;
    m_draw = true;
}

Member Function Documentation

bool FuelPoint::canDraw ( )

Definition at line 66 of file FuelPoint.cpp.

References m_draw.

{
    return m_draw;
}
void FuelPoint::changeColour ( ngl::Vector  _assignedColour)

This method will change the colour of point to the assigned colour value.

Parameters:
_assignedColouris the new colour that would assign to the point

Definition at line 223 of file FuelPoint.cpp.

References m_currentColour.

{
    m_currentColour = _assignedColour;
}

Here is the caller graph for this function:

void FuelPoint::decreaseMoisture ( float  _decreasedAmount)

This method will decrease moisture value.

Parameters:
_decreasedAmountis the amount that will be decreased

Definition at line 327 of file FuelPoint.cpp.

References m_moisture.

{
    m_moisture -= _decreasedAmount;
}
int FuelPoint::getBurningFormNumber ( )

This method will return form number of fire path.

Returns:
m_burnginFormNumber the dla form number

Definition at line 90 of file FuelPoint.cpp.

References m_burningFormNumber.

{
    return m_burningFormNumber;
}

Here is the caller graph for this function:

float FuelPoint::getBurningTime ( )

This method will return the current burning time of point.

Returns:
m_burningTime the current burning time

Definition at line 168 of file FuelPoint.cpp.

References m_burningTimeAtThePoint.

Here is the caller graph for this function:

float FuelPoint::getCircleHeight ( )

This method will return the height of mountain point.

Returns:
m_mountainHeight the height of mountain

Definition at line 335 of file FuelPoint.cpp.

References m_pointCircleHeight.

{
    return m_pointCircleHeight;
}

Here is the caller graph for this function:

float FuelPoint::getCircleSize ( )

This method will return the circle size of mountain point.

Returns:
m_mountainCircleSize the radius of mountain

Definition at line 341 of file FuelPoint.cpp.

References m_pointCircleSize.

{
    return m_pointCircleSize;
}

Here is the caller graph for this function:

ngl::Vector & FuelPoint::getColour ( )

This method will return the current colour of point.

Returns:
m_currentColour which is the colour vector of point

Definition at line 217 of file FuelPoint.cpp.

References m_currentColour.

{
    return m_currentColour;
}

Here is the caller graph for this function:

float FuelPoint::getCurrentFuelValue ( )

This method will return the current fuel value of point.

Returns:
m_fuel variable to tell how much fuel does the point has left

Definition at line 307 of file FuelPoint.cpp.

References m_fuel.

{
    return m_fuel;
}

Here is the caller graph for this function:

float FuelPoint::getEmittedHeat ( )

This method will return the heat of the point that is received from burning fire path.

Returns:
m_emittedHeat the current heat

Definition at line 174 of file FuelPoint.cpp.

References m_emittedHeat.

{
    return m_emittedHeat;
}

Here is the caller graph for this function:

int FuelPoint::getGeneration ( )

This method will return the number of generation of point.

Returns:
m_generation is the generation number

Definition at line 128 of file FuelPoint.cpp.

References m_generation.

{
    return m_generation;
}

Here is the caller graph for this function:

int FuelPoint::getGridIndex ( )

This method will return index of grid point from the specific point list.

Returns:
m_gridIndex the index of grid point

Definition at line 102 of file FuelPoint.cpp.

References m_gridIndex.

{
    return m_gridIndex;
}

Here is the caller graph for this function:

float FuelPoint::getMoisture ( )

This method will return the moisture value of point.

Returns:
m_moisture the current moisture value of point

Definition at line 313 of file FuelPoint.cpp.

References m_moisture.

{
    return m_moisture;
}

Here is the caller graph for this function:

ngl::Vector & FuelPoint::getPosition ( )

This method will return the position of point.

Returns:
m_position that is the point position of point

Definition at line 211 of file FuelPoint.cpp.

References m_position.

{
    return m_position;
}

Here is the caller graph for this function:

bool FuelPoint::isBurning ( )

This method will return the current status of each point that is burning or not.

Returns:
m_isBurning variable to identify that the point is burning or not

Definition at line 301 of file FuelPoint.cpp.

References m_isBurning.

{
    return m_isBurning;
}

Here is the caller graph for this function:

bool FuelPoint::isBurningDown ( )

This method will return the burnt status of point.

Parameters:
m_isBurningDownthe burnt status

Definition at line 78 of file FuelPoint.cpp.

References m_isBurningDown.

{
    return m_isBurningDown;
}

Here is the caller graph for this function:

bool FuelPoint::isFlammable ( )

This method will return the current status of each point that is flammable or not.

Returns:
m_isFlammable variable to identify that the point is flamable or not

Definition at line 295 of file FuelPoint.cpp.

References m_isFlammable.

{
    return m_isFlammable;
}

Here is the caller graph for this function:

bool FuelPoint::isFuel ( )

This method will return type of point that is located in fuel object area or not.

Returns:
m_isFuel the status of point that is the fuel object point or not

Definition at line 143 of file FuelPoint.cpp.

References m_isFuel.

{
    return m_isFuel;
}

Here is the caller graph for this function:

bool FuelPoint::isMointain ( )

This method will return type of point that is a mountain or not.

Returns:
m_isMountain the status of point that is the members of mountain or not

Definition at line 114 of file FuelPoint.cpp.

References m_isMountainPoint.

{
    return m_isMountainPoint;
}

Here is the caller graph for this function:

bool FuelPoint::isOrigin ( )

This method will return type of point that is an origin point or not.

Returns:
m_origin the flag telling the status of point that is origin point or not

Definition at line 367 of file FuelPoint.cpp.

References m_isOrigin.

{
    return m_isOrigin;
}

Here is the caller graph for this function:

void FuelPoint::makeToBeflammable ( float  _fuel)

This method will make the point to be flammable.

Parameters:
_fuelis the fuel power that would assign to each point

Definition at line 242 of file FuelPoint.cpp.

References m_currentColour, m_fuel, and m_isFlammable.

{
    m_isFlammable = true;
    m_fuel = _fuel;
    float m_fuelColour = m_fuel/100;
    // set initial colour to green, depends on the adding fuel
    m_currentColour = ngl::Vector(0.0f,m_fuelColour,0.0f);
}

Here is the caller graph for this function:

void FuelPoint::makeToBeNonflammable ( )

This method will make the point to be non-flammable.

Definition at line 231 of file FuelPoint.cpp.

References m_currentColour, m_fuel, m_isFlammable, and m_moisture.

{
    m_isFlammable = false;
    m_fuel = 0.0;
    // set initial colour to blue
    m_currentColour = ngl::Vector(0.0f,0.0f,1.0f);

    m_moisture = 1.0;
}

Here is the caller graph for this function:

void FuelPoint::setBurningFormNumber ( int  _formNumber)

This method will set the form number of fire path that the point is belong to.

Parameters:
_formNumberthe dla form number

Definition at line 96 of file FuelPoint.cpp.

References m_burningFormNumber.

{
    m_burningFormNumber = _formNumber;
}

Here is the caller graph for this function:

void FuelPoint::setBurningTime ( float  _burningTime)

This method will set the burning time of the point. It would explain how long the point would be burnt down.

Parameters:
_burningTimethe assigned burning time

Definition at line 155 of file FuelPoint.cpp.

References m_burningTimeAtThePoint.

{
    if(_burningTime<0)
        _burningTime = 1;
    else if(_burningTime>15)
        _burningTime = 15;

    m_burningTimeAtThePoint = _burningTime;
}

Here is the caller graph for this function:

void FuelPoint::setCircleHeight ( float  m_circleHeight)

This method will set the new height of mountain point.

Parameters:
m_circleHeightis the new assigned height of the mountain point

Definition at line 347 of file FuelPoint.cpp.

References m_pointCircleHeight.

{
    m_pointCircleHeight = m_circleHeight;
}

Here is the caller graph for this function:

void FuelPoint::setDrawingFlag ( bool  _drawFlag)

Definition at line 72 of file FuelPoint.cpp.

References m_draw.

{
    m_draw = _drawFlag;
}
void FuelPoint::setEmittedHeat ( float  _heat)

This method will set the heat that received from fire path.

Parameters:
_heatthe assigned heat amount

Definition at line 180 of file FuelPoint.cpp.

References m_currentColour, and m_emittedHeat.

{
    m_emittedHeat = _heat;

    // set the colour along the heat
    m_currentColour = ngl::Vector(_heat/1000, (1000-_heat)/1000 , 0.0);

}

Here is the caller graph for this function:

void FuelPoint::setFire ( )

This method will change the status of point to be burning.

Definition at line 254 of file FuelPoint.cpp.

References m_currentColour, m_fuel, and m_isBurning.

{
    m_isBurning = true;
    float m_fuelColour = m_fuel/100;
    // set colour of the burning point to red, depends on fuel amount
    m_currentColour = ngl::Vector(m_fuelColour,0.0f,0.0f);
}

Here is the caller graph for this function:

void FuelPoint::setFuelAmount ( float  _newFuel)

This method will set the fuel amount of each point to the assigned value.

Parameters:
_newFuelis the new amount of fuel

Definition at line 263 of file FuelPoint.cpp.

References m_currentColour, and m_fuel.

{
    m_fuel = _newFuel;
    float m_fuelColour = m_fuel/100;
    // set colour of the burning point to red, depends on fuel amount
    m_currentColour = ngl::Vector(0.0f,m_fuelColour,0.0f);
}

Here is the caller graph for this function:

void FuelPoint::setGeneration ( int  _generationNumber)

This method will assign the genearation number of point, referred to the created fire path.

Parameters:
_generationNumberis the generation number

Definition at line 120 of file FuelPoint.cpp.

References m_generation.

{
    m_generation = _generationNumber;
}

Here is the caller graph for this function:

void FuelPoint::setGridIndex ( int  _gridIndex)

This method will set the index number of grid point.

Parameters:
_gridIndexthe new index of grid point

Definition at line 108 of file FuelPoint.cpp.

References m_gridIndex.

{
    m_gridIndex = _gridIndex;
}

Here is the caller graph for this function:

void FuelPoint::setNewMoisture ( float  _moistureAmount)

This method will set the moisture of point.

Parameters:
_moistureAmountis the new moisture amount

Definition at line 319 of file FuelPoint.cpp.

References m_moisture.

{
    m_moisture = _moistureAmount;
}

Here is the caller graph for this function:

void FuelPoint::setPosition ( ngl::Vector  _newPosition)

This method will set the new position for the point.

Parameters:
_newPositionis the new assigned position of the point

Definition at line 203 of file FuelPoint.cpp.

References m_position.

{
    m_position = _newPosition;
}

Here is the caller graph for this function:

void FuelPoint::setToBeBigFuel ( float  _fuelAmount)

This method will set the point to be the point of fuel object.

Parameters:
_fuelAmountthe fuel amount of object that the point is located at

Definition at line 134 of file FuelPoint.cpp.

References m_fuel, and m_isFuel.

{
    m_fuel = _fuelAmount;
    m_isFuel = true;
}

Here is the caller graph for this function:

void FuelPoint::setToBeBurningDown ( )

This method will set the status of point that is burning down.

Definition at line 84 of file FuelPoint.cpp.

References m_isBurningDown.

{
    m_isBurningDown = true;
}

Here is the caller graph for this function:

void FuelPoint::setToBeMountain ( float  _circleSize,
float  _circleHeight 
)

This method will set the point to be mountain point with assigned circle size and height.

Parameters:
_circleSizeis the circle size of mountain
_circleHeightis the height of mountain

Definition at line 192 of file FuelPoint.cpp.

References m_isMountainPoint, m_pointCircleHeight, and m_pointCircleSize.

{
    m_isMountainPoint = true;
    m_pointCircleSize = _circleSize;
    m_pointCircleHeight = _circleHeight;
}

Here is the caller graph for this function:

void FuelPoint::setToBeNonBigFuel ( )

This method will set the point to be regular point that is not located in the area of fuel object.

Definition at line 149 of file FuelPoint.cpp.

References m_isFuel.

{
    m_isFuel = false;
}

Here is the caller graph for this function:

void FuelPoint::setToOrigin ( )

This method will set the point to be origin point.

Definition at line 355 of file FuelPoint.cpp.

References m_isOrigin.

{
    m_isOrigin = true;
}

Here is the caller graph for this function:

void FuelPoint::setToRegular ( )

This method will set the point to be regular point, no origin.

Definition at line 361 of file FuelPoint.cpp.

References m_isOrigin.

{
    m_isOrigin = false;
}

Here is the caller graph for this function:

void FuelPoint::subtractFuel ( float  _decreaseAmount)

This method will decrease the fuel amount of point.

Parameters:
_decreaseAmountis the amount of fuel that would be decrease each time this method is called

Definition at line 275 of file FuelPoint.cpp.

References m_fuel.

{
    if(m_fuel>0.0)
    {
        m_fuel = m_fuel-_decreaseAmount;

        //float m_fuelColour = m_fuel/100;
        // set colour of the burning point to red, depends on fuel amount
        //m_currentColour = ngl::Vector(m_fuelColour,0.0f,0.0f);
    }
    else
    {
        m_fuel = 0.0;
    }

}

Here is the caller graph for this function:


Member Data Documentation

the form number of fire path

Definition at line 366 of file FuelPoint.h.

the current burning time

Definition at line 350 of file FuelPoint.h.

ngl::Vector FuelPoint::m_currentColour [private]

colour vector of point

Definition at line 324 of file FuelPoint.h.

bool FuelPoint::m_draw [private]

Definition at line 372 of file FuelPoint.h.

float FuelPoint::m_emittedHeat [private]

the current heat

Definition at line 354 of file FuelPoint.h.

float FuelPoint::m_fuel [private]

fuel loading of point

Definition at line 314 of file FuelPoint.h.

int FuelPoint::m_generation [private]

the number of generation

Definition at line 358 of file FuelPoint.h.

int FuelPoint::m_gridIndex [private]

the index number of grid point

Definition at line 362 of file FuelPoint.h.

bool FuelPoint::m_isBurning [private]

status of point that is burning or not

Definition at line 304 of file FuelPoint.h.

the burnt status

Definition at line 370 of file FuelPoint.h.

bool FuelPoint::m_isFlammable [private]

status of point that is flammable or not

Definition at line 299 of file FuelPoint.h.

bool FuelPoint::m_isFuel [private]

status of point that is located in fuel object area or not

Definition at line 346 of file FuelPoint.h.

flag to identify the mountain point

Definition at line 337 of file FuelPoint.h.

bool FuelPoint::m_isOrigin [private]

flag to identify the origin point

Definition at line 342 of file FuelPoint.h.

float FuelPoint::m_moisture [private]

fuel moisture

Definition at line 319 of file FuelPoint.h.

height of mountain point

Definition at line 333 of file FuelPoint.h.

size of mountain point

Definition at line 329 of file FuelPoint.h.

ngl::Vector FuelPoint::m_position [private]

point position

Definition at line 309 of file FuelPoint.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Enumerator