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


C++ Matrix3f::RotationY方法代码示例

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


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

示例1: Update

//--------------------------------------------------------------------------------
void App::Update()
{
	// Update the timer to determine the elapsed time since last frame.  This can 
	// then used for animation during the frame.

	m_pTimer->Update();

	// Send an event to everyone that a new frame has started.  This will be used
	// in later examples for using the material system with render views.

	EvtManager.ProcessEvent( EvtFrameStartPtr( new EvtFrameStart( m_pTimer->Elapsed() ) ) );


	// Manipulate the scene here - simply rotate the root of the scene in this
	// example.

	Matrix3f rotation;
	rotation.RotationY( m_pTimer->Elapsed() );
	m_pActor->GetNode()->Transform.Rotation() *= rotation;


	// Update the scene, and then render all cameras within the scene.

	m_pScene->Update( m_pTimer->Elapsed() );
	m_pScene->Render( m_pRenderer11 );


	// Perform the rendering and presentation for each window.

	for ( int i = 0; i < NUM_WINDOWS; i++ )
	{
		// Bind the swap chain render target and the depth buffer for use in 
		// rendering.  

		D3D11_BOX box;
		box.left = m_pWindow[i]->GetLeft();
		box.right = m_pWindow[i]->GetWidth() + box.left;
		box.top = m_pWindow[i]->GetTop();
		box.bottom = m_pWindow[i]->GetHeight() + box.top;
		box.front = 0;
		box.back = 1;

		if ( box.left < 0 ) box.left = 0;
		if ( box.right > (unsigned int)m_DesktopRes.x - 1 ) box.right = (unsigned int)m_DesktopRes.x - 1;
		if ( box.top < 0 ) box.top = 0;
		if ( box.bottom > (unsigned int)m_DesktopRes.y - 1 ) box.bottom = (unsigned int)m_DesktopRes.y - 1;

		m_pRenderer11->pImmPipeline->CopySubresourceRegion( m_RenderTarget[i], 0, 0, 0, 0, m_OffscreenTexture, 0, &box );
		m_pRenderer11->Present( m_pWindow[i]->GetHandle(), m_pWindow[i]->GetSwapChain() );
	}

}
开发者ID:CaptainJH,项目名称:hieroglyph3-90072,代码行数:53,代码来源:App.cpp


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