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


C++ Geom::HasWingTypeSurfs方法代码示例

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


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

示例1: Update

bool CfdMeshScreen::Update()
{
    int i;

    LoadSetChoice();

    CfdMeshMgr.UpdateSourcesAndWakes();
    CfdMeshMgr.UpdateDomain();

    //==== Base Len ====//

    m_BodyEdgeSizeSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_BaseLen.GetID() );
    m_MinEdgeSizeSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_MinLen.GetID() );
    m_MaxGapSizeSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_MaxGap.GetID() );
    m_NumCircSegmentSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_NCircSeg.GetID() );
    m_GrowRatioSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_GrowRatio.GetID() );
    m_IntersectSubSurfsButton.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_IntersectSubSurfs.GetID() );

    m_FarXScaleSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarXScale.GetID() );
    m_FarYScaleSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarYScale.GetID() );
    m_FarZScaleSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarZScale.GetID() );


//  char xstr[255];
//  char ystr[255];
//  char zstr[255];
//  sprintf( xstr, "%0.4f", CfdMeshMgr.GetFarLength() );
//  sprintf( ystr, "%0.4f", CfdMeshMgr.GetFarWidth() );
//  sprintf( zstr, "%0.4f", CfdMeshMgr.GetFarHeight() );
//  m_CfdMeshUI->farXScaleAbsInput->value(xstr);
//  m_CfdMeshUI->farYScaleAbsInput->value(ystr);
//  m_CfdMeshUI->farZScaleAbsInput->value(zstr);


    m_FarXLocationSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarXLocation.GetID() );
    m_FarYLocationSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarYLocation.GetID() );
    m_FarZLocationSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_FarZLocation.GetID() );

    m_FarEdgeLengthSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_FarMaxLen.GetID() );
    m_FarGapSizeSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_FarMaxGap.GetID() );
    m_FarCircSegmentSlider.Update( CfdMeshMgr.GetGridDensityPtr()->m_FarNCircSeg.GetID() );

    m_WakeScaleSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_WakeScale.GetID() );
    m_WakeAngleSlider.Update( CfdMeshMgr.GetCfdSettingsPtr()->m_WakeAngle.GetID() );

    //==== Load Geom Choice ====//
    m_GeomVec = m_Vehicle->GetGeomVec();

    m_CfdMeshUI->compChoice->clear();
    m_CfdMeshUI->surfChoice->clear();
    m_CfdMeshUI->wakeCompChoice->clear();
    m_CfdMeshUI->farCompChoice->clear();
    map< string, int > compIDMap;
    map< string, int > wingCompIDMap;
    m_WingGeomVec.clear();

    int iwing = 0;
    for ( i = 0 ; i < ( int )m_GeomVec.size() ; i++ )
    {
        char str[256];
        Geom* g = m_Vehicle->FindGeom( m_GeomVec[i] );
        if ( g )
        {
            sprintf( str, "%d_%s", i, g->GetName().c_str() );
            m_CfdMeshUI->compChoice->add( str );
            if( g->HasWingTypeSurfs() )
            {
                m_CfdMeshUI->wakeCompChoice->add( str );
                wingCompIDMap[ m_GeomVec[i] ] = iwing;
                m_WingGeomVec.push_back( m_GeomVec[i] );
                iwing ++;
            }
            m_CfdMeshUI->farCompChoice->add( str );
            compIDMap[ m_GeomVec[i] ] = i;
        }
    }

    string currSourceGeomID = CfdMeshMgr.GetCurrSourceGeomID();
    if( currSourceGeomID.length() == 0 && m_GeomVec.size() > 0 )
    {
        // Handle case default case.
        currSourceGeomID = m_GeomVec[0];
        CfdMeshMgr.SetCurrSourceGeomID( currSourceGeomID );
    }
    Geom* currGeom = m_Vehicle->FindGeom( currSourceGeomID );
    m_CfdMeshUI->compChoice->value( compIDMap[ currSourceGeomID ] );

    string wakeGeomID = CfdMeshMgr.GetWakeGeomID();
    if( wakeGeomID.length() == 0 && m_WingGeomVec.size() > 0 )
    {
        // Handle case default case.
        wakeGeomID = m_WingGeomVec[0];
        CfdMeshMgr.SetWakeGeomID( wakeGeomID );
    }
    Geom* wakeGeom = m_Vehicle->FindGeom( wakeGeomID );
    m_CfdMeshUI->wakeCompChoice->value( wingCompIDMap[ wakeGeomID ] );

    string farGeomID = CfdMeshMgr.GetCfdSettingsPtr()->GetFarGeomID();
    if( farGeomID.length() == 0 && m_GeomVec.size() > 0 )
    {
//.........这里部分代码省略.........
开发者ID:Mr-Kumar-Abhishek,项目名称:OpenVSP,代码行数:101,代码来源:CfdMeshScreen.cpp


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