本文整理汇总了C++中AbstractAirspace::GetShape方法的典型用法代码示例。如果您正苦于以下问题:C++ AbstractAirspace::GetShape方法的具体用法?C++ AbstractAirspace::GetShape怎么用?C++ AbstractAirspace::GetShape使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AbstractAirspace
的用法示例。
在下文中一共展示了AbstractAirspace::GetShape方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Visit
virtual void Visit(const AbstractAirspace &airspace) override {
switch (airspace.GetShape()) {
case AbstractAirspace::Shape::CIRCLE:
VisitCircle((const AirspaceCircle &)airspace);
break;
case AbstractAirspace::Shape::POLYGON:
VisitPolygon((const AirspacePolygon &)airspace);
break;
}
}
示例2: switch
void
AirspaceVisitor::Visit(const AbstractAirspace &aa)
{
switch (aa.GetShape()) {
case AbstractAirspace::Shape::CIRCLE:
Visit((const AirspaceCircle &)aa);
break;
case AbstractAirspace::Shape::POLYGON:
Visit((const AirspacePolygon &)aa);
break;
}
}
示例3: Visit
void Visit(const AbstractAirspace &airspace) {
if (!SetupCanvas(airspace))
return;
switch (airspace.GetShape()) {
case AbstractAirspace::Shape::CIRCLE:
VisitCircle((const AirspaceCircle &)airspace);
break;
case AbstractAirspace::Shape::POLYGON:
VisitPolygon((const AirspacePolygon &)airspace);
break;
}
}
示例4: GetPolygonPoints
void
AirspacePreviewRenderer::Draw(Canvas &canvas, const AbstractAirspace &airspace,
const RasterPoint pt, unsigned radius,
const AirspaceRendererSettings &settings,
const AirspaceLook &look)
{
AbstractAirspace::Shape shape = airspace.GetShape();
AirspaceClass type = airspace.GetType();
// Container for storing the points of a polygon airspace
std::vector<RasterPoint> pts;
if (shape == AbstractAirspace::Shape::POLYGON && !IsAncientHardware())
GetPolygonPoints(pts, (const AirspacePolygon &)airspace, pt, radius);
if (PrepareFill(canvas, type, look, settings)) {
DrawShape(canvas, shape, pt, radius, pts);
UnprepareFill(canvas);
}
if (PrepareOutline(canvas, type, look, settings))
DrawShape(canvas, shape, pt, radius, pts);
}