本文整理汇总了C++中sphere::settessmethod方法的典型用法代码示例。如果您正苦于以下问题:C++ sphere::settessmethod方法的具体用法?C++ sphere::settessmethod怎么用?C++ sphere::settessmethod使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sphere
的用法示例。
在下文中一共展示了sphere::settessmethod方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnGUIEvent
//--------------------------------------------------------------------------------------
// Handles the GUI events
//--------------------------------------------------------------------------------------
void CALLBACK OnGUIEvent( UINT nEvent, int nControlID, CDXUTControl* pControl, void* pUserContext )
{
switch( nControlID )
{
case IDC_TOGGLEFULLSCREEN:
DXUTToggleFullScreen(); break;
case IDC_TOGGLEREF:
DXUTToggleREF(); break;
case IDC_CHANGEDEVICE:
g_D3DSettingsDlg.SetActive( !g_D3DSettingsDlg.IsActive() ); break;
case IDC_DISPLACEMENTLVL:
{
displacement_level = g_SampleUI.GetSlider( IDC_DISPLACEMENTLVL )->GetValue()/ 100.0f;
tessplane.setdislvl(displacement_level);
WCHAR sz[100];
swprintf_s( sz, L"Displacement Level: %2.1f", displacement_level );
g_SampleUI.GetStatic( IDC_DISPLACEMENTLVL_STATIC )->SetText( sz );
}
break;
case IDC_TESSLVL:
{
tess_lvl = g_SampleUI.GetSlider( IDC_TESSLVL )->GetValue();
tessplane.setTesslvl(tess_lvl);
tesscube.set_tesslvl(tess_lvl);
fuse.set_tesslvl(tess_lvl);
WCHAR sz[100];
swprintf_s( sz, L"Tesselation Level: %2.1f", tess_lvl );
g_SampleUI.GetStatic( IDC_TESSLVL_STATIC )->SetText( sz );
}
break;
case IDC_TOGGLEBUILDING:
show_buildings = g_SampleUI.GetCheckBox( IDC_TOGGLEBUILDING )->GetChecked();
break;
case IDC_TOGGLEWIRE:
tessplane.toggleWire(g_SampleUI.GetCheckBox( IDC_TOGGLEWIRE )->GetChecked());
tesscube.toggleWire(g_SampleUI.GetCheckBox( IDC_TOGGLEWIRE )->GetChecked());
fuse.toggleWire(g_SampleUI.GetCheckBox( IDC_TOGGLEWIRE )->GetChecked());
break;
case IDC_TOGGLEDT:
tessplane.toggleDT(g_SampleUI.GetCheckBox( IDC_TOGGLEDT )->GetChecked());
break;
case IDC_PARTITION_INTEGER:
tessplane.settessmethod(0);
tesscube.settessmethod(0);
fuse.settessmethod(0);
break;
case IDC_PARTITION_FRAC_EVEN:
tessplane.settessmethod(1);
tesscube.settessmethod(1);
fuse.settessmethod(1);
break;
case IDC_PARTITION_FRAC_ODD:
tesscube.settessmethod(2);
tessplane.settessmethod(2);
fuse.settessmethod(2);
break;
}
}