本文整理汇总了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() );
}
}