Advertisement
Guest User

Untitled

a guest
May 22nd, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. private float[] getMVPMatrix(){
  2. float[] mMVPMatrix = new float[16];
  3. float[] mRotationMatrix = new float[16];
  4. float[] mViewMatrix = getDefaultViewMatrix();
  5.  
  6. long time = SystemClock.uptimeMillis();
  7. float angle = 0.001f*((float) time);
  8.  
  9. Matrix.setRotateM(mRotationMatrix, 0, angle, 0, 0, -1.0f);
  10.  
  11. Matrix.multiplyMM(mViewMatrix, 0, mRotationMatrix, 0, mViewMatrix, 0);
  12. Matrix.multiplyMM(mMVPMatrix, 0, mProjectionMatrix, 0, mViewMatrix, 0);
  13.  
  14.  
  15. return mMVPMatrix;
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement