![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
#include <Osmia.h>
Public Member Functions | |
OsmiaForageMaskDetailed (int a_step, int a_maxdistance) | |
Public Attributes | |
vector< APoint > | m_mask |
Holds 20 distances and 8 directions with offsets to x,y. More... | |
int | m_step |
int | m_maxdistance |
OsmiaForageMaskDetailed::OsmiaForageMaskDetailed | ( | int | a_step, |
int | a_maxdistance | ||
) |
This is a more detailed forage mask, the idea being that we start to work from the centre out reading the values under m_mask. m_mask just holds offsets to the centre. The mask works as spokes in 8 directions each step distance apart up to the maxdistance. This allows weighting towards the current location.
References m_mask, m_maxdistance, and m_step.
vector<APoint> OsmiaForageMaskDetailed::m_mask |
Holds 20 distances and 8 directions with offsets to x,y.
This is a way to speed up searches from a centre point. The predefined mask can be iterated through without having to calculate offsets. It could also be modified to alter distances between locations if needed by altering the step size.
Referenced by OsmiaForageMaskDetailed().
int OsmiaForageMaskDetailed::m_maxdistance |
Referenced by OsmiaForageMaskDetailed().
int OsmiaForageMaskDetailed::m_step |
Referenced by OsmiaForageMaskDetailed().