Paramount Paramount - 6 days ago 5
Android Question

Android - getting the current rotation of a matrix

I need to be able to set the rotation of a matrix rather than add to it. I believe the only way to set the rotation is to know the current rotation of the matrix.

Note:

matrix.setRotate()
will not do, because the matrix needs to retain its information.

Answer

What you can do is call getValues and cache the values. Later when you want them back just call setValues on the matrix.

Update

The rotation matrix and transform matrix relation well explained here