document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.     //Matriz view
  2.  
  3.     Matrix m_View, m_Bt, m_trans;
  4.  
  5. m_Bt.m_M[0][0] = cam_X.m_V[0];    m_Bt.m_M[0][1] = cam_X.m_V[1];    
  6. m_Bt.m_M[0][2] = cam_X.m_V[2];    m_Bt.m_M[0][3] = 0;
  7. m_Bt.m_M[1][0] = cam_Y.m_V[0];    m_Bt.m_M[1][1] = cam_Y.m_V[1];  
  8. m_Bt.m_M[1][2] = cam_Y.m_V[2];    m_Bt.m_M[1][3] = 0;
  9. m_Bt.m_M[2][0] = cam_Z.m_V[0];    m_Bt.m_M[2][1] = cam_Z.m_V[1];  
  10. m_Bt.m_M[2][2] = cam_Z.m_V[2];    m_Bt.m_M[2][3] = 0;
  11. m_Bt.m_M[3][0] = 0;           m_Bt.m_M[3][1] = 0;    
  12. m_Bt.m_M[3][2] = 0;              m_Bt.m_M[3][3] = 1;
  13.  
  14.  
  15. m_trans.m_M[0][0] = 1;    m_trans.m_M[0][1] = 0;  
  16. m_trans.m_M[0][2] = 0;    m_trans.m_M[0][3] = -cam_Posicao.m_V[0];
  17. m_trans.m_M[1][0] = 0;    m_trans.m_M[1][1] = 1;  
  18. m_trans.m_M[1][2] = 0;    m_trans.m_M[1][3] = -cam_Posicao.m_V[1];
  19. m_trans.m_M[2][0] = 0;    m_trans.m_M[2][1] = 0;  
  20. m_trans.m_M[2][2] = 1;    m_trans.m_M[2][3] = -cam_Posicao.m_V[2];
  21. m_trans.m_M[3][0] = 0;    m_trans.m_M[3][1] = 0;  
  22. m_trans.m_M[3][2] = 0;    m_trans.m_M[3][3] = 1 ;
  23.  
  24.  
  25.     m_View = m_Bt * m_trans ;
');