本文整理汇总了C++中ODPoint::GetShowODPointRangeRings方法的典型用法代码示例。如果您正苦于以下问题:C++ ODPoint::GetShowODPointRangeRings方法的具体用法?C++ ODPoint::GetShowODPointRangeRings怎么用?C++ ODPoint::GetShowODPointRangeRings使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ODPoint
的用法示例。
在下文中一共展示了ODPoint::GetShowODPointRangeRings方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetODPointList
BoundaryPoint *PointMan::FindLineCrossingBoundaryPtr( double StartLon, double StartLat, double EndLon, double EndLat, int type, int state )
{
// search boundary point
wxODPointListNode *node = GetODPointList()->GetFirst();
while( node ) {
ODPoint *od = static_cast<ODPoint *>(node->GetData());
if( od->IsListed() ) {
if( od->m_bIsInPath && !od->m_bKeepXPath ) {
node = node->GetNext();
continue;
}
// if there's no ring there's nothing to do
if (!od->GetShowODPointRangeRings() ||
od->GetODPointRangeRingsNumber() == 0 ||
od->GetODPointRangeRingsStep() == 0.f)
{
node = node->GetNext();
continue;
}
BoundaryPoint *op = dynamic_cast<BoundaryPoint *>(node->GetData());
if (!op) {
node = node->GetNext();
continue;
}
bool l_bNext = false;
switch (type) {
case ID_BOUNDARY_ANY:
l_bNext = false;
break;
case ID_BOUNDARY_EXCLUSION:
if(!op->m_bExclusionBoundaryPoint) l_bNext = true;
break;
case ID_BOUNDARY_INCLUSION:
if(!op->m_bInclusionBoundaryPoint) l_bNext = true;
break;
case ID_BOUNDARY_NIETHER:
if(op->m_bExclusionBoundaryPoint || op->m_bInclusionBoundaryPoint) l_bNext = true;
break;
}
if (!l_bNext) {
// 0 nautical miles 1 kilometer
double f = (op->m_iODPointRangeRingsStepUnits == 1)?1000.0:1852.31;
// in meters
double dst = op->GetODPointRangeRingsNumber() * op->GetODPointRangeRingsStep() * f;
if (DistancePointLine( op->m_lon, op->m_lat, StartLon, StartLat, EndLon, EndLat, dst )) {
return op;
}
}
}
node = node->GetNext();
}
return 0;
}