本文整理汇总了C++中AATPoint::SetTarget方法的典型用法代码示例。如果您正苦于以下问题:C++ AATPoint::SetTarget方法的具体用法?C++ AATPoint::SetTarget怎么用?C++ AATPoint::SetTarget使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AATPoint
的用法示例。
在下文中一共展示了AATPoint::SetTarget方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: lease
static void
OnRangeModified(fixed new_value)
{
if (target_point < initial_active_task_point)
return;
const fixed new_range = new_value / fixed(100);
if (new_range == range_and_radial.range)
return;
if (negative(new_range) != negative(range_and_radial.range)) {
/* when the range gets flipped, flip the radial as well */
if (negative(range_and_radial.radial.Native()))
range_and_radial.radial += Angle::HalfCircle();
else
range_and_radial.radial -= Angle::HalfCircle();
LoadRadial();
}
range_and_radial.range = new_range;
{
ProtectedTaskManager::ExclusiveLease lease(*protected_task_manager);
const OrderedTask &task = lease->GetOrderedTask();
AATPoint *ap = task.GetAATTaskPoint(target_point);
if (ap == nullptr)
return;
ap->SetTarget(range_and_radial,
lease->GetOrderedTask().GetTaskProjection());
}
map->Invalidate();
}
示例2:
bool
TaskManager::SetTarget(const unsigned index, RangeAndRadial rar)
{
if (!CheckOrderedTask())
return false;
AATPoint *ap = ordered_task->GetAATTaskPoint(index);
if (ap)
ap->SetTarget(rar, ordered_task->GetTaskProjection());
return true;
}
示例3:
bool
TaskManager::SetTarget(const unsigned index, const fixed range,
const fixed radial)
{
if (!CheckOrderedTask())
return false;
AATPoint *ap = task_ordered.GetAATTaskPoint(index);
if (ap)
ap->SetTarget(range, radial, task_ordered.GetTaskProjection());
return true;
}