本文整理汇总了C++中Flags32::is方法的典型用法代码示例。如果您正苦于以下问题:C++ Flags32::is方法的具体用法?C++ Flags32::is怎么用?C++ Flags32::is使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Flags32
的用法示例。
在下文中一共展示了Flags32::is方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
void CStats::OnRender ()
{
#ifdef DEBUG
if (g_stats_flags.is(st_sound)){
CSound_stats_ext snd_stat_ext;
::Sound->statistic (0,&snd_stat_ext);
CSound_stats_ext::item_vec_it _I = snd_stat_ext.items.begin();
CSound_stats_ext::item_vec_it _E = snd_stat_ext.items.end();
for (;_I!=_E;_I++){
const CSound_stats_ext::SItem& item = *_I;
if (item._3D)
{
m_pRender->SetDrawParams(&*Device.m_pRender);
//RCache.set_xform_world(Fidentity);
//RCache.set_Shader (Device.m_SelectionShader);
//RCache.set_c ("tfactor",1,1,1,1);
DU->DrawCross (item.params.position, 0.5f, 0xFF0000FF, true );
if (g_stats_flags.is(st_sound_min_dist))
DU->DrawSphere (Fidentity, item.params.position, item.params.min_distance, 0x400000FF, 0xFF0000FF, true, true);
if (g_stats_flags.is(st_sound_max_dist))
DU->DrawSphere (Fidentity, item.params.position, item.params.max_distance, 0x4000FF00, 0xFF008000, true, true);
xr_string out_txt = (out_txt.size() && g_stats_flags.is(st_sound_info_name)) ? item.name.c_str():"";
if (item.game_object)
{
if (g_stats_flags.is(st_sound_ai_dist))
DU->DrawSphere (Fidentity, item.params.position, item.params.max_ai_distance, 0x80FF0000,0xFF800000,true,true);
if (g_stats_flags.is(st_sound_info_object)){
out_txt += " (";
out_txt += item.game_object->cNameSect().c_str();
out_txt += ")";
}
}
if (g_stats_flags.is_any(st_sound_info_name|st_sound_info_object) && item.name.size())
DU->OutText (item.params.position, out_txt.c_str(),0xFFFFFFFF,0xFF000000);
}
}
}
#endif
}
示例2: OnRender
void CLevel::OnRender()
{
inherited::OnRender ();
if (!game)
return;
Game().OnRender();
//отрисовать трассы пуль
//Device.Statistic->TEST1.Begin();
BulletManager().Render();
//Device.Statistic->TEST1.End();
//отрисовать интерфейc пользователя
HUD().RenderUI();
#ifdef DEBUG
draw_wnds_rects();
ph_world->OnRender ();
#endif // DEBUG
#ifdef DEBUG
if (ai().get_level_graph())
ai().level_graph().render();
#ifdef DEBUG_PRECISE_PATH
test_precise_path ();
#endif
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(Level().CurrentEntity());
if (stalker)
stalker->OnRender ();
if (bDebug) {
for (u32 I=0; I < Level().Objects.o_count(); I++) {
CObject* _O = Level().Objects.o_get_by_iterator(I);
CAI_Stalker* stalker = smart_cast<CAI_Stalker*>(_O);
if (stalker)
stalker->OnRender ();
CPhysicObject *physic_object = smart_cast<CPhysicObject*>(_O);
if (physic_object)
physic_object->OnRender();
CSpaceRestrictor *space_restrictor = smart_cast<CSpaceRestrictor*> (_O);
if (space_restrictor)
space_restrictor->OnRender();
CClimableObject *climable = smart_cast<CClimableObject*> (_O);
if(climable)
climable->OnRender();
CTeamBaseZone *team_base_zone = smart_cast<CTeamBaseZone*>(_O);
if (team_base_zone)
team_base_zone->OnRender();
if (GameID() != eGameIDSingle)
{
CInventoryItem* pIItem = smart_cast<CInventoryItem*>(_O);
if (pIItem) pIItem->OnRender();
}
if (dbg_net_Draw_Flags.test(dbg_draw_skeleton)) //draw skeleton
{
CGameObject* pGO = smart_cast<CGameObject*> (_O);
if (pGO && pGO != Level().CurrentViewEntity() && !pGO->H_Parent())
{
if (pGO->Position().distance_to_sqr(Device.vCameraPosition) < 400.0f)
{
pGO->dbg_DrawSkeleton();
}
}
};
}
// [7/5/2005]
if (Server && Server->game) Server->game->OnRender();
// [7/5/2005]
ObjectSpace.dbgRender ();
//---------------------------------------------------------------------
HUD().Font().pFontStat->OutSet (170,630);
HUD().Font().pFontStat->SetHeight (16.0f);
HUD().Font().pFontStat->SetColor (0xffff0000);
if(Server)HUD().Font().pFontStat->OutNext ("Client Objects: [%d]",Server->GetEntitiesNum());
HUD().Font().pFontStat->OutNext ("Server Objects: [%d]",Objects.o_count());
HUD().Font().pFontStat->OutNext ("Interpolation Steps: [%d]", Level().GetInterpolationSteps());
HUD().Font().pFontStat->SetHeight (8.0f);
//---------------------------------------------------------------------
}
#endif
#ifdef DEBUG
if (bDebug) {
DBG().draw_object_info ();
DBG().draw_text ();
DBG().draw_level_info ();
}
debug_renderer().render ();
//.........这里部分代码省略.........
示例3: SetMask
IC u32 SetMask(u32 mask, Flags32 flags, u32 flag )
{
return mask?(mask|(flags.is(flag)?PropItem::flCBChecked:PropItem::flDisabled)):0;
}