Uses a variant of the flyweight pattern, the variant being that the number of states is not constant.
Public Member Functions | |
BestRadar () | |
For STL only. | |
BestRadar (size_t a, size_t b, size_t c) | |
The dimensions of the 3D grid. | |
void | update (size_t x, size_t y, size_t z, short radarid, unsigned short radarRange) |
update the entry at a point if it is better than what's here | |
void | ageOff (unsigned char radarid) |
age off all best range associated with this radar. | |
const unsigned short | getRange (size_t x, size_t y, size_t z) const |
Classes | |
struct | Entry |
vol::BestRadar::BestRadar | ( | ) | [inline] |
For STL only.
Don't use.
vol::BestRadar::BestRadar | ( | size_t | a, | |
size_t | b, | |||
size_t | c | |||
) |
The dimensions of the 3D grid.
void vol::BestRadar::ageOff | ( | unsigned char | radarid | ) |
age off all best range associated with this radar.
const unsigned short vol::BestRadar::getRange | ( | size_t | x, | |
size_t | y, | |||
size_t | z | |||
) | const [inline] |
void vol::BestRadar::update | ( | size_t | x, | |
size_t | y, | |||
size_t | z, | |||
short | radarid, | |||
unsigned short | radarRange | |||
) | [inline] |
update the entry at a point if it is better than what's here