A lightweight identifier for one neighbored object. More...
#include <sifteo/cube.h>
Public Member Functions | |
| CubeID | cube () const |
| Convert this NeighborID to a CubeID. More... | |
| bool | isBase () const |
| Is this neighbor a base? | |
| bool | isCube () const |
| Is this neighbor a cube? | |
| bool | isEmpty () const |
| Is there nothing neighbored at all? | |
| NeighborID () | |
| Default constructor. Initializes an empty NeighborID. | |
| NeighborID (_SYSNeighborID sys) | |
| Initialize a NeighborID with a concrete value. | |
| operator _SYSNeighborID () const | |
| Implicit conversion to _SYSNeighborID, for use in low-level system calls. | |
A lightweight identifier for one neighbored object.
Neighbor IDs represent anything that can be detected by one of a cube's four neighbor sensors. Currently this could be another cube, a base, or nothing at all.
|
inline |
Convert this NeighborID to a CubeID.
If the neighbor is not a cube, returns an 'undefined' CubeID.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen