|
Clipper
|
Map reference with index-like behaviour. More...
#include <nxmap.h>
Public Member Functions | |
| Map_reference_index () | |
| Null constructor. | |
| Map_reference_index (const NXmap_base &map) | |
| Constructor: need parent map. | |
| Map_reference_index (const NXmap_base &map, const Coord_grid &pos) | |
| Constructor: need parent map and coord. | |
| Coord_grid | coord () const |
| Get current grid coordinate. | |
| const Coord_orth | coord_orth () const |
| Get current value of orthogonal coordinate. | |
| Map_reference_index & | set_coord (const Coord_grid &pos) |
| Set current value of coordinate - optimised for nearby coords. | |
| Map_reference_index & | next () |
| Simple increment. | |
| int | index_offset (const int &du, const int &dv, const int &dw) const |
| Index of neighbouring point. | |
| const NXmap_base & | base_nxmap () const |
| return the parent NXmap | |
| const int & | index () const |
| Get the index into the map data array. | |
| bool | last () const |
| Check for end of map. | |
Map reference with index-like behaviour.
This is a reference to a map coordinate. It behaves like a simple index into the map, but can be easily converted into a coordinate as and when required. It also implements methods for iterating through the map. It is very compact, but coord() involves some overhead.
1.7.4