载入中...
搜索中...
未找到
Path.h
浏览该文件的文档.
1#pragma once
2#include "common/Export.h"
3
4
5#include <vector>
6
7namespace eve::map {
8
11public:
13 void clear();
15 void add(int x, int y);
17 void reverse();
18
20 int getLength() const;
22 int getX(int index) const;
24 int getY(int index) const;
26 float getTotalCost() const;
28 void setTotalCost(float cost);
29
31 bool empty() const { return cells_.empty(); }
32
34 struct Cell {
35 int x = 0;
36 int y = 0;
37 };
38
40 const std::vector<Cell> &cells() const { return cells_; }
41
42private:
43 std::vector<Cell> cells_;
44 float totalCost_ = 0.f;
45};
46
47} // namespace eve::map
float y
Definition AnimClip.cpp:738
float x
Definition AnimClip.cpp:738
eve::resource::CostSpec cost
#define EVENGINE_API_WORLD
Definition Export.h:109
uint32_t index
Ordered tile-index waypoints from start to goal (inclusive).
Definition Path.h:10
const std::vector< Cell > & cells() const
Raw waypoint vector.
Definition Path.h:40
bool empty() const
True when there are no waypoints.
Definition Path.h:31
放置世界:格子占用(多通道)+ 地形语义 + 已放置建筑实例。 行为由 PlacementSystem 提供;本类暴露便于脚本绑定的薄封装方法。 坐标换算统一走 eve::grid(支持 rectang...
One waypoint.
Definition Path.h:34