v1.1.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Modules Pages
Public Member Functions | List of all members
Sifteo::NeighborID Struct Reference

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.
 

Detailed Description

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.

Member Function Documentation

CubeID Sifteo::NeighborID::cube ( ) const
inline

Convert this NeighborID to a CubeID.

If the neighbor is not a cube, returns an 'undefined' CubeID.


The documentation for this struct was generated from the following file: