本文整理汇总了C++中AirspacePolygon::GetPoints方法的典型用法代码示例。如果您正苦于以下问题:C++ AirspacePolygon::GetPoints方法的具体用法?C++ AirspacePolygon::GetPoints怎么用?C++ AirspacePolygon::GetPoints使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AirspacePolygon
的用法示例。
在下文中一共展示了AirspacePolygon::GetPoints方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Visit
void Visit(const AirspacePolygon& airspace) {
if (!prepare_polygon(airspace.GetPoints()))
return;
bool fill_airspace = m_warnings.is_warning(airspace) ||
m_warnings.is_inside(airspace);
GLEnable stencil(GL_STENCIL_TEST);
if (!m_warnings.is_acked(airspace)) {
if (!fill_airspace) {
// set stencil for filling (bit 0)
set_fillstencil();
draw_prepared();
}
// fill interior without overpainting any previous outlines
{
setup_interior(airspace, !fill_airspace);
GLEnable blend(GL_BLEND);
draw_prepared();
}
if (!fill_airspace) {
// clear fill stencil (bit 0)
clear_fillstencil();
draw_prepared();
}
}
// draw outline
setup_outline(airspace);
draw_prepared();
}
示例2:
static void
GetPolygonPoints(std::vector<RasterPoint> &pts,
const AirspacePolygon &airspace,
const RasterPoint pt, unsigned radius)
{
GeoBounds bounds = airspace.GetGeoBounds();
GeoPoint center = bounds.GetCenter();
fixed geo_heigth = bounds.GetGeoHeight();
fixed geo_width = bounds.GetGeoWidth();
fixed geo_size = std::max(geo_heigth, geo_width);
WindowProjection projection;
projection.SetScreenSize({radius * 2, radius * 2});
projection.SetScreenOrigin(pt.x, pt.y);
projection.SetGeoLocation(center);
projection.SetScale(fixed(radius * 2) / geo_size);
projection.SetScreenAngle(Angle::Zero());
projection.UpdateScreenBounds();
const SearchPointVector &border = airspace.GetPoints();
pts.reserve(border.size());
for (auto it = border.begin(), it_end = border.end(); it != it_end; ++it)
pts.push_back(projection.GeoToScreen(it->GetLocation()));
}
示例3: VisitPolygon
void VisitPolygon(const AirspacePolygon &airspace) {
if (warnings.IsAcked(airspace))
return;
AirspaceClass airspace_class = airspace.GetType();
if (settings.classes[airspace_class].fill_mode ==
AirspaceClassRendererSettings::FillMode::NONE)
return;
BufferRenderStart();
SetBufferPens(airspace);
DrawSearchPointVector(airspace.GetPoints());
}
示例4: VisitPolygon
void VisitPolygon(const AirspacePolygon &airspace) {
if (!PreparePolygon(airspace.GetPoints()))
return;
if (!warning_manager.IsAcked(airspace) && SetupInterior(airspace)) {
// fill interior without overpainting any previous outlines
GLEnable blend(GL_BLEND);
DrawPrepared();
}
// draw outline
if (SetupOutline(airspace))
DrawPrepared();
}