本文整理汇总了C++中Geom::GetType方法的典型用法代码示例。如果您正苦于以下问题:C++ Geom::GetType方法的具体用法?C++ Geom::GetType怎么用?C++ Geom::GetType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Geom
的用法示例。
在下文中一共展示了Geom::GetType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupCustomDefaultSource
void CustomGeomMgrSingleton::SetupCustomDefaultSource( int type, int surf_index,
double l1, double r1, double u1, double w1,
double l2, double r2, double u2, double w2 )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
SourceData sd;
sd.m_Type = type;
sd.m_SurfIndex = surf_index;
sd.m_Len1 = l1;
sd.m_Rad1 = r1;
sd.m_U1 = u1;
sd.m_W1 = w1;
sd.m_Len2 = l2;
sd.m_Rad2 = r2;
sd.m_U2 = u2;
sd.m_W2 = w2;
custom_geom->SetUpDefaultSource( sd );
}
}
示例2: OnTreeComputePath
void TreeDlg::OnTreeComputePath()
{
GetDlgItems();
ClearOutputText();
HTREEITEM hSelectedItem = mpTreeCtrl->GetSelectedItem();
if (hSelectedItem == NULL)
AppendOutputText("No item is selected");
else
{
GvPath *selectedItemPath = PathOfItem(hSelectedItem);
if (selectedItemPath == NULL)
AppendOutputText("[PathOfItem(...) returned NULL");
else
{
UtScalarArray<int> *indexArray = selectedItemPath->GetIndexArray();
int count = selectedItemPath->GetIndexCount();
AppendOutputText("Selected ");
Geom *g = selectedItemPath->Resolve();
AppendOutputText(g->GetType()->mpName);
AppendOutputText(" at path");
char buf[20];
for (int i=0; i<count; ++i) {
sprintf(buf, " %d", (*indexArray)[i]);
AppendOutputText(buf);
}
}
}
}
示例3: Update
void VSPAEROMgrSingleton::Update()
{
if( m_RefFlag() == MANUAL_REF )
{
m_Sref.Activate();
m_bref.Activate();
m_cref.Activate();
}
else
{
Geom* refgeom = VehicleMgr.GetVehicle()->FindGeom( m_RefGeomID );
if( refgeom )
{
if( refgeom->GetType().m_Type == MS_WING_GEOM_TYPE )
{
WingGeom* refwing = (WingGeom*) refgeom;
m_Sref.Set( refwing->m_TotalArea() );
m_bref.Set( refwing->m_TotalSpan() );
m_cref.Set( refwing->m_TotalChord() );
m_Sref.Deactivate();
m_bref.Deactivate();
m_cref.Deactivate();
}
}
}
}
示例4: SetCustomCenter
void CustomGeomMgrSingleton::SetCustomCenter( double x, double y, double z )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->SetCenter( x, y, z );
}
}
示例5: TransformSurf
//==== Clone Surf And Apply Transform =====//
void CustomGeomMgrSingleton::TransformSurf( int index, Matrix4d & mat )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->TransformSurf( index, mat );
}
}
示例6: ClearAllCustomDefaultSources
void CustomGeomMgrSingleton::ClearAllCustomDefaultSources()
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->ClearAllDefaultSources();
}
}
示例7: SetVspSurfCfdType
//==== Set VSP Surf Type For Current Custom Geom =====//
void CustomGeomMgrSingleton::SetVspSurfCfdType( int type, int surf_id )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->SetVspSurfCfdType( type, surf_id );
}
}
示例8: SkinXSecSurf
//==== Skin XSec Surf =====//
void CustomGeomMgrSingleton::SkinXSecSurf( bool closed_flag )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->SkinXSecSurf(closed_flag );
}
}
示例9: RemoveXSecSurf
//==== Remove XSec Surface To Current Geom ====//
void CustomGeomMgrSingleton::RemoveXSecSurf( const string& id )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->RemoveXSecSurf( id );
}
}
示例10: CheckClearTriggerEvent
//===== Check And Clear Trigger Event ====//
bool CustomGeomMgrSingleton::CheckClearTriggerEvent( int gui_id )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
return custom_geom->CheckClearTriggerEvent( gui_id );
}
return false;
}
示例11: GetCustomParm
string CustomGeomMgrSingleton::GetCustomParm( int index )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
return custom_geom->FindParmID( index );
}
return string();
}
示例12:
//==== Build Update Gui Instruction Vector ====//
vector< GuiUpdate > CustomGeomMgrSingleton::GetGuiUpdateVec()
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
return custom_geom->GetGuiUpdateVec();
}
vector< GuiUpdate > defvec;
return defvec;
}
示例13: AddParm
//==== Add Parm To Current Custom Geom ====//
string CustomGeomMgrSingleton::AddParm( int type, const string & name, const string & group )
{
Vehicle* veh = VehicleMgr.GetVehicle();
Geom* gptr = veh->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
return custom_geom->AddParm( type, name, group );
}
return string();
}
示例14: AddUpdateGui
//==== Update Gui ====//
void CustomGeomMgrSingleton::AddUpdateGui( int gui_id, const string & parm_id )
{
Geom* gptr = VehicleMgr.GetVehicle()->FindGeom( m_CurrGeom );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
GuiUpdate gu;
gu.m_GuiID = gui_id;
gu.m_ParmID = parm_id;
custom_geom->AddUpdateGui( gu );
}
}
示例15: InitGeom
//==== Init Custom Geom ====//
void CustomGeomMgrSingleton::InitGeom( const string& id, const string& module_name )
{
Vehicle* veh = VehicleMgr.GetVehicle();
Geom* gptr = veh->FindGeom( id );
//==== Check If Geom is Valid and Correct Type ====//
if ( gptr && gptr->GetType().m_Type == CUSTOM_GEOM_TYPE )
{
m_CurrGeom = id;
CustomGeom* custom_geom = dynamic_cast<CustomGeom*>( gptr );
custom_geom->SetScriptModuleName( module_name );
custom_geom->InitGeom();
m_ModuleGeomIDMap[ module_name ] = id;
}
}