void RsCamera::Update()
{
	// Setup the translation part
	MtMatrix4 m4Translation;
	m4Translation.SetTranslation( -m_v3Position );

	// Calculate the view transform
	m_m4View = m4Translation * m_m3Orientation;

	// Calculate the world to screen transform
	m_m4ViewProjection = m_m4View * m_m4Projection;

	MtMatrix4 matTexAdj;

	if( ApConfig::GetPlatform() == ApPlatform_DX11 )
	{
		matTexAdj = MtMatrix4( 0.5f,      0.0f,     0.0f, 0,
							   0.0f,     -0.5f,     0.0f, 0,
							   0.0f,      0.0f,     0.5f, 0,
							   0.5f,      0.5f,	    0.5f, 1.0f );
		m_m4ViewProjectionTexture = m_m4ViewProjection * matTexAdj;
	}
	else
	{
		matTexAdj = MtMatrix4( 0.5f, 0.0f, 0.0f, 0,
							   0.0f, 0.5f, 0.0f, 0,
							   0.0f, 0.0f, 0.5f, 0,
							   0.5f, 0.5f, 0.5f, 1.0f);

		m_m4ViewProjectionTexture = m_m4ViewProjection * matTexAdj;
	}
    
	// Update the frustum
	m_frustum.Set( m_m4ViewProjection );
}
void SbWaxGraph::Update()
{
    MtMatrix4 m4Transform = MtMatrix4( ExWAX9::GetTransform() );

    if( UiKeyboard::pInstance()->IsHeld( UiKeyCode_Z ) )
    {
        MtMatrix4 m4Temp;
        m4Temp.SetRotationY( MtDegreesToRadians( 1.0f ) );
        m4Rotate = m4Temp * m4Rotate;
    }

    if( UiKeyboard::pInstance()->IsHeld( UiKeyCode_X ) )
    {
        MtMatrix4 m4Temp;
        m4Temp.SetRotationY(MtDegreesToRadians(-1.0f));
        m4Rotate = m4Temp * m4Rotate;
    }
    m4Transform = m4Rotate * m4Transform;

    m_pWaxModel->SetLocalTransform( m4Transform );
    m_pWaxModel->Update();
}