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


C++ Quad::setPosition方法代码示例

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


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

示例1: initApp

void ColoredCubeApp::initApp()
{
	D3DApp::initApp();
	
	line1.init(md3dDevice, 10.0f, GREEN);
	line2.init(md3dDevice, 10.0f, BLUE);
	line3.init(md3dDevice, 10.0f, RED);

	xLine.init(&line1, Vector3(0,0,0), 5);
	xLine.setPosition(Vector3(0,0,0));
	yLine.init(&line2, Vector3(0,0,0), 5);
	yLine.setPosition(Vector3(0,0,0));
	yLine.setRotationZ(ToRadian(90));
	zLine.init(&line3, Vector3(0,0,0), 5);
	zLine.setPosition(Vector3(0,0,0));
	zLine.setRotationY(ToRadian(90));

	quad1.init(md3dDevice, 50, CYAN);
	quad1.setPosition(Vector3(0,-5,0));

	quad2.init(md3dDevice, 50, RED);
	quad2.setPosition(Vector3(0,5,0));

	quad3.init(md3dDevice, 50, BEACH_SAND);
	quad3.setPosition(Vector3(5,5,0));
	quad3.setRotXAngle(ToRadian(90));
	quad3.setRotYAngle(ToRadian(90));

	quad4.init(md3dDevice, 50, BEACH_SAND);
	quad4.setPosition(Vector3(-5,5,0));
	quad4.setRotXAngle(ToRadian(90));
	quad4.setRotYAngle(ToRadian(90));

	quad4.init(md3dDevice, 50, BEACH_SAND);
	quad4.setPosition(Vector3(-5,5,0));
	quad4.setRotXAngle(ToRadian(90));

	quad5.init(md3dDevice, 50, DARKBROWN);
	quad5.setPosition(Vector3(0,0,-7));
	quad5.setRotXAngle(ToRadian(90));

	for(int i = 0; i < WALL_SIZE; ++i) {
		wall[i].init(md3dDevice, 1, GREEN);
		wall[i].setPosition(Vector3((rand() % MAX_RADIUS) - (MAX_RADIUS / 2), (rand() % MAX_RADIUS) - (MAX_RADIUS / 2), -6));
		wall[i].setRotXAngle(ToRadian(90));
		wall[i].setRotZAngle(ToRadian(45));
	}

	buildFX();
	buildVertexLayouts();

}
开发者ID:,项目名称:,代码行数:52,代码来源:


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