当前位置: 首页>>代码示例>>C++>>正文


C++ TestScene::runOsg方法代码示例

本文整理汇总了C++中TestScene::runOsg方法的典型用法代码示例。如果您正苦于以下问题:C++ TestScene::runOsg方法的具体用法?C++ TestScene::runOsg怎么用?C++ TestScene::runOsg使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TestScene的用法示例。


在下文中一共展示了TestScene::runOsg方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: arg

int
main (int argc, char* argv[])
{
	try
	{
		TestScene* scene = NULL;
		int runner = 0;
		for (int i = 1; i < argc; i++)
		{
			std::string arg(argv[i]);
			std::transform(arg.begin(), arg.end(), arg.begin(), ::tolower);
			if (0 == arg.compare("ogre") || 0 == arg.compare("ogre3d"))
			{
				runner = 1;
			}
			else if (0 == arg.compare("osg"))
			{
				runner = 2;
			}
			else if (0 == arg.compare("panda") || 0 == arg.compare("panda3d"))
			{
				runner = 3;
			}
			else if (0 == arg.compare("1"))
			{
				scene = new TestScene1();
			}
			else if (0 == arg.compare("2"))
			{
				scene = new TestScene2();
			}
			else if (0 == arg.compare("3"))
			{
				scene = new TestScene3();
			}
			else if (0 == arg.compare("4"))
			{
				scene = new TestScene4();
			}
			else if (0 == arg.compare("5"))
			{
				scene = new TestScene5();
			}
			else if (0 == arg.compare("6"))
			{
				scene = new TestScene6();
			}
			else if (0 == arg.compare("7"))
			{
				scene = new TestScene7();
			}
			else if (0 == arg.compare("8"))
			{
				scene = new TestScene8();
			}
			else if (0 == arg.compare("8.1"))
			{
				scene = new TestScene81();
			}
			else if (0 == arg.compare("8.2"))
			{
				scene = new TestScene82();
			}
			else if (0 == arg.compare("9"))
			{
				scene = new TestScene9();
			}
			else if (0 == arg.compare("10"))
			{
				scene = new TestScene10();
			}
			else if (0 == arg.compare("11"))
			{
				scene = new TestScene11();
			}
			else if (0 == arg.compare("12"))
			{
				scene = new TestScene12();
			}
			else if (0 != arg.compare("purge"))
			{
				throw std::string("Undefined runner: ") + arg;
			}
		}
		if (!scene)
		{
			throw "No scene was chosen";
		}
		// required for runPanda()
		argc = 1;
		switch (runner)
		{
			case 0:
				scene->runPURGE();
				break;
			case 1:
				scene->runOgre();
				break;
			case 2:
				scene->runOsg();
//.........这里部分代码省略.........
开发者ID:soulmerge,项目名称:PURGE,代码行数:101,代码来源:main.cpp


注:本文中的TestScene::runOsg方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。