Dragonfly  4.4
A text-based game engine
Public Member Functions | Private Attributes | List of all members
df::Path Class Reference

Public Member Functions

Vector nextNode () const
Vector previousNode () const
void setPath (std::vector< Vector > new_path)
std::vector< VectorgetPath () const
bool endOfPath () const
Vector getEnd () const
int setIndex (int new_index)
int getIndex () const
Path operator++ (int)

Private Attributes

std::vector< Vectorm_path
int m_index

Member Function Documentation

bool df::Path::endOfPath ( ) const

Return true when at end of path.

Vector df::Path::getEnd ( ) const

Return last node of path.

int df::Path::getIndex ( ) const

Return index of path.

std::vector<Vector> df::Path::getPath ( ) const

Return path.

Vector df::Path::nextNode ( ) const

Return next node in path.

Return (-1,-1) if none.

Path df::Path::operator++ ( int  )

Increment path target node.

If at last node, index stays at end.

Vector df::Path::previousNode ( ) const

Return previous node in path.

Return (-1,-1) if none.

int df::Path::setIndex ( int  new_index)

Set index of path.

Return 0 if ok, else -1;

void df::Path::setPath ( std::vector< Vector new_path)

Set path.

Member Data Documentation

int df::Path::m_index

Index of next target node.

std::vector<Vector> df::Path::m_path

Nodes in path.