Kigs Framework  Doc version 0.8
Open source multi purpose Rapid Application Development framework
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
TravPath Class Reference

#include <TravPath.h>

Classes

class  Way
 Manage one path part to a specific Drawable. More...
 

Public Types

enum  PathNeed
 used to know where to go in the path
 

Public Member Functions

 TravPath ()
 constructor
 
void Push (const Way &way)
 add a way to the path More...
 
virtual ~TravPath ()
 destructor More...
 
void Clear ()
 clear the TravPath
 
int GetSize ()
 destructor More...
 
PathNeed ComputeNeeds (kstl::vector< int > &currentway)
 compute what to do to go to the next mEntry More...
 
bool IsNeedSameLevel (const kstl::vector< int > &currentway)
 check if the level is the same More...
 
int GotoWay (kstl::vector< int > &currentway)
 get the index of the next way More...
 
void PopWay (kstl::vector< int > &currentway)
 pop current drawable and compute how many pops are needed to go to next one More...
 
DrawableGetDrawable ()
 get the current drawable in path More...
 

Protected Attributes

kstl::vector< WaymPath
 the path
 
int mNeedPop
 ?
 
int mCurrentPathIndex
 current index in the path
 

Detailed Description

Class used to store pathes in the scenegraph and draw sorted objects following the right path.

Constructor & Destructor Documentation

◆ ~TravPath()

TravPath::~TravPath ( )
virtual

destructor

clear all entries in path

Member Function Documentation

◆ ComputeNeeds()

TravPath::PathNeed TravPath::ComputeNeeds ( kstl::vector< int > &  currentway)

compute what to do to go to the next mEntry

Parameters
currentway: the current way
Returns
what to do to go to the next mEntry from the current position in path

◆ GetDrawable()

Drawable * TravPath::GetDrawable ( )
inline

get the current drawable in path

get the drawable

Returns
the current drawable in path
the drawable

◆ GetSize()

int TravPath::GetSize ( )
inline

destructor

get the TravPath size

Returns
the remaining entries in path
the TravPath size

◆ GotoWay()

int TravPath::GotoWay ( kstl::vector< int > &  currentway)
inline

get the index of the next way

Parameters
currentway: the current way
Returns
needed "jump" in index to go to the next drawable
Parameters
currentway: the current way
Returns
the index of the next way

◆ IsNeedSameLevel()

bool TravPath::IsNeedSameLevel ( const kstl::vector< int > &  currentway)

check if the level is the same

Parameters
currentway: the current way
Returns
TRUE if next drawable is at same level in scenegraph (no push or pop needed)

◆ PopWay()

void TravPath::PopWay ( kstl::vector< int > &  currentway)

pop current drawable and compute how many pops are needed to go to next one

Parameters
currentway: the current way

◆ Push()

void TravPath::Push ( const Way way)
inline

add a way to the path

Parameters
way: way to add

The documentation for this class was generated from the following files: