提交 34196451 编写于 作者: Z Zhang Liangliang 提交者: Dong Li

Planning: modified point(index) function in st_graph_boundary, return STPoint for easier usage.

上级 269d4ad9
......@@ -79,9 +79,9 @@ bool StGraphBoundary::IsPointInBoundary(const STPoint& st_point) const {
return IsPointIn(st_point);
}
Vec2d StGraphBoundary::point(const uint32_t index) const {
STPoint StGraphBoundary::point(const uint32_t index) const {
CHECK_LT(index, points_.size()) << "Index[" << index << "] is out of range.";
return points_[index];
return STPoint(points_[index].y(), points_[index].x());
}
const std::vector<Vec2d>& StGraphBoundary::points() const { return points_; }
......
......@@ -60,7 +60,7 @@ class StGraphBoundary : public common::math::Polygon2d {
bool IsPointInBoundary(const StGraphPoint& st_graph_point) const;
bool IsPointInBoundary(const STPoint& st_point) const;
common::math::Vec2d point(const uint32_t index) const;
STPoint point(const uint32_t index) const;
const std::vector<common::math::Vec2d>& points() const;
BoundaryType boundary_type() const;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册