载入中...
搜索中...
未找到
eve::map::Path类 参考

Ordered tile-index waypoints from start to goal (inclusive). 更多...

#include <Path.h>

struct  Cell
 One waypoint. 更多...
 

Public 成员函数

void clear ()
 Clears all waypoints and cost.
 
void add (int x, int y)
 Appends a waypoint tile.
 
void reverse ()
 Reverses the waypoint order.
 
int getLength () const
 Number of waypoints (0 = empty/unreachable).
 
int getX (int index) const
 Waypoint tile coordinates.
 
int getY (int index) const
 
float getTotalCost () const
 Total path cost (A* heuristic + movement cost).
 
void setTotalCost (float cost)
 
bool empty () const
 True when there are no waypoints.
 
const std::vector< Cell > & cells () const
 Raw waypoint vector.
 

详细描述

Ordered tile-index waypoints from start to goal (inclusive).

在文件 Path.h8 行定义.

成员函数说明

◆ add()

void eve::map::Path::add ( int  x,
int  y 
)

Appends a waypoint tile.

在文件 Pathfinder.cpp591 行定义.

引用了 x , 以及 y.

◆ cells()

const std::vector< Cell > & eve::map::Path::cells ( ) const
inline

Raw waypoint vector.

在文件 Path.h36 行定义.

◆ clear()

void eve::map::Path::clear ( )

Clears all waypoints and cost.

在文件 Pathfinder.cpp586 行定义.

◆ empty()

bool eve::map::Path::empty ( ) const
inline

True when there are no waypoints.

在文件 Path.h27 行定义.

◆ getLength()

int eve::map::Path::getLength ( ) const

Number of waypoints (0 = empty/unreachable).

在文件 Pathfinder.cpp597 行定义.

◆ getTotalCost()

float eve::map::Path::getTotalCost ( ) const

Total path cost (A* heuristic + movement cost).

在文件 Pathfinder.cpp609 行定义.

◆ getX()

int eve::map::Path::getX ( int  index) const

Waypoint tile coordinates.

在文件 Pathfinder.cpp599 行定义.

◆ getY()

int eve::map::Path::getY ( int  index) const

在文件 Pathfinder.cpp604 行定义.

◆ reverse()

void eve::map::Path::reverse ( )

Reverses the waypoint order.

在文件 Pathfinder.cpp593 行定义.

◆ setTotalCost()

void eve::map::Path::setTotalCost ( float  cost)

在文件 Pathfinder.cpp611 行定义.

引用了 cost.


该类的文档由以下文件生成: