Nimbus  0.2
A game... with arrows... which should be clouds
 All Classes Functions Variables Enumerations Enumerator
Nimbus::WindMap Class Reference

#include <WindMap.h>

Collaboration diagram for Nimbus::WindMap:

Classes

class  ArrowCatcher
 

Public Member Functions

 WindMap (Ogre::Real worldSize, Ogre::Real resolution, Ogre::Vector2 offset, Ogre::Real minimumCurrentLength)
 
void update (void)
 
void addWindCurrent (WindCurrent *windCurrent)
 
void removeWindCurrent (WindCurrent *windCurrent)
 
Ogre::Vector2 getWindVector (Ogre::Real x, Ogre::Real y)
 
Ogre::Vector2 getWindVector (Ogre::Vector2 position)
 
Ogre::Vector2 getAverageWindVector (Ogre::Real topLeftx, Ogre::Real topLefty, Ogre::Real botRightx, Ogre::Real botRighty)
 
Ogre::Vector2 getAverageWindVector (Ogre::Vector2 topLeft, Ogre::Vector2 botRight)
 
std::list< WindCurrent * > * getWindCurrents ()
 
Ogre::Vector2 getAlphaVector ()
 
Ogre::Vector2 getOffset ()
 

Protected Attributes

Nimbus::WindMap::ArrowCatchermArrowCatcher
 

Detailed Description

Stores all information relating to wind movement Contains an VectorRow Contains an list of WindCurrents

Constructor & Destructor Documentation

WindMap::WindMap ( Ogre::Real  worldSize,
Ogre::Real  resolution,
Ogre::Vector2  offset,
Ogre::Real  minimumCurrentLength 
)

Creates a basic wind map.

Parameters
worldSizeThe size of the world in world distance. Right now assumes everything to be square... could change
resolutionThe resolution of the vector map in terms of world coordinates. This value is the world distance between each wind vector in the vector map.
offsetThe offset to the center of the map.
minimumCurrentLengthThe minimum length of a current accepted by the map.

Here is the call graph for this function:

Member Function Documentation

void WindMap::addWindCurrent ( WindCurrent windCurrent)

Adds a wind current to the wind current list. Any wind current shorter than mMinimumCurrentLength will not be added and an entry will be written to the log.

Parameters
windCurrentA pointer to the wind current which should be added to the wind map.

Here is the call graph for this function:

Ogre::Vector2 Nimbus::WindMap::getAlphaVector ( )
inline

Unexpectedly gets the alpha vector.

Returns
A vector, that's the alpha vector. I bet you weren't expecting that...
Ogre::Vector2 WindMap::getAverageWindVector ( Ogre::Real  topLeftx,
Ogre::Real  topLefty,
Ogre::Real  botRightx,
Ogre::Real  botRighty 
)

Gets the average wind vector in the given area of map coordinates.

Parameters
topLeftxThe top left x coordinate in map coordinates
topLeftyThe top left y coordinate in map coordinates
botRightxThe bottom right x coordinate in map coordinates
botRightyThe bottom right y coordinate in map coordinates

Here is the call graph for this function:

Ogre::Vector2 WindMap::getAverageWindVector ( Ogre::Vector2  topLeft,
Ogre::Vector2  botRight 
)

Gets the average wind vector in the given area of map coordinates.

Parameters
topLeftThe top left corner of the area in map coordinates
botRightThe bottom right corner of the area in map coordinates

Here is the call graph for this function:

Ogre::Vector2 Nimbus::WindMap::getOffset ( )
inline

Gets the offset of the wind map to the center of the wind map

Returns
A Vector2 pointing to the center of the wind map
std::list< WindCurrent * > * WindMap::getWindCurrents ( )

Gets the current list of wind currents.

Ogre::Vector2 WindMap::getWindVector ( Ogre::Real  x,
Ogre::Real  y 
)

Gets the wind vector at the given map coordinates

Parameters
xThe x coordinate in map coordinates of the wind vector to retrieve.
yThe y coordinate in map coordinates of the wind vector to retrieve.

Here is the call graph for this function:

Here is the caller graph for this function:

Ogre::Vector2 WindMap::getWindVector ( Ogre::Vector2  position)

Gets the wind vector at the given map coordinates.

Parameters
positionThe x and y coordinates in map coordinates of the wind vector to retrieve.

Here is the call graph for this function:

void WindMap::removeWindCurrent ( WindCurrent windCurrent)

Removes a wind current from the current wind current list

Parameters
windCurrentA pointer to the wind current which should be deleted from the wind map.
void WindMap::update ( void  )

Recalculates the vector map based on the current list of wind currents.

Here is the call graph for this function:


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