WeatherArea Class Reference

Author:
Kevin Hirschmann
More...

#include <weatherarea.h>

List of all members.

Public Member Functions

 WeatherArea (GameMap *map, int xCenter, int yCenter, int width, int height, int duration, FalloutType fType, unsigned int seedValue, bool clustered=true)
 WeatherArea (GameMap *map, int xCenter, int yCenter, int radius)
 WeatherArea (GameMap *map)
 ~WeatherArea ()
GameMapgetMap () const
Vector2D getWindVector () const
void updateMovementVector (unsigned int speed, Direction windDirection, double ratio)
void setFalloutType (FalloutType fallout)
FalloutType getFalloutType () const
FalloutType getFalloutType (int value) const
int getWidth () const
int getHeight () const
float getHorizontalWindAccu () const
float getVerticalWindAccu () const
MapCoordinate getCenterPos () const
const WeatherFieldgetCenterField () const
int getDuration () const
void setDuration (int duration)
void update (WeatherSystem *wSystem, FieldSet &processedFields)
void placeArea ()
void removeArea (FieldSet &processedFields)
unsigned int createRandomValue (int limit)
void write (tnstream &outputStream) const
void read (tnstream &inputStream)


Detailed Description

Author:
Kevin Hirschmann

Definition at line 132 of file weatherarea.h.


Constructor & Destructor Documentation

WeatherArea::WeatherArea ( GameMap map,
int  xCenter,
int  yCenter,
int  width,
int  height,
int  duration,
FalloutType  fType,
unsigned int  seedValue,
bool  clustered = true 
)

Definition at line 55 of file weatherarea.cpp.

References MapCoordinate::x, and MapCoordinate::y.

WeatherArea::WeatherArea ( GameMap map,
int  xCenter,
int  yCenter,
int  radius 
)

Definition at line 69 of file weatherarea.cpp.

WeatherArea::WeatherArea ( GameMap map  ) 

Definition at line 66 of file weatherarea.cpp.

WeatherArea::~WeatherArea (  ) 

Definition at line 71 of file weatherarea.cpp.


Member Function Documentation

GameMap * WeatherArea::getMap (  )  const [inline]

Definition at line 99 of file weatherarea.cpp.

Referenced by WeatherField::update(), and WeatherField::WeatherField().

Vector2D WeatherArea::getWindVector (  )  const

Definition at line 231 of file weatherarea.cpp.

void WeatherArea::updateMovementVector ( unsigned int  speed,
Direction  windDirection,
double  ratio 
)

Definition at line 131 of file weatherarea.cpp.

References N, NE, NW, S, SE, and SW.

void WeatherArea::setFalloutType ( FalloutType  fallout  ) 

Definition at line 104 of file weatherarea.cpp.

FalloutType WeatherArea::getFalloutType (  )  const

Definition at line 235 of file weatherarea.cpp.

Referenced by WeatherAreaInformation::getInformation(), Weathercast::paintWeatherArea(), and WeatherField::update().

FalloutType WeatherArea::getFalloutType ( int  value  )  const

Definition at line 108 of file weatherarea.cpp.

References DRY, and LSNOW.

int WeatherArea::getWidth (  )  const

Definition at line 126 of file weatherarea.cpp.

int WeatherArea::getHeight (  )  const

Definition at line 122 of file weatherarea.cpp.

float WeatherArea::getHorizontalWindAccu (  )  const

Definition at line 266 of file weatherarea.cpp.

float WeatherArea::getVerticalWindAccu (  )  const

Definition at line 270 of file weatherarea.cpp.

MapCoordinate WeatherArea::getCenterPos (  )  const [inline]

Definition at line 183 of file weatherarea.h.

Referenced by WeatherAreaInformation::getInformation(), and Weathercast::paintWeatherArea().

const WeatherField* WeatherArea::getCenterField (  )  const [inline]

Definition at line 187 of file weatherarea.h.

int WeatherArea::getDuration (  )  const

Definition at line 258 of file weatherarea.cpp.

void WeatherArea::setDuration ( int  duration  ) 

Definition at line 262 of file weatherarea.cpp.

void WeatherArea::update ( WeatherSystem wSystem,
FieldSet processedFields 
)

Definition at line 162 of file weatherarea.cpp.

References Vector2D::isZeroVector(), and MapCoordinate::move().

void WeatherArea::placeArea (  ) 

Definition at line 239 of file weatherarea.cpp.

void WeatherArea::removeArea ( FieldSet processedFields  ) 

Definition at line 249 of file weatherarea.cpp.

unsigned int WeatherArea::createRandomValue ( int  limit  ) 

Definition at line 275 of file weatherarea.cpp.

void WeatherArea::write ( tnstream outputStream  )  const

Definition at line 183 of file weatherarea.cpp.

References Vector2D::getXComponent(), Vector2D::getYComponent(), tnstream::writeFloat(), tnstream::writeInt(), MapCoordinate::x, and MapCoordinate::y.

void WeatherArea::read ( tnstream inputStream  ) 

Definition at line 203 of file weatherarea.cpp.

References WeatherField::read(), tnstream::readFloat(), tnstream::readInt(), MapCoordinate::x, and MapCoordinate::y.

Referenced by WeatherSystem::read().


The documentation for this class was generated from the following files:
Generated on Mon May 21 01:48:08 2012 for Advanced Strategic Command by  doxygen 1.5.1