44 #ifndef __VECTOR_FIELD_H__
45 #define __VECTOR_FIELD_H__
53 #include "mengeCommon.h"
85 virtual const std::string &
getLabel()
const {
return LABEL; }
98 void getCell(
const Vector2 & pos,
int & r,
int & c );
109 Vector2 getFieldValue(
int row,
int col )
const;
147 static Resource * load(
const std::string & fileName );
161 Vector2 getMaximumPoint()
const;
239 void setDimensions(
float width,
float height );
244 void initDataArray();
249 void freeDataArray();
267 #endif // __VECTOR_FIELD_H__
The core namespace. All elements of Menge are contained in this namespace.
Definition: AgentGenerator.cpp:43
Logger & operator<<(Logger &out, const BFSM::PropertyOperand op)
Friend function for printing string versions of the PropertyOperand enum.
Definition: FSMEnumeration.cpp:43
int getColCount() const
Reports the number of columns in the field.
Definition: VectorField.h:182
Vector2 _minPoint
The minimum extent of the vector field.
Definition: VectorField.h:211
Basic class for managing on-disk resources.
Definition: Resource.h:98
static const std::string LABEL
The unique label for this data type to be used with resource management.
Definition: VectorField.h:205
Vector2 getMinimumPoint() const
Reports the minimum extent of the field.
Definition: VectorField.h:154
int getRowCount() const
Reports the number of rows in the field.
Definition: VectorField.h:175
A base exception for resources to throw.
Definition: Resource.h:58
An html logger - writes messages to a formatted html file.
Definition: Logger.h:59
virtual const std::string & getLabel() const
Returns a unique resource label to be used to identify different resource types which use the same un...
Definition: VectorField.h:85
VectorFieldPtr loadVectorField(const std::string &fileName)
Loads the vector field of the given name.
Definition: VectorField.cpp:254
Vector2 ** _data
The 2D array of vector data for each cell.
Definition: VectorField.h:226
float _cellSize
Size of the grid cell.
Definition: VectorField.h:221
float getCellSize() const
Reports the number of rows in the field.
Definition: VectorField.h:189
The basic class for all on-disk resources.
ResourcePtr< VectorField > VectorFieldPtr
forward declaration of VectorField resource pointer. see VectorField.h for more details ...
Definition: VelCompVF.h:59
A simple 2D vector field.
Definition: VectorField.h:63