本文整理汇总了C++中Segment::GetRoadPoint方法的典型用法代码示例。如果您正苦于以下问题:C++ Segment::GetRoadPoint方法的具体用法?C++ Segment::GetRoadPoint怎么用?C++ Segment::GetRoadPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Segment
的用法示例。
在下文中一共展示了Segment::GetRoadPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFakeToNormalEdge
void IndexGraphStarter::GetFakeToNormalEdge(FakeVertex const & fakeVertex, bool forward,
vector<SegmentEdge> & edges)
{
Segment const segment(fakeVertex.GetFeatureId(), fakeVertex.GetSegmentIdx(), forward);
RoadPoint const & roadPoint = segment.GetRoadPoint(true /* front */);
m2::PointD const & pointTo = m_graph.GetGeometry().GetPoint(roadPoint);
double const weight = m_graph.GetEstimator().CalcHeuristic(fakeVertex.GetPoint(), pointTo);
edges.emplace_back(segment, weight);
}
示例2: GetNormalToFakeEdge
void IndexGraphStarter::GetNormalToFakeEdge(Segment const & segment, FakeVertex const & fakeVertex,
Segment const & fakeSegment, bool isOutgoing,
vector<SegmentEdge> & edges)
{
if (!fakeVertex.Fits(segment))
return;
m2::PointD const & pointFrom = m_graph.GetGeometry().GetPoint(segment.GetRoadPoint(isOutgoing));
double const weight = m_graph.GetEstimator().CalcHeuristic(pointFrom, fakeVertex.GetPoint());
edges.emplace_back(fakeSegment, weight);
}
示例3: GetEdgeList
void IndexGraph::GetEdgeList(Segment const & segment, bool isOutgoing, vector<SegmentEdge> & edges)
{
RoadPoint const roadPoint = segment.GetRoadPoint(isOutgoing);
Joint::Id const jointId = m_roadIndex.GetJointId(roadPoint);
if (jointId != Joint::kInvalidId)
{
m_jointIndex.ForEachPoint(jointId, [&](RoadPoint const & rp) {
GetNeighboringEdges(segment, rp, isOutgoing, edges);
});
}
else
{
GetNeighboringEdges(segment, roadPoint, isOutgoing, edges);
}
}