本文整理汇总了C++中AATPoint::GetActiveState方法的典型用法代码示例。如果您正苦于以下问题:C++ AATPoint::GetActiveState方法的具体用法?C++ AATPoint::GetActiveState怎么用?C++ AATPoint::GetActiveState使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AATPoint
的用法示例。
在下文中一共展示了AATPoint::GetActiveState方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: seg
void
PrintHelper::aatpoint_print(std::ostream& f,
const AATPoint& tp,
const AircraftState& state,
const TaskProjection &projection,
const int item)
{
switch(item) {
case 0:
orderedtaskpoint_print(f, tp, state, item);
f << "# Target " << tp.GetTargetLocation().longitude << ","
<< tp.GetTargetLocation().latitude << "\n";
break;
case 1:
if (tp.valid() && (tp.GetActiveState() != OrderedTaskPoint::BEFORE_ACTIVE)) {
assert(tp.GetPrevious());
assert(tp.GetNext());
// note in general this will only change if
// prev max or target changes
AATIsolineSegment seg(tp, projection);
fixed tdist = tp.GetPrevious()->GetLocationRemaining().Distance(
tp.GetLocationMin());
fixed rdist = tp.GetPrevious()->GetLocationRemaining().Distance(
tp.GetTargetLocation());
bool filter_backtrack = true;
if (seg.IsValid()) {
for (double t = 0.0; t<=1.0; t+= 1.0/20) {
GeoPoint ga = seg.Parametric(fixed(t));
fixed dthis = tp.GetPrevious()->GetLocationRemaining().Distance(ga);
if (!filter_backtrack
|| (dthis>=tdist)
|| (dthis>=rdist)) {
/// @todo unless double dist is better than current
f << ga.longitude << " " << ga.latitude << "\n";
}
}
} else {
GeoPoint ga = seg.Parametric(fixed(0));
f << ga.longitude << " " << ga.latitude << "\n";
}
f << "\n";
}
break;
}
}