当前位置: 首页>>代码示例>>C++>>正文


C++ ODPoint::SetODPointRangeRingsStep方法代码示例

本文整理汇总了C++中ODPoint::SetODPointRangeRingsStep方法的典型用法代码示例。如果您正苦于以下问题:C++ ODPoint::SetODPointRangeRingsStep方法的具体用法?C++ ODPoint::SetODPointRangeRingsStep怎么用?C++ ODPoint::SetODPointRangeRingsStep使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ODPoint的用法示例。


在下文中一共展示了ODPoint::SetODPointRangeRingsStep方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CentreOnBoat

void EBL::CentreOnBoat( bool bMoveEndPoint )
{
    ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
    ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
    pStartPoint->m_lat = g_pfFix.Lat;
    pStartPoint->m_lon = g_pfFix.Lon;

    if(m_dLength == 0.) m_dLength = pEndPoint->m_seg_len;

    if(bMoveEndPoint && !m_bEndPointMoving) {
        if(m_bRotateWithBoat) {
            MaintainWith();
        } else {
            if(!m_bFixedEndPosition) {
                PositionBearingDistanceMercator_Plugin(pStartPoint->m_lat, pStartPoint->m_lon, m_dEBLAngle, m_dLength, &pEndPoint->m_lat, &pEndPoint->m_lon);
            } else {
                double brg;
                double hdg = 0.;
                DistanceBearingMercator_Plugin(pEndPoint->m_lat, pEndPoint->m_lon, pStartPoint->m_lat, pStartPoint->m_lon, &brg, &m_dLength);
                switch(m_iMaintainWith) {
                    case ID_EBL_MAINTAIN_WITH_HEADING:
                        if(!isnan(g_pfFix.Hdt))
                            hdg = g_pfFix.Hdt;
                        break;
                    case ID_EBL_MAINTAIN_WITH_COG:
                        if(!isnan(g_pfFix.Cog))
                            hdg = g_pfFix.Cog;
                        break;
                }
                if(hdg > brg)
                    m_dEBLAngle = brg + 360 - hdg;
                else if(hdg < brg)
                    m_dEBLAngle = hdg - brg;
                else m_dEBLAngle = 0;
            }
        }
    } else {
        DistanceBearingMercator_Plugin(pEndPoint->m_lat, pEndPoint->m_lon, pStartPoint->m_lat, pStartPoint->m_lon, &m_dEBLAngle, &m_dLength);
        m_dBoatHeading = g_pfFix.Hdt;
        m_dBoatCOG = g_pfFix.Cog;
    }
    pStartPoint->m_ODPointName = _("Boat");
    m_bCentreOnBoat = true;
    
    UpdateEBL();
    if(m_bVRM) {
        ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
        pStartPoint->SetODPointRangeRingsStep( m_dLength / pStartPoint->GetODPointRangeRingsNumber() );
    }
    
    bool l_bRequestRefresh = true;
    if(g_pEBLPropDialog && g_pEBLPropDialog->IsShown())
        l_bRequestRefresh = g_pEBLPropDialog->UpdateProperties();
    
    m_bSaveUpdates = false;
    if(l_bRequestRefresh)
        RequestRefresh( g_ocpn_draw_pi->m_parent_window );
    
    return;
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:60,代码来源:EBL.cpp

示例2: MoveEndPoint

void EBL::MoveEndPoint( bool bUpdateEBL )
{
    ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
    ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();

    if(m_dLength == 0.) m_dLength = pEndPoint->m_seg_len;
    
    if(m_bRotateWithBoat) {
        MaintainWith();
    } else {
        if(!m_bFixedEndPosition)
            PositionBearingDistanceMercator_Plugin(pStartPoint->m_lat, pStartPoint->m_lon, m_dEBLAngle, m_dLength, &pEndPoint->m_lat, &pEndPoint->m_lon);
    }
    
    if(m_bVRM)
        pStartPoint->SetODPointRangeRingsStep( m_dLength / pStartPoint->GetODPointRangeRingsNumber() );
    
    if(g_pEBLPropDialog && g_pEBLPropDialog->IsShown())
        g_pEBLPropDialog->UpdateProperties();
    
    if(bUpdateEBL) {
        bool l_bSaveUpdatesState = m_bSaveUpdates;
        m_bSaveUpdates = true;
        UpdateEBL();
        m_bSaveUpdates = l_bSaveUpdatesState;
    } else
        UpdateEBL();
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:28,代码来源:EBL.cpp

示例3: DrawGL

void EBL::DrawGL( PlugIn_ViewPort &piVP )
{
    if(m_bVRM) {
        ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
        ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
        pStartPoint->SetODPointRangeRingsStep( pEndPoint->m_seg_len / pStartPoint->GetODPointRangeRingsNumber() );
    }
    ODPath::DrawGL( piVP );
}
开发者ID:Hakansv,项目名称:ocpn_draw_pi,代码行数:9,代码来源:EBL.cpp

示例4: MoveEndPoint

void EBL::MoveEndPoint( double inc_lat, double inc_lon )
{
    ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
    pEndPoint->m_lat -= inc_lat;
    pEndPoint->m_lon -= inc_lon;
    if(m_bVRM) {
        ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
        pStartPoint->SetODPointRangeRingsStep( pEndPoint->m_seg_len / pStartPoint->GetODPointRangeRingsNumber() );
    }
    if(g_pEBLPropDialog && g_pEBLPropDialog->IsShown())
        g_pEBLPropDialog->UpdateProperties();
}
开发者ID:Hakansv,项目名称:ocpn_draw_pi,代码行数:12,代码来源:EBL.cpp

示例5: AddPoint

void EBL::AddPoint( ODPoint *pNewPoint, bool b_rename_in_sequence, bool b_deferBoxCalc, bool b_isLoading )
{
    ODPath::AddPoint( pNewPoint, b_rename_in_sequence, b_deferBoxCalc, b_isLoading );
    if(pNewPoint->m_ODPointName == _("Start") || pNewPoint->m_ODPointName == _("Boat")) {
        pNewPoint->SetODPointRangeRingsNumber( 1 );
        pNewPoint->SetODPointRangeRingsStep( 0 );
        pNewPoint->SetODPointRangeRingsColour( GetCurrentColour() );
        if(m_bVRM)
            pNewPoint->m_bShowODPointRangeRings = true;
        else
            pNewPoint->m_bShowODPointRangeRings = false;
    } else if(pNewPoint->m_ODPointName == _("End")) {
        ODPoint *pFirstPoint = m_pODPointList->GetFirst()->GetData();
        pFirstPoint->SetODPointRangeRingsStep( pNewPoint->m_seg_len );
    }
}
开发者ID:Hakansv,项目名称:ocpn_draw_pi,代码行数:16,代码来源:EBL.cpp

示例6: CentreOnBoat

void EBL::CentreOnBoat( void )
{
    ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
    pStartPoint->m_lat = g_pfFix.Lat;
    pStartPoint->m_lon = g_pfFix.Lon;
    pStartPoint->m_ODPointName = _("Boat");
    m_bCentreOnBoat = true;
    
    UpdateEBL();
    if(m_bVRM) {
        ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
        ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
        pStartPoint->SetODPointRangeRingsStep( pEndPoint->m_seg_len / pStartPoint->GetODPointRangeRingsNumber() );
    }
    
    if(g_pEBLPropDialog && g_pEBLPropDialog->IsShown())
        g_pEBLPropDialog->UpdateProperties();

    m_bSaveUpdates = false;
    RequestRefresh( g_ocpn_draw_pi->m_parent_window );
    
    return;
}
开发者ID:Hakansv,项目名称:ocpn_draw_pi,代码行数:23,代码来源:EBL.cpp

示例7: MoveStartPoint

void EBL::MoveStartPoint( double lat, double lon )
{
    ODPoint *pEndPoint = m_pODPointList->GetLast()->GetData();
    ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
    pStartPoint->m_lat = lat;
    pStartPoint->m_lon = lon;
    if(m_dLength == 0.) m_dLength = pEndPoint->m_seg_len;
    
    if(m_bRotateWithBoat){
        MaintainWith();
    } else {
        PositionBearingDistanceMercator_Plugin(pStartPoint->m_lat, pStartPoint->m_lon, m_dEBLAngle, m_dLength, &pEndPoint->m_lat, &pEndPoint->m_lon);
    }
    
    
    if(m_bVRM) {
        ODPoint *pStartPoint = m_pODPointList->GetFirst()->GetData();
        pStartPoint->SetODPointRangeRingsStep( m_dLength / pStartPoint->GetODPointRangeRingsNumber() );
    }
    if(g_pEBLPropDialog && g_pEBLPropDialog->IsShown())
        g_pEBLPropDialog->UpdateProperties();
    
}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:23,代码来源:EBL.cpp


注:本文中的ODPoint::SetODPointRangeRingsStep方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。