HyperRogue  11.3d
game/visualization engine based on non-Euclidean geometry
Public Member Functions | Public Attributes | List of all members
hr::walker< T > Struct Template Reference

Public Member Functions

 walker (T *at=NULL, int s=0, bool m=false)
 
walker< T > & operator+= (int i)
 
walker< T > & operator-= (int i)
 
walker< T > & operator+= (wmirror_t)
 
walker< T > & operator+= (wstep_t)
 
walker< T > & operator+= (rev_t)
 
walker< T > & operator+= (revstep_t)
 
bool operator!= (const walker< T > &x) const
 
bool operator== (const walker< T > &x) const
 
bool operator< (const walker< T > &cw2) const
 
walker< T > & operator++ (int)
 
walker< T > & operator-- (int)
 
template<class U >
walker operator+ (U t) const
 
template<class U >
walker operator- (U t) const
 
T *& peek ()
 
T * cpeek ()
 
bool creates ()
 
walker< T > mirrorat (int d)
 

Public Attributes

T * at
 
int spin
 
bool mirrored
 

Detailed Description

template<class T>
struct hr::walker< T >

the walker structure is used for walking on surfaces defined via connection_table.

Member Function Documentation

◆ operator+=() [1/5]

template<class T >
walker<T>& hr::walker< T >::operator+= ( int  i)
inline

spin by i to the left (or right, when mirrored

◆ operator-=()

template<class T >
walker<T>& hr::walker< T >::operator-= ( int  i)
inline

spin by i to the right (or left, when mirrored

◆ operator+=() [2/5]

template<class T >
walker<T>& hr::walker< T >::operator+= ( wmirror_t  )
inline

add wmirror to mirror this walker

◆ operator+=() [3/5]

template<class T >
walker<T>& hr::walker< T >::operator+= ( wstep_t  )
inline

add wstep to make a single step, after which we are facing the T we were originally on

◆ operator+=() [4/5]

template<class T >
walker<T>& hr::walker< T >::operator+= ( rev_t  )
inline

add wrev to face the other direction, may be non-deterministic and use hrand

◆ operator+=() [5/5]

template<class T >
walker<T>& hr::walker< T >::operator+= ( revstep_t  )
inline

adding revstep is equivalent to adding rev and step

◆ peek()

template<class T >
T*& hr::walker< T >::peek ( )
inline

what T are we facing, without creating it

◆ cpeek()

template<class T >
T* hr::walker< T >::cpeek ( )
inline

what T are we facing, with creating it

◆ creates()

template<class T >
bool hr::walker< T >::creates ( )
inline

would we create a new T if we stepped forwards?

◆ mirrorat()

template<class T >
walker<T> hr::walker< T >::mirrorat ( int  d)
inline

mirror this walker with respect to the d-th edge

Member Data Documentation

◆ at

template<class T >
T* hr::walker< T >::at

where we are at

◆ spin

template<class T >
int hr::walker< T >::spin

in which direction (edge) we are facing

◆ mirrored

template<class T >
bool hr::walker< T >::mirrored

are we mirrored


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