|
MFMv2.0.10
Movable Feast Machine Simulator 2.0.10
|
#include <MDist.h>
Public Member Functions | |
| void | FillRandomSingleDir (SPoint &pt, Random &random) const |
| u32 | GetTableSize (u32 maxRadius) const |
| u32 | GetFirstIndex (const u32 radius) const |
| u32 | GetLastIndex (const u32 radius) const |
| const SPoint & | GetPoint (const u32 index) const |
| s32 | FromPoint (const Point< s32 > &offset, u32 radius) const |
| void | FillFromBits (SPoint &pt, u8 bits, u32 maxRadius) |
Static Public Member Functions | |
| static MDist< R > & | get () |
Static Public Attributes | |
| static const u32 | EVENT_WINDOW_DIAMETER = R*2+1 |
A singleton class consisting of many utilities used for calculating Manhattan Distances.
| void MFM::MDist< R >::FillRandomSingleDir | ( | SPoint & | pt, |
| Random & | random | ||
| ) | const |
Fills a given SPoint with a random Von Neumann unit vector.
| pt | The SPoint to fill with a random Von Neumann unit vector. |
| random | The PRNG used to determine which unit vector to fill pt with. |
| s32 MFM::MDist< R >::FromPoint | ( | const Point< s32 > & | offset, |
| u32 | radius | ||
| ) | const |
Return the coding of offset as a bond if possible. Returns -1 if the given offset cannot be expressed as a max length radius bond.
|
static |
Access the singleton MDist of any given size.
|
inline |
Get the lowest index corresponding to a distance of radius. Useful for starting an event window iteration at a given distance
| radius | The radius to find the lowest index of. |
|
inline |
Get the highest index corresponding to a distance of radius. Useful for ending an event window iteration at a given distance
| radius | The radius to find the highest index of. |
| u32 MFM::MDist< R >::GetTableSize | ( | u32 | maxRadius | ) | const |
Gets the area of a Manhattan Distance circle of a given radius .
| maxRadius | The radius of the Manhattan Distance circle to examine. |
|
static |
The diameter of an EventWindow of Radius R .
1.8.6