本文整理汇总了C++中GeoPoint::Middle方法的典型用法代码示例。如果您正苦于以下问题:C++ GeoPoint::Middle方法的具体用法?C++ GeoPoint::Middle怎么用?C++ GeoPoint::Middle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类GeoPoint
的用法示例。
在下文中一共展示了GeoPoint::Middle方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnPaint
virtual void OnPaint(Canvas &canvas) override {
canvas.ClearWhite();
const GeoPoint a(Angle::Degrees(7.70722),
Angle::Degrees(51.052));
const GeoPoint b(Angle::Degrees(11.5228),
Angle::Degrees(50.3972));
WindowProjection projection;
projection.SetScreenOrigin(canvas.GetWidth() / 2, canvas.GetHeight() / 2);
projection.SetGeoLocation(a.Middle(b));
projection.SetScreenSize(canvas.GetSize());
projection.SetScaleFromRadius(fixed(400000));
projection.UpdateScreenBounds();
canvas.SelectBlackPen();
canvas.SelectHollowBrush();
RasterPoint pa = projection.GeoToScreen(a);
canvas.DrawCircle(pa.x, pa.y, 4);
RasterPoint pb = projection.GeoToScreen(b);
canvas.DrawCircle(pb.x, pb.y, 4);
RenderFAISector(canvas, projection, a, b, false, settings);
}
示例2: bb_target
void
Airspaces::VisitIntersecting(const GeoPoint &loc, const GeoPoint &end,
AirspaceIntersectionVisitor& visitor) const
{
if (empty())
// nothing to do
return;
const GeoPoint c = loc.Middle(end);
Airspace bb_target(c, task_projection);
int projected_range = task_projection.ProjectRangeInteger(c, loc.Distance(end) / 2);
IntersectingAirspaceVisitorAdapter adapter(loc, end, task_projection, visitor);
airspace_tree.visit_within_range(bb_target, -projected_range, adapter);
#ifdef INSTRUMENT_TASK
n_queries++;
#endif
}