本文整理汇总了C++中CAI_Stalker::dbg_draw_vision方法的典型用法代码示例。如果您正苦于以下问题:C++ CAI_Stalker::dbg_draw_vision方法的具体用法?C++ CAI_Stalker::dbg_draw_vision怎么用?C++ CAI_Stalker::dbg_draw_vision使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAI_Stalker
的用法示例。
在下文中一共展示了CAI_Stalker::dbg_draw_vision方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnRender
//.........这里部分代码省略.........
#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 ();
DBG().draw_debug_text();
if (psAI_Flags.is(aiVision)) {
for (u32 I=0; I < Level().Objects.o_count(); I++) {
CObject *object = Objects.o_get_by_iterator(I);
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(object);
if (!stalker)
continue;
stalker->dbg_draw_vision ();
}
}
if (psAI_Flags.test(aiDrawVisibilityRays)) {
for (u32 I=0; I < Level().Objects.o_count(); I++) {
CObject *object = Objects.o_get_by_iterator(I);
CAI_Stalker *stalker = smart_cast<CAI_Stalker*>(object);
if (!stalker)
continue;
stalker->dbg_draw_visibility_rays ();
}
}
#endif
}