本文整理汇总了C++中Trace::GetPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ Trace::GetPoints方法的具体用法?C++ Trace::GetPoints怎么用?C++ Trace::GetPoints使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::GetPoints方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fs
void
PrintHelper::contestmanager_print(const ContestManager &man,
const Trace &trace_full,
const Trace &trace_triangle,
const Trace &trace_sprint)
{
Directory::Create(_T("output/results"));
{
std::ofstream fs("output/results/res-olc-trace.txt");
TracePointVector v;
trace_full.GetPoints(v);
for (auto it = v.begin(); it != v.end(); ++it)
fs << it->GetLocation().longitude << " " << it->GetLocation().latitude
<< " " << it->GetAltitude() << " " << it->GetTime()
<< "\n";
}
{
std::ofstream fs("output/results/res-olc-trace_triangle.txt");
TracePointVector v;
trace_triangle.GetPoints(v);
for (auto it = v.begin(); it != v.end(); ++it)
fs << it->GetLocation().longitude << " " << it->GetLocation().latitude
<< " " << it->GetAltitude() << " " << it->GetTime()
<< "\n";
}
{
std::ofstream fs("output/results/res-olc-trace_sprint.txt");
TracePointVector v;
trace_sprint.GetPoints(v);
for (auto it = v.begin(); it != v.end(); ++it)
fs << it->GetLocation().longitude << " " << it->GetLocation().latitude
<< " " << it->GetAltitude() << " " << it->GetTime()
<< "\n";
}
std::ofstream fs("output/results/res-olc-solution.txt");
if (man.stats.solution[0].empty()) {
fs << "# no solution\n";
return;
}
if (positive(man.stats.result[0].time)) {
for (auto it = man.stats.solution[0].begin();
it != man.stats.solution[0].end(); ++it) {
fs << it->GetLocation().longitude << " " << it->GetLocation().latitude
<< " " << it->GetTime()
<< "\n";
}
}
}
示例2: point
static void
OnAdvance(Trace &trace, const GeoPoint &loc, const fixed alt, const fixed t)
{
if (t>fixed(1)) {
const TracePoint point(loc, unsigned(t), alt, fixed(0), 0);
trace.push_back(point);
}
// get the trace, just so it's included in timing
TracePointVector v;
trace.GetPoints(v);
if (trace.size()>1) {
// assert(abs(v.size()-trace.size())<2);
}
}