本文整理汇总了C++中Physics::setDebugMode方法的典型用法代码示例。如果您正苦于以下问题:C++ Physics::setDebugMode方法的具体用法?C++ Physics::setDebugMode怎么用?C++ Physics::setDebugMode使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Physics
的用法示例。
在下文中一共展示了Physics::setDebugMode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: handleContextMenuAction
bool handleContextMenuAction(s32 cmd_id)
{
World *world = World::getWorld();
Physics *physics = world ? world->getPhysics() : NULL;
switch(cmd_id)
{
case DEBUG_GRAPHICS_RELOAD_SHADERS:
Log::info("Debug", "Reloading shaders...");
ShaderBase::updateShaders();
break;
case DEBUG_GRAPHICS_RESET:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
break;
case DEBUG_GRAPHICS_WIREFRAME:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleWireframe();
break;
case DEBUG_GRAPHICS_MIPMAP_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleMipVisualization();
break;
case DEBUG_GRAPHICS_NORMALS_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleNormals();
break;
case DEBUG_GRAPHICS_SSAO_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleSSAOViz();
break;
case DEBUG_GRAPHICS_RSM_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleRSM();
break;
case DEBUG_GRAPHICS_RH_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleRH();
break;
case DEBUG_GRAPHICS_GI_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleGI();
break;
case DEBUG_GRAPHICS_SHADOW_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleShadowViz();
break;
case DEBUG_GRAPHICS_LIGHT_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleLightViz();
break;
case DEBUG_GRAPHICS_DISTORT_VIZ:
if (physics)
physics->setDebugMode(IrrDebugDrawer::DM_NONE);
irr_driver->resetDebugModes();
irr_driver->toggleDistortViz();
break;
case DEBUG_GRAPHICS_BULLET_1:
irr_driver->resetDebugModes();
if (!world) return false;
physics->setDebugMode(IrrDebugDrawer::DM_KARTS_PHYSICS);
break;
case DEBUG_GRAPHICS_BULLET_2:
{
irr_driver->resetDebugModes();
if (!world) return false;
Physics *physics = world->getPhysics();
physics->setDebugMode(IrrDebugDrawer::DM_NO_KARTS_GRAPHICS);
//.........这里部分代码省略.........